about summary refs log tree commit diff stats
path: root/subx
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
parent62c6d1638a2682bbc291987e2d6cb87b5c5d8da1 (diff)
downloadmu-875b6ba897cddb1a70c99327b50921de802d3f39.tar.gz
4457
Port recent changes to build_and_test_until to subx/
Diffstat (limited to 'subx')
-rwxr-xr-xsubx/build_and_test_until15
-rwxr-xr-xsubx/clean1
2 files changed, 15 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
diff --git a/subx/clean b/subx/clean
index 18641a3b..cbcf326f 100755
--- a/subx/clean
+++ b/subx/clean
@@ -6,3 +6,4 @@ rm -rf subx.cc subx_bin* *_list
 test $# -gt 0 && exit 0  # convenience: 'clean top-level' to leave subsidiary tools alone
 rm -rf ../enumerate/enumerate ../tangle/tangle ../tangle/*_list ../*/*.dSYM
 rm -rf teensy/*.o
+rm -rf .until