From 976feee37dc556a260ac688226b354b266672b59 Mon Sep 17 00:00:00 2001 From: archmoj Date: Wed, 28 Jul 2021 16:21:28 +0200 Subject: [PATCH 1/3] revisit setting timezone --- .circleci/test.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.circleci/test.sh b/.circleci/test.sh index 9362dfb0361..8b5ce0c9215 100755 --- a/.circleci/test.sh +++ b/.circleci/test.sh @@ -33,16 +33,23 @@ retry () { fi } -# set timezone to Alaska time (arbitrary timezone to test date logic) -set_tz () { - sudo cp /usr/share/zoneinfo/America/Anchorage /etc/localtime - export TZ='America/Anchorage' +set_timezone () { + # Alaska time (arbitrary timezone to test date logic) + TZ="America/Anchorage" + + echo "set timezone to $TZ" + sudo cp /usr/share/zoneinfo/$TZ /etc/localtime + + echo "display date in timezone" + date + + export TZ } case $1 in no-gl-jasmine) - set_tz + set_timezone SUITE=$(circleci tests glob "$ROOT/test/jasmine/tests/*" | circleci tests split) MAX_AUTO_RETRY=2 @@ -52,7 +59,7 @@ case $1 in ;; webgl-jasmine) - set_tz + set_timezone SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=5 --tag=gl | circleci tests split)) for s in ${SHARDS[@]}; do @@ -64,7 +71,7 @@ case $1 in ;; flaky-no-gl-jasmine) - set_tz + set_timezone SHARDS=($(node $ROOT/tasks/shard_jasmine_tests.js --limit=1 --tag=flaky | circleci tests split)) @@ -88,7 +95,8 @@ case $1 in ;; jasmine-bundle) - set_tz + set_timezone + npm run test-bundle || EXIT_STATE=$? exit $EXIT_STATE ;; From d4d842df2831fe2cd2c881bba8a4dd03b589c4c0 Mon Sep 17 00:00:00 2001 From: archmoj Date: Wed, 28 Jul 2021 16:38:48 +0200 Subject: [PATCH 2/3] move up bundle to be under other jasmine tests --- .circleci/test.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/test.sh b/.circleci/test.sh index 8b5ce0c9215..7c6a5850d90 100755 --- a/.circleci/test.sh +++ b/.circleci/test.sh @@ -83,6 +83,13 @@ case $1 in exit $EXIT_STATE ;; + jasmine-bundle) + set_timezone + + npm run test-bundle || EXIT_STATE=$? + exit $EXIT_STATE + ;; + make-baselines) SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split) python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$? @@ -94,13 +101,6 @@ case $1 in exit $EXIT_STATE ;; - jasmine-bundle) - set_timezone - - npm run test-bundle || EXIT_STATE=$? - exit $EXIT_STATE - ;; - source-syntax) npm run lint || EXIT_STATE=$? npm run test-syntax || EXIT_STATE=$? From 22890a0bf125011a10977115965d5829e1281fcb Mon Sep 17 00:00:00 2001 From: archmoj Date: Wed, 28 Jul 2021 17:01:53 +0200 Subject: [PATCH 3/3] rename jasmine-bundle to bundle-jasmine --- .circleci/config.yml | 6 +++--- .circleci/test.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 113b0f5e9c6..a18cce75722 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -162,7 +162,7 @@ jobs: name: Run syntax tests on source files command: .circleci/test.sh source-syntax - jasmine-bundle: + bundle-jasmine: docker: # need '-browsers' version to test in real (xvfb-wrapped) browsers - image: circleci/node:12.22.1-browsers @@ -172,7 +172,7 @@ jobs: at: ~/ - run: name: Run jasmine tests (part D) - command: .circleci/test.sh jasmine-bundle + command: .circleci/test.sh bundle-jasmine publish-dist: docker: @@ -246,7 +246,7 @@ workflows: build-and-test: jobs: - install-and-cibuild - - jasmine-bundle: + - bundle-jasmine: requires: - install-and-cibuild - no-gl-jasmine: diff --git a/.circleci/test.sh b/.circleci/test.sh index 7c6a5850d90..2c4631ad680 100755 --- a/.circleci/test.sh +++ b/.circleci/test.sh @@ -83,7 +83,7 @@ case $1 in exit $EXIT_STATE ;; - jasmine-bundle) + bundle-jasmine) set_timezone npm run test-bundle || EXIT_STATE=$?