about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-27 12:11:18 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-27 12:11:18 -0700
commit4d1f4a660c8ce9226746f485757d7885eaaf8d61 (patch)
tree66d1da443f7573da1d50c2916c8f5215db1a232f
parent536a22c1b83500d4efaa7a1eae0e84ac8743b768 (diff)
downloadmu-4d1f4a660c8ce9226746f485757d7885eaaf8d61.tar.gz
2288
Make it easy to skip distracting valgrind errors when debugging more
obvious errors in early layers. Just throw a 'test' at the end of
build_and_test_until commands to not run valgrind (and make it a regular
test run).
-rwxr-xr-xbuild_and_test_until6
-rw-r--r--makefile3
2 files changed, 6 insertions, 3 deletions
diff --git a/build_and_test_until b/build_and_test_until
index e001ed5e..1c454ad1 100755
--- a/build_and_test_until
+++ b/build_and_test_until
@@ -6,6 +6,6 @@ set -e
 set -v
 make tangle/tangle
 make enumerate/enumerate
-./tangle/tangle $(./enumerate/enumerate --until $* |grep -v '.mu$') |grep -v "^\s*//:" > mu.cc
-cat /dev/null $(./enumerate/enumerate --until $* |grep '.mu$') > core.mu
-CXX=${CXX:-clang++} CFLAGS=${CFLAGS:-"-O3 -fsanitize=undefined"} make valgrind
+./tangle/tangle $(./enumerate/enumerate --until $1 |grep -v '.mu$') |grep -v "^\s*//:" > mu.cc
+cat /dev/null $(./enumerate/enumerate --until $1 |grep '.mu$') > core.mu
+CXX=${CXX:-clang++} CFLAGS=${CFLAGS:-"-O3 -fsanitize=undefined"} make ${2:-valgrind}
diff --git a/makefile b/makefile
index 27d4cbd6..e620a87c 100644
--- a/makefile
+++ b/makefile
@@ -46,6 +46,9 @@ test_list: mu.cc
 #
 .PHONY: all autogenerated_lists clean clena
 
+test: autogenerated_lists mu_bin core.mu
+	./mu_bin test
+
 valgrind: autogenerated_lists mu_bin core.mu
 	valgrind --leak-check=yes -q --error-exitcode=1 ./mu_bin test