-
Notifications
You must be signed in to change notification settings - Fork 790
/
Copy pathtest-simple
executable file
·91 lines (80 loc) · 3.15 KB
/
test-simple
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/sh
# stop blowing compiled stuff
rm -rf builds/out-simp
rm -rf package.json
rm -rf package-lock.json
echo {} > package.json
mkdir -p builds/out-simp
possible=6
ran=0
#bin/cljsc test >out/core-test.js
if ! bin/cljsc src/test/cljs "{:optimizations :simple
:static-fns true
:output-dir \"builds/out-simp\"
:cache-analysis true
:output-wrapper true
:verbose true
:compiler-stats true
:npm-deps {:lodash \"4.17.4\"}
:closure-warnings {:non-standard-jsdoc :off :global-this :off}
:install-deps true
:language-in :es6
:language-out :es5
:foreign-libs [{:file \"src/test/cljs/calculator_global.js\"
:provides [\"calculator\"]
:global-exports {calculator Calculator}}
{:file \"src/test/cljs/es6_dep.js\"
:module-type :es6
:provides [\"es6_calc\"]}
{:file \"src/test/cljs/calculator.js\"
:module-type :commonjs
:provides [\"calculator\"]}
{:file \"src/test/cljs/es6_default_hello.js\"
:provides [\"es6_default_hello\"]
:module-type :es6}]}" > builds/out-simp/core-simple-test.js; then
>&2 echo ClojureScript compilation failed
exit 1
fi;
if [ "$V8_HOME" = "" ]; then
echo "V8_HOME not set, skipping V8 tests"
else
echo "Testing with V8"
"${V8_HOME}/d8" builds/out-simp/core-simple-test.js
ran=$[ran+1]
fi
if [ "$SPIDERMONKEY_HOME" = "" ]; then
echo "SPIDERMONKEY_HOME not set, skipping SpiderMonkey tests"
else
echo "Testing with SpiderMonkey"
${SPIDERMONKEY_HOME}/js -f builds/out-simp/core-simple-test.js
ran=$[ran+1]
fi
if ! hash jsc 2>/dev/null; then
echo "jsc not on path, skipping JavaScriptCore tests"
else
echo "Testing with JavaScriptCore"
jsc -f builds/out-simp/core-simple-test.js
ran=$[ran+1]
fi
if [ "$NASHORN_HOME" = "" ]; then
echo "NASHORN_HOME not set, skipping Nashorn tests"
else
echo "Testing with Nashorn"
"${NASHORN_HOME}/jjs" builds/out-simp/core-simple-test.js
ran=$[ran+1]
fi
if [ "$CHAKRACORE_HOME" = "" ]; then
echo "CHAKRACORE_HOME not set, skipping ChakraCore tests"
else
echo "Testing with ChakraCore"
"${CHAKRACORE_HOME}/ch" builds/out-simp/core-simple-test.js
ran=$[ran+1]
fi
if [ "$GRAALVM_HOME" = "" ]; then
echo "GRAALVM_HOME not set, skipping GraalVM tests"
else
echo "Testing with GraalVM"
"${GRAALVM_HOME}/js" builds/out-simp/core-simple-test.js
ran=$[ran+1]
fi
echo "Tested with $ran out of $possible possible js targets"