Skip to content

Commit 195cf19

Browse files
committed
add ability to run just 'jasmine' or just 'image' noci tests
1 parent 27c9e55 commit 195cf19

File tree

1 file changed

+38
-10
lines changed

1 file changed

+38
-10
lines changed

tasks/noci_test.sh

+38-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
#! /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+
# -----------------------------------------------
215

316
EXIT_STATE=0
417
root=$(dirname $0)/..
518

6-
# tests that aren't run on CI (yet)
7-
819
# 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+
}
1023

1124
# mapbox image tests take too much resources on CI
1225
#
@@ -15,12 +28,27 @@ npm run test-jasmine -- --tags=noCI,noCIdep --nowatch || EXIT_STATE=$?
1528
# 'old' image server
1629
#
1730
# 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
2553

2654
exit $EXIT_STATE

0 commit comments

Comments
 (0)