summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-20 17:53:36 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-20 17:53:36 +0800
commit7d217b40b66e7c569e160447e4aa87d973470a9b (patch)
tree9a1af42ee3c604c1dec7960fd4e77d1925876282
parente21a7ceaee5f951bdec280c31a25a8d9215211a6 (diff)
downloadmrust-7d217b40b66e7c569e160447e4aa87d973470a9b.tar.gz
Makefile - Allow overriding the last stage for rust_tests
-rw-r--r--.travis.yml10
-rw-r--r--Makefile6
-rw-r--r--src/main.cpp2
3 files changed, 11 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index c8fb6a7c..c66e8c62 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,8 +12,7 @@ matrix:
- ubuntu-toolchain-r-test
packages:
- g++-6
- - libboost-dev
- - libboost-iostreams-dev
+ - zlib1g-dev
env:
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
- os: linux
@@ -23,8 +22,7 @@ matrix:
- ubuntu-toolchain-r-test
packages:
- g++-5
- - libboost-dev
- - libboost-iostreams-dev
+ - zlib1g-dev
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
@@ -35,5 +33,5 @@ before_script:
script:
- make
-# - make test
- - make rust_tests-run-pass
+ - make test
+# - make rust_tests-run-pass RUST_TESTS_FINAL_STAGE=parse
diff --git a/Makefile b/Makefile
index ce70235b..3dd08059 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,10 @@ EXESUF ?=
CXX ?= g++
V ?= @
+# - Final stage for tests run as part of the rust_tests target.
+# VALID OPTIONS: parse, expand, mir, ALL
+RUST_TESTS_FINAL_STAGE ?= mir
+
LINKFLAGS := -g
LIBS := -lz
CXXFLAGS := -g -Wall
@@ -159,7 +163,7 @@ output/rust/test_run-pass_hello: $(RUST_TESTS_DIR)run-pass/hello.rs output/libst
output/rust/%.o: $(RUST_TESTS_DIR)%.rs $(RUSTCSRC) $(BIN) output/libstd.hir output/libtest.hir
@mkdir -p $(dir $@)
@echo "--- TEST $(patsubst output/rust/%.o,%,$@)"
- @$(BIN) $< -o $@ --stop-after mir > $@.txt 2>&1
+ @$(BIN) $< -o $@ --stop-after $(RUST_TESTS_FINAL_STAGE) > $@.txt 2>&1
@touch $@
output/rust/run-pass/allocator-default.o: output/libstd.hir output/liballoc_jemalloc.hir
diff --git a/src/main.cpp b/src/main.cpp
index f65b3c67..2ffab7e8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -539,6 +539,8 @@ ProgramParams::ProgramParams(int argc, char *argv[])
this->last_stage = STAGE_RESOLVE;
else if( strcmp(arg, "mir") == 0 )
this->last_stage = STAGE_MIR;
+ else if( strcmp(arg, "ALL") == 0 )
+ this->last_stage = STAGE_ALL;
else {
::std::cerr << "Unknown argument to --stop-after : '" << arg << "'" << ::std::endl;
exit(1);