-
-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathruntests.sh
44 lines (39 loc) · 1008 Bytes
/
runtests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Set Testing to 1 so that our display script will enter testing mode...
export TESTING=1
pushd examples
mkdir -p Check
_single=$1
if [[ -n "$_single" ]]; then
node $_single
if [[ $? -ne 0 ]]; then
echo Failed $_single
exit 1
else
# Remove any of the images that passed so the Artifacts don't have them...
name=$(echo "${_single}" | cut -f 1 -d '.')
if [[ "$2" == "" ]]; then
rm Check/${name}*.png
fi
echo Success $_single
fi
else
echo Starting Rendering Tests > Check/results.txt
pwd >> Check/results.txt
for f in demo*.js ; do
echo Running $f >> Check/results.txt
node $f
if [[ $? -ne 0 ]]; then
echo Failed $f
echo Failed $f >> Check/results.txt
exit 1
else
# Remove any of the images that passed so the Artifacts don't have them...
name=$(echo "${f}" | cut -f 1 -d '.')
rm Check/${name}*.png
echo Success $f >> Check/results.txt
fi
done;
fi
popd
exit 0