From 7dff75040e5532d5206ecff1f81c2ebb9ef86854 Mon Sep 17 00:00:00 2001 From: samreid Date: Fri, 30 Nov 2018 22:31:15 -0700 Subject: [PATCH] Add docs and update timing, see https://github.com/phetsims/aqua/issues/52 --- js/local/test.js | 2 +- scripts/auto-tests-local.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/js/local/test.js b/js/local/test.js index a79e14f..272674e 100644 --- a/js/local/test.js +++ b/js/local/test.js @@ -42,7 +42,7 @@ const _ = require( '../../../sherpa/lib/lodash-4.17.4.js' ); // eslint-disable-l repo !== 'faradays-law'; // Broken at the moment, see https://github.com/phetsims/faradays-law/issues/147 } ).map( getUnitTestURL ); - const timeout = 5000; + const timeout = 6000; // Timed so it takes about the same length of time as unit tests and linting, at least on my machine! const allTests = []; const pairs = []; diff --git a/scripts/auto-tests-local.sh b/scripts/auto-tests-local.sh index 3efc4c8..c772b04 100755 --- a/scripts/auto-tests-local.sh +++ b/scripts/auto-tests-local.sh @@ -2,11 +2,18 @@ # https://www.codeword.xyz/2015/09/02/three-ways-to-script-processes-in-parallel/ # Run fast local tests as a sanity check before committing or pushing. +# Share the same random seed across instances RAND=$RANDOM + +# Split unit tests into multiple groups to speed up by parallelism node js/local/test.js $RAND 3 0 UNIT & node js/local/test.js $RAND 3 1 UNIT & node js/local/test.js $RAND 3 2 UNIT & + +# Run the long fuzz test on its own, since it takes a while node js/local/test.js $RAND 1 0 FUZZ & + +# Run linting separately since it takes a while grunt lint-everything --repo=faradays-law & wait