summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-05-14 14:52:32 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-05-20 14:09:33 +0000
commit538780673002b49aa1193e3617c81024ba64e434 (patch)
treef9599ae64de73da9147230ad8880fc8b0657803f
parent4e07f7eff55c865af33bc7455384690ab5396e5f (diff)
downloadmorph-538780673002b49aa1193e3617c81024ba64e434.tar.gz
check: Allow yarns to be run with --snapshot
It's sometimes useful to use --snapshot when debugging the yarn tests, and `./check --yarns --snapshot` is far easier to type and remember than the required yarn command. Change-Id: I3f9c9599dd8418f28e572e484f3515c6ab004572
-rwxr-xr-xcheck10
1 files changed, 9 insertions, 1 deletions
diff --git a/check b/check
index 16720083..e3af5992 100755
--- a/check
+++ b/check
@@ -27,6 +27,7 @@ run_unit_tests=false
run_cmdtests=false
run_slow_cmdtests=false
run_yarns=false
+snapshot=''
if [ "$#" -eq 0 ]; then
run_style=true
run_unit_tests=true
@@ -74,6 +75,12 @@ do
--no-yarns)
run_yarns=false
;;
+ --snapshot)
+ snapshot='--snapshot'
+ ;;
+ --no-snapshot)
+ snapshot=''
+ ;;
*) echo "ERROR: Unknown argument $1." 1>&2; exit 1 ;;
esac
shift
@@ -131,7 +138,8 @@ fi
if "$run_yarns" && command -v yarn > /dev/null
then
- yarn --env "PYTHONPATH=$PYTHONPATH" -s yarns/morph.shell-lib yarns/*.yarn
+ yarn --env "PYTHONPATH=$PYTHONPATH" $snapshot -s yarns/morph.shell-lib \
+ yarns/*.yarn
fi
# cmdtest tests.