1
1
#! /bin/bash
2
+ #
3
+ # Run tests that aren't ran on CI (yet)
4
+ #
5
+ # to run all no-ci tests
6
+ # $ (plotly.js) ./tasks/noci_test.sh
7
+ #
8
+ # to run jasmine no-ci tests
9
+ # $ (plotly.js) ./tasks/noci_test.sh jasmine
10
+
11
+ # to run image no-ci tests
12
+ # $ (plotly.js) ./tasks/noci_test.sh image
13
+ #
14
+ # -----------------------------------------------
2
15
3
16
EXIT_STATE=0
4
17
root=$( dirname $0 ) /..
5
18
6
- # tests that aren't run on CI (yet)
7
-
8
19
# jasmine specs with @noCI tag
9
- npm run test-jasmine -- --tags=noCI,noCIdep --nowatch || EXIT_STATE=$?
20
+ test_jasmine () {
21
+ npm run test-jasmine -- --tags=noCI,noCIdep --nowatch || EXIT_STATE=$?
22
+ }
10
23
11
24
# mapbox image tests take too much resources on CI
12
25
#
@@ -15,12 +28,27 @@ npm run test-jasmine -- --tags=noCI,noCIdep --nowatch || EXIT_STATE=$?
15
28
# 'old' image server
16
29
#
17
30
# cone traces don't render correctly in the imagetest container
18
- $root /../orca/bin/orca.js graph \
19
- $root /test/image/mocks/mapbox_* \
20
- $root /test/image/mocks/gl3d_cone* \
21
- --plotly $root /build/plotly.js \
22
- --mapbox-access-token " pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ" \
23
- --output-dir $root /test/image/baselines/ \
24
- --verbose
31
+ test_image () {
32
+ $root /../orca/bin/orca.js graph \
33
+ $root /test/image/mocks/mapbox_* \
34
+ $root /test/image/mocks/gl3d_cone* \
35
+ --plotly $root /build/plotly.js \
36
+ --mapbox-access-token " pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ" \
37
+ --output-dir $root /test/image/baselines/ \
38
+ --verbose || EXIT_STATE=$?
39
+ }
40
+
41
+ case $1 in
42
+ jasmine)
43
+ test_jasmine
44
+ ;;
45
+ image)
46
+ test_image
47
+ ;;
48
+ * )
49
+ test_jasmine
50
+ test_image
51
+ ;;
52
+ esac
25
53
26
54
exit $EXIT_STATE
0 commit comments