about summary refs log tree commit diff stats
path: root/subx/build_and_test_until
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-30 11:31:09 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-30 11:31:09 -0700
commit875b6ba897cddb1a70c99327b50921de802d3f39 (patch)
tree9bd0e4a8a31255153969761a2e8783e7fbeafe06 /subx/build_and_test_until
parent62c6d1638a2682bbc291987e2d6cb87b5c5d8da1 (diff)
downloadmu-875b6ba897cddb1a70c99327b50921de802d3f39.tar.gz
4457
Port recent changes to build_and_test_until to subx/
Diffstat (limited to 'subx/build_and_test_until')
-rwxr-xr-xsubx/build_and_test_until15
1 files changed, 14 insertions, 1 deletions
diff --git a/subx/build_and_test_until b/subx/build_and_test_until
index 398dcbcb..710e1d55 100755
--- a/subx/build_and_test_until
+++ b/subx/build_and_test_until
@@ -1,5 +1,18 @@
 #!/bin/sh
+# Run tests for just a subset of layers.
+#
+# Usage:
+#   build_and_test_until [file prefix] [test name]
+# Provide the second arg to run just a single test.
 set -e
 
-./clean top-level  # ignore subsidiary tools like tangle and cleave
+# clean previous builds if they were building until a different layer
+touch .until
+PREV_UNTIL=`cat .until`
+if [ "$PREV_UNTIL" != $1 ]
+then
+  ./clean top-level
+  echo $1 > .until
+fi
+
 ./build --until $1  &&  ./subx_bin test $2