about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-06-05 23:39:47 -0700
committerKartik Agaram <vc@akkartik.com>2018-06-05 23:39:47 -0700
commit91fe63cdc15daa2ff15c0527bbf29abadb134ecc (patch)
treee4a9dbae92a019ca43e5f7d8b4cddb08bf12338a
parentaa94778639fda88034bbd8d979b15d8241b78a6a (diff)
downloadmu-91fe63cdc15daa2ff15c0527bbf29abadb134ecc.tar.gz
4251 - speed up repeated builds until the same layer
Also allow running a single test, to speed things up still further.
-rwxr-xr-xbuild_and_test_until15
-rwxr-xr-xclean1
2 files changed, 14 insertions, 2 deletions
diff --git a/build_and_test_until b/build_and_test_until
index 93c17ef2..6959a9fb 100755
--- a/build_and_test_until
+++ b/build_and_test_until
@@ -1,5 +1,16 @@
 #!/bin/sh
+# Usage:
+#   build_and_test_until [file prefix] [test name]
+# Provide the second arg to run just a single (Mu) scenario.
 set -e
 
-./clean top-level
-./build3 --until $1  &&  ./mu_bin test
+# 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
+
+./build3 --until $1  &&  ./mu_bin test $2
diff --git a/clean b/clean
index 3b629daa..19c46f7a 100755
--- a/clean
+++ b/clean
@@ -7,3 +7,4 @@ test $# -gt 0 && exit 0  # convenience: 'clean top-level' to leave subsidiary to
 rm -rf enumerate/enumerate tangle/tangle tangle/*_list cleave/cleave
 rm -rf termbox/*.o termbox/libtermbox.a
 rm -rf *.dSYM */*.dSYM
+rm -rf .until