summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-04-13 15:35:06 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-04-13 15:35:06 +0800
commitffaaf8047e615206e5eb27097a0b6e669f521b96 (patch)
tree79047670e7d1e83a986cdead3730beb4eae4da2d /Makefile
parent285305b6fb1cd94a47332811fb34f599af8ad795 (diff)
downloadmrust-ffaaf8047e615206e5eb27097a0b6e669f521b96.tar.gz
Expand - Tweaks to test harness
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2e907516..9ae61cd0 100644
--- a/Makefile
+++ b/Makefile
@@ -146,7 +146,20 @@ output/lib%.hir: $(RUSTCSRC)src/lib%/src/lib.rs $(RUSTCSRC) $(BIN)
$(DBG) $(ENV_$@) $(BIN) $< -o $@ $(RUST_FLAGS) $(ARGS_$@) $(PIPECMD)
# # HACK: Work around gdb returning success even if the program crashed
@test -e $@
-
+output/lib%-test: $(RUSTCSRC)src/lib%/lib.rs $(RUSTCSRC) $(BIN)
+ @echo "--- [MRUSTC] --test -o $@"
+ @mkdir -p output/
+ @rm -f $@
+ $(DBG) $(ENV_$@) $(BIN) --test $< -o $@ -L output/libs $(RUST_FLAGS) $(ARGS_$@) $(PIPECMD)
+# # HACK: Work around gdb returning success even if the program crashed
+ @test -e $@
+output/lib%-test: $(RUSTCSRC)src/lib%/src/lib.rs $(RUSTCSRC) $(BIN)
+ @echo "--- [MRUSTC] $@"
+ @mkdir -p output/
+ @rm -f $@
+ $(DBG) $(ENV_$@) $(BIN) --test $< -o $@ -L output/libs $(RUST_FLAGS) $(ARGS_$@) $(PIPECMD)
+# # HACK: Work around gdb returning success even if the program crashed
+ @test -e $@
fcn_extcrate = $(patsubst %,output/lib%.hir,$(1))
fn_getdeps = \