2011-05-01 22:18:52 +02:00
|
|
|
######################################################################
|
|
|
|
# Testing variables
|
|
|
|
######################################################################
|
|
|
|
|
2011-06-25 21:23:27 +02:00
|
|
|
RPASS_RC := $(wildcard $(S)src/test/run-pass/*.rc)
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
RPASS_RS := $(wildcard $(S)src/test/run-pass/*.rs)
|
2012-06-02 01:01:53 +02:00
|
|
|
RPASS_FULL_RC := $(wildcard $(S)src/test/run-pass-fulldeps/*.rc)
|
|
|
|
RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
|
2011-06-25 21:23:27 +02:00
|
|
|
RFAIL_RC := $(wildcard $(S)src/test/run-fail/*.rc)
|
|
|
|
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
|
|
|
|
CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
|
|
|
|
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
|
2011-08-01 23:10:59 +02:00
|
|
|
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
|
|
|
|
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-09-14 00:06:21 +02:00
|
|
|
# perf tests are the same as bench tests only they run under
|
|
|
|
# a performance monitor.
|
|
|
|
PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
|
|
|
|
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
RPASS_TESTS := $(RPASS_RC) $(RPASS_RS)
|
2012-06-02 01:01:53 +02:00
|
|
|
RPASS_FULL_TESTS := $(RPASS_FULL_RC) $(RPASS_FULL_RS)
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
RFAIL_TESTS := $(RFAIL_RC) $(RFAIL_RS)
|
|
|
|
CFAIL_TESTS := $(CFAIL_RC) $(CFAIL_RS)
|
2011-08-01 22:15:36 +02:00
|
|
|
BENCH_TESTS := $(BENCH_RS)
|
2011-09-14 00:06:21 +02:00
|
|
|
PERF_TESTS := $(PERF_RS)
|
2011-08-01 23:10:59 +02:00
|
|
|
PRETTY_TESTS := $(PRETTY_RS)
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-06-30 00:12:02 +02:00
|
|
|
FT := run_pass_stage2
|
|
|
|
FT_LIB := $(call CFG_LIB_NAME,$(FT))
|
|
|
|
FT_DRIVER := $(FT)_driver
|
|
|
|
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
# The arguments to all test runners
|
|
|
|
ifdef TESTNAME
|
|
|
|
TESTARGS += $(TESTNAME)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CHECK_XFAILS
|
|
|
|
TESTARGS += --ignored
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Arguments to the cfail/rfail/rpass/bench tests
|
|
|
|
ifdef CFG_VALGRIND
|
|
|
|
CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
|
|
|
|
endif
|
2011-06-30 00:12:02 +02:00
|
|
|
|
2011-09-14 00:06:21 +02:00
|
|
|
# Arguments to the perf tests
|
|
|
|
ifdef CFG_PERF_TOOL
|
|
|
|
CTEST_PERF_RUNTOOL = --runtool "$(CFG_PERF_TOOL)"
|
|
|
|
endif
|
|
|
|
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
CTEST_TESTARGS := $(TESTARGS)
|
2011-05-01 22:18:52 +02:00
|
|
|
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
ifdef VERBOSE
|
|
|
|
CTEST_TESTARGS += --verbose
|
|
|
|
endif
|
2011-05-05 02:32:05 +02:00
|
|
|
|
2011-08-01 01:45:09 +02:00
|
|
|
# Run the compiletest runner itself under valgrind
|
|
|
|
ifdef CTEST_VALGRIND
|
2011-11-29 06:23:42 +01:00
|
|
|
CFG_RUN_CTEST=$(call CFG_RUN_TEST,$(2),$(3))
|
2011-08-01 01:45:09 +02:00
|
|
|
else
|
2011-11-22 20:25:51 +01:00
|
|
|
CFG_RUN_CTEST=$(call CFG_RUN,$(TLIB$(1)_T_$(3)_H_$(3)),$(2))
|
2011-08-01 01:45:09 +02:00
|
|
|
endif
|
2011-05-05 02:32:05 +02:00
|
|
|
|
2012-05-24 07:53:50 +02:00
|
|
|
# If we're running perf then set this environment variable
|
|
|
|
# to put the benchmarks into 'hard mode'
|
|
|
|
ifeq ($(MAKECMDGOALS),perf)
|
|
|
|
RUST_BENCH=1
|
|
|
|
export RUST_BENCH
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
######################################################################
|
|
|
|
# Main test targets
|
|
|
|
######################################################################
|
|
|
|
|
2012-04-05 02:57:36 +02:00
|
|
|
.PHONY: cleantmptestlogs cleantestlibs
|
|
|
|
|
2012-04-04 22:40:50 +02:00
|
|
|
cleantmptestlogs:
|
|
|
|
$(Q)rm -f tmp/*.log
|
2011-05-05 02:32:05 +02:00
|
|
|
|
2012-04-05 02:57:36 +02:00
|
|
|
cleantestlibs:
|
|
|
|
$(Q)find $(CFG_HOST_TRIPLE)/test \
|
|
|
|
-name '*.[odasS]' -o \
|
|
|
|
-name '*.so' -o \
|
|
|
|
-name '*.dylib' -o \
|
|
|
|
-name '*.dll' -o \
|
|
|
|
-name '*.def' -o \
|
|
|
|
-name '*.bc' -o \
|
|
|
|
-name '*.dSYM' -o \
|
2012-04-10 07:41:27 +02:00
|
|
|
-name '*.libaux' -o \
|
2012-04-05 02:57:36 +02:00
|
|
|
-name '*.out' -o \
|
|
|
|
-name '*.err' \
|
2012-04-05 04:21:09 +02:00
|
|
|
| xargs rm -rf
|
2012-04-05 02:57:36 +02:00
|
|
|
|
|
|
|
check: cleantestlibs cleantmptestlogs tidy all check-stage2
|
2012-10-30 21:24:25 +01:00
|
|
|
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
|
2012-04-04 22:40:50 +02:00
|
|
|
|
2012-07-26 00:39:46 +02:00
|
|
|
check-notidy: cleantestlibs cleantmptestlogs all check-stage2
|
2012-10-30 21:24:25 +01:00
|
|
|
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
|
2012-07-26 00:39:46 +02:00
|
|
|
|
2012-04-05 02:57:36 +02:00
|
|
|
check-full: cleantestlibs cleantmptestlogs tidy \
|
|
|
|
all check-stage1 check-stage2 check-stage3
|
2012-10-30 21:24:25 +01:00
|
|
|
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
|
2012-04-04 22:40:50 +02:00
|
|
|
|
2012-04-05 02:57:36 +02:00
|
|
|
check-test: cleantestlibs cleantmptestlogs all check-stage2-rfail
|
2012-10-30 21:24:25 +01:00
|
|
|
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
|
2011-05-11 18:37:23 +02:00
|
|
|
|
2012-06-01 21:28:01 +02:00
|
|
|
check-lite: cleantestlibs cleantmptestlogs rustc-stage2 \
|
|
|
|
check-stage2-core check-stage2-std check-stage2-rpass \
|
|
|
|
check-stage2-rfail check-stage2-cfail
|
2012-10-30 21:24:25 +01:00
|
|
|
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
|
2012-06-01 21:28:01 +02:00
|
|
|
|
2011-10-31 20:57:50 +01:00
|
|
|
# Run the tidy script in multiple parts to avoid huge 'echo' commands
|
2011-11-18 23:03:11 +01:00
|
|
|
ifdef CFG_NOTIDY
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
tidy:
|
2011-11-18 23:03:11 +01:00
|
|
|
else
|
2012-04-01 07:49:11 +02:00
|
|
|
|
|
|
|
ALL_CS := $(wildcard $(S)src/rt/*.cpp \
|
|
|
|
$(S)src/rt/*/*.cpp \
|
|
|
|
$(S)src/rt/*/*/*.cpp \
|
|
|
|
$(S)srcrustllvm/*.cpp)
|
|
|
|
ALL_CS := $(filter-out $(S)src/rt/bigint/bigint_ext.cpp \
|
|
|
|
$(S)src/rt/bigint/bigint_int.cpp \
|
2012-08-28 22:59:48 +02:00
|
|
|
$(S)src/rt/miniz.cpp \
|
2012-11-04 02:39:14 +01:00
|
|
|
$(S)src/rt/linenoise/linenoise.c \
|
2012-11-04 23:35:04 +01:00
|
|
|
$(S)src/rt/linenoise/utf8.c \
|
2012-04-01 07:49:11 +02:00
|
|
|
,$(ALL_CS))
|
|
|
|
ALL_HS := $(wildcard $(S)src/rt/*.h \
|
|
|
|
$(S)src/rt/*/*.h \
|
|
|
|
$(S)src/rt/*/*/*.h \
|
|
|
|
$(S)srcrustllvm/*.h)
|
|
|
|
ALL_HS := $(filter-out $(S)src/rt/vg/valgrind.h \
|
|
|
|
$(S)src/rt/vg/memcheck.h \
|
|
|
|
$(S)src/rt/uthash/uthash.h \
|
|
|
|
$(S)src/rt/uthash/utlist.h \
|
|
|
|
$(S)src/rt/msvc/typeof.h \
|
|
|
|
$(S)src/rt/msvc/stdint.h \
|
|
|
|
$(S)src/rt/msvc/inttypes.h \
|
|
|
|
$(S)src/rt/bigint/bigint.h \
|
2012-11-04 02:39:14 +01:00
|
|
|
$(S)src/rt/linenoise/linenoise.h \
|
2012-11-04 23:35:04 +01:00
|
|
|
$(S)src/rt/linenoise/utf8.h \
|
2012-04-01 07:49:11 +02:00
|
|
|
,$(ALL_HS))
|
|
|
|
|
2011-11-18 23:03:11 +01:00
|
|
|
tidy:
|
|
|
|
@$(call E, check: formatting)
|
2012-04-13 20:59:17 +02:00
|
|
|
$(Q)find $(S)src -name '*.r[sc]' \
|
2012-05-01 01:32:47 +02:00
|
|
|
| grep '^$(S)src/test' -v \
|
2012-10-29 21:10:54 +01:00
|
|
|
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
|
2012-04-13 20:59:17 +02:00
|
|
|
$(Q)find $(S)src/etc -name '*.py' \
|
2012-10-29 21:10:54 +01:00
|
|
|
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
|
2012-04-13 20:59:17 +02:00
|
|
|
$(Q)echo $(ALL_CS) \
|
2012-10-29 21:10:54 +01:00
|
|
|
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
|
2012-04-13 20:59:17 +02:00
|
|
|
$(Q)echo $(ALL_HS) \
|
2012-10-29 21:10:54 +01:00
|
|
|
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
|
2012-04-10 03:04:37 +02:00
|
|
|
|
2011-11-18 23:03:11 +01:00
|
|
|
endif
|
2011-06-30 00:12:02 +02:00
|
|
|
|
2012-01-21 03:05:07 +01:00
|
|
|
######################################################################
|
|
|
|
# Extracting tests for docs
|
|
|
|
######################################################################
|
|
|
|
|
2012-02-21 09:53:01 +01:00
|
|
|
EXTRACT_TESTS := "$(CFG_PYTHON)" $(S)src/etc/extract-tests.py
|
2012-01-21 03:05:07 +01:00
|
|
|
|
|
|
|
define DEF_DOC_TEST_HOST
|
|
|
|
|
|
|
|
doc-tutorial-extract$(1):
|
|
|
|
@$$(call E, extract: tutorial tests)
|
2012-03-19 22:57:51 +01:00
|
|
|
$$(Q)rm -f $(1)/test/doc-tutorial/*.rs
|
2012-01-21 03:05:07 +01:00
|
|
|
$$(Q)$$(EXTRACT_TESTS) $$(S)doc/tutorial.md $(1)/test/doc-tutorial
|
|
|
|
|
2012-09-16 03:06:20 +02:00
|
|
|
doc-tutorial-ffi-extract$(1):
|
|
|
|
@$$(call E, extract: tutorial-ffi tests)
|
|
|
|
$$(Q)rm -f $(1)/test/doc-tutorial-ffi/*.rs
|
|
|
|
$$(Q)$$(EXTRACT_TESTS) $$(S)doc/tutorial-ffi.md $(1)/test/doc-tutorial-ffi
|
|
|
|
|
|
|
|
doc-tutorial-macros-extract$(1):
|
|
|
|
@$$(call E, extract: tutorial-macros tests)
|
|
|
|
$$(Q)rm -f $(1)/test/doc-tutorial-macros/*.rs
|
|
|
|
$$(Q)$$(EXTRACT_TESTS) $$(S)doc/tutorial-macros.md $(1)/test/doc-tutorial-macros
|
|
|
|
|
|
|
|
doc-tutorial-borrowed-ptr-extract$(1):
|
|
|
|
@$$(call E, extract: tutorial-borrowed-ptr tests)
|
|
|
|
$$(Q)rm -f $(1)/test/doc-tutorial-borrowed-ptr/*.rs
|
|
|
|
$$(Q)$$(EXTRACT_TESTS) $$(S)doc/tutorial-borrowed-ptr.md $(1)/test/doc-tutorial-borrowed-ptr
|
|
|
|
|
2012-09-23 00:33:50 +02:00
|
|
|
doc-tutorial-tasks-extract$(1):
|
|
|
|
@$$(call E, extract: tutorial-tasks tests)
|
|
|
|
$$(Q)rm -f $(1)/test/doc-tutorial-tasks/*.rs
|
|
|
|
$$(Q)$$(EXTRACT_TESTS) $$(S)doc/tutorial-tasks.md $(1)/test/doc-tutorial-tasks
|
|
|
|
|
2012-03-21 00:49:12 +01:00
|
|
|
doc-ref-extract$(1):
|
|
|
|
@$$(call E, extract: ref tests)
|
|
|
|
$$(Q)rm -f $(1)/test/doc-ref/*.rs
|
|
|
|
$$(Q)$$(EXTRACT_TESTS) $$(S)doc/rust.md $(1)/test/doc-ref
|
|
|
|
|
2012-01-21 03:05:07 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach host,$(CFG_TARGET_TRIPLES), \
|
|
|
|
$(eval $(call DEF_DOC_TEST_HOST,$(host))))
|
|
|
|
|
2011-06-30 00:12:02 +02:00
|
|
|
######################################################################
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
# Rules for the test runners
|
2011-06-30 00:12:02 +02:00
|
|
|
######################################################################
|
|
|
|
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
define TEST_STAGEN
|
2011-06-30 00:12:02 +02:00
|
|
|
|
2011-10-03 02:37:50 +02:00
|
|
|
# All the per-stage build rules you might want to call from the
|
2011-11-11 07:16:07 +01:00
|
|
|
# command line.
|
|
|
|
#
|
|
|
|
# $(1) is the stage number
|
2011-11-21 22:11:40 +01:00
|
|
|
# $(2) is the target triple to test
|
|
|
|
# $(3) is the host triple to test
|
2011-08-01 21:12:50 +02:00
|
|
|
|
2012-04-24 22:30:00 +02:00
|
|
|
# Prerequisites for compiletest tests
|
|
|
|
TEST_SREQ$(1)_T_$(2)_H_$(3) = \
|
|
|
|
$$(HBIN$(1)_H_$(3))/compiletest$$(X) \
|
2012-06-02 07:16:58 +02:00
|
|
|
$$(SREQ$(1)_T_$(2)_H_$(3))
|
2012-04-24 22:30:00 +02:00
|
|
|
|
2012-06-02 01:01:53 +02:00
|
|
|
# Prerequisites for compiletest tests that have deps on librustc, etc
|
|
|
|
FULL_TEST_SREQ$(1)_T_$(2)_H_$(3) = \
|
|
|
|
$$(HBIN$(1)_H_$(3))/compiletest$$(X) \
|
2012-06-02 07:16:58 +02:00
|
|
|
$$(SREQ$(1)_T_$(2)_H_$(3)) \
|
2012-06-02 01:01:53 +02:00
|
|
|
$$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3))
|
2012-04-24 22:30:00 +02:00
|
|
|
|
2012-08-29 23:32:54 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3): \
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rustc \
|
2012-04-05 02:57:36 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-core \
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-std \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rpass \
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rpass-full \
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rfail \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-cfail \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-bench \
|
2012-04-05 02:57:36 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rustdoc \
|
2012-10-30 02:08:36 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rusti \
|
2012-06-03 06:30:26 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-cargo \
|
2012-04-05 02:57:36 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial \
|
2012-09-16 03:06:20 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-ffi \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-macros \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-borrowed-ptr \
|
2012-09-23 00:33:50 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-tasks \
|
2012-04-05 02:57:36 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-ref
|
2011-06-30 00:12:02 +02:00
|
|
|
|
2012-01-18 01:45:22 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-core: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-core-dummy
|
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-std: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-std-dummy
|
2011-06-30 00:12:02 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rustc: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rustc-dummy
|
2011-06-30 00:12:02 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-cfail: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-cfail-dummy
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rfail: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rfail-dummy
|
2011-06-25 21:23:27 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rpass: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rpass-dummy
|
2011-06-16 21:06:09 +02:00
|
|
|
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rpass-full: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-dummy
|
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-bench: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-bench-dummy
|
2011-06-16 21:06:09 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-perf: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-perf-dummy
|
2011-06-16 21:06:09 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass \
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full \
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-bench \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-dummy
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-dummy
|
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-dummy
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-bench: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-bench-dummy
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-dummy
|
2011-07-12 22:04:29 +02:00
|
|
|
|
2012-01-16 02:34:18 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rustdoc: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rustdoc-dummy
|
|
|
|
|
2012-10-03 03:15:02 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rusti: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rusti-dummy
|
|
|
|
|
2012-06-03 06:30:26 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-cargo: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-cargo-dummy
|
|
|
|
|
2012-01-21 03:05:07 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-dummy
|
|
|
|
|
2012-09-16 03:06:20 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-ffi: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-ffi-dummy
|
|
|
|
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-macros: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-macros-dummy
|
|
|
|
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-borrowed-ptr: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-borrowed-ptr-dummy
|
|
|
|
|
2012-09-23 00:33:50 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-tasks: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-tasks-dummy
|
|
|
|
|
2012-03-21 00:49:12 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-ref: \
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-ref-dummy
|
|
|
|
|
2012-01-18 01:45:22 +01:00
|
|
|
# Rules for the core library test runner
|
|
|
|
|
|
|
|
$(3)/test/coretest.stage$(1)-$(2)$$(X): \
|
|
|
|
$$(CORELIB_CRATE) $$(CORELIB_INPUTS) \
|
|
|
|
$$(SREQ$(1)_T_$(2)_H_$(3))
|
|
|
|
@$$(call E, compile_and_link: $$@)
|
2012-01-27 05:30:41 +01:00
|
|
|
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
|
2012-01-18 01:45:22 +01:00
|
|
|
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-core-dummy: \
|
|
|
|
$(3)/test/coretest.stage$(1)-$(2)$$(X)
|
|
|
|
@$$(call E, run: $$<)
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-core.log
|
2012-01-18 01:45:22 +01:00
|
|
|
|
2011-10-03 02:37:50 +02:00
|
|
|
# Rules for the standard library test runner
|
2011-07-06 23:33:36 +02:00
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$(3)/test/stdtest.stage$(1)-$(2)$$(X): \
|
2012-01-18 04:05:07 +01:00
|
|
|
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(SREQ$(1)_T_$(2)_H_$(3))
|
2011-10-03 02:37:50 +02:00
|
|
|
@$$(call E, compile_and_link: $$@)
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
|
2011-07-12 22:04:29 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-std-dummy: \
|
2011-11-21 22:11:40 +01:00
|
|
|
$(3)/test/stdtest.stage$(1)-$(2)$$(X)
|
2011-10-03 02:37:50 +02:00
|
|
|
@$$(call E, run: $$<)
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-std.log
|
2011-07-12 22:04:29 +02:00
|
|
|
|
2011-10-03 02:37:50 +02:00
|
|
|
# Rules for the rustc test runner
|
2011-08-01 20:57:05 +02:00
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$(3)/test/rustctest.stage$(1)-$(2)$$(X): \
|
|
|
|
$$(COMPILER_CRATE) \
|
|
|
|
$$(COMPILER_INPUTS) \
|
|
|
|
$$(SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM)
|
2011-10-03 02:37:50 +02:00
|
|
|
@$$(call E, compile_and_link: $$@)
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
|
2011-08-01 20:57:05 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rustc-dummy: \
|
2011-11-21 22:11:40 +01:00
|
|
|
$(3)/test/rustctest.stage$(1)-$(2)$$(X)
|
2011-10-03 02:37:50 +02:00
|
|
|
@$$(call E, run: $$<)
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-rustc.log
|
2011-08-01 23:10:59 +02:00
|
|
|
|
2012-01-16 02:34:18 +01:00
|
|
|
# Rules for the rustdoc test runner
|
|
|
|
|
|
|
|
$(3)/test/rustdoctest.stage$(1)-$(2)$$(X): \
|
2012-10-22 23:50:16 +02:00
|
|
|
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
|
2012-01-16 02:34:18 +01:00
|
|
|
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
|
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
|
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
|
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
|
|
|
|
@$$(call E, compile_and_link: $$@)
|
|
|
|
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
|
|
|
|
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rustdoc-dummy: \
|
|
|
|
$(3)/test/rustdoctest.stage$(1)-$(2)$$(X)
|
|
|
|
@$$(call E, run: $$<)
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-rustdoc.log
|
2012-01-16 02:34:18 +01:00
|
|
|
|
2012-10-03 03:15:02 +02:00
|
|
|
# Rules for the rusti test runner
|
|
|
|
|
|
|
|
$(3)/test/rustitest.stage$(1)-$(2)$$(X): \
|
2012-11-05 02:25:46 +01:00
|
|
|
$$(RUSTI_LIB) $$(RUSTI_INPUTS) \
|
2012-10-03 03:15:02 +02:00
|
|
|
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
|
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
|
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
|
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
|
|
|
|
@$$(call E, compile_and_link: $$@)
|
|
|
|
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
|
|
|
|
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rusti-dummy: \
|
|
|
|
$(3)/test/rustitest.stage$(1)-$(2)$$(X)
|
|
|
|
@$$(call E, run: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-rusti.log
|
|
|
|
|
2012-10-30 02:08:36 +01:00
|
|
|
|
2012-06-03 06:30:26 +02:00
|
|
|
# Rules for the cargo test runner
|
|
|
|
|
|
|
|
$(3)/test/cargotest.stage$(1)-$(2)$$(X): \
|
2012-10-22 23:50:16 +02:00
|
|
|
$$(CARGO_LIB) $$(CARGO_INPUTS) \
|
2012-06-03 06:30:26 +02:00
|
|
|
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
|
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
|
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
|
|
|
|
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
|
|
|
|
@$$(call E, compile_and_link: $$@)
|
|
|
|
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
|
|
|
|
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-cargo-dummy: \
|
|
|
|
$(3)/test/cargotest.stage$(1)-$(2)$$(X)
|
|
|
|
@$$(call E, run: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-cargo.log
|
|
|
|
|
2011-10-03 02:37:50 +02:00
|
|
|
# Rules for the cfail/rfail/rpass/bench/perf test runner
|
2011-08-01 23:10:59 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-21 22:11:40 +01:00
|
|
|
--compile-lib-path $$(HLIB$(1)_H_$(3)) \
|
|
|
|
--run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
|
|
|
|
--rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X) \
|
2012-02-28 15:45:33 +01:00
|
|
|
--aux-base $$(S)src/test/auxiliary/ \
|
2011-11-21 22:11:40 +01:00
|
|
|
--stage-id stage$(1)-$(2) \
|
2012-03-06 15:58:31 +01:00
|
|
|
--rustcflags "$$(CFG_RUSTC_FLAGS) --target=$(2)" \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(CTEST_TESTARGS)
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
CFAIL_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/compile-fail/ \
|
2011-11-24 00:20:28 +01:00
|
|
|
--build-base $(3)/test/compile-fail/ \
|
2011-11-21 22:11:40 +01:00
|
|
|
--mode compile-fail
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
RFAIL_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/run-fail/ \
|
2011-11-24 00:20:28 +01:00
|
|
|
--build-base $(3)/test/run-fail/ \
|
2011-11-22 07:45:14 +01:00
|
|
|
--mode run-fail \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(CTEST_RUNTOOL)
|
|
|
|
|
2011-11-29 16:07:25 +01:00
|
|
|
RPASS_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/run-pass/ \
|
2011-11-24 00:20:28 +01:00
|
|
|
--build-base $(3)/test/run-pass/ \
|
2011-11-29 16:07:25 +01:00
|
|
|
--mode run-pass \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(CTEST_RUNTOOL)
|
|
|
|
|
2012-06-02 01:01:53 +02:00
|
|
|
RPASS_FULL_ARGS$(1)-T-$(2)-H-$(3) := \
|
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/run-pass-fulldeps/ \
|
|
|
|
--build-base $(3)/test/run-pass-fulldeps/ \
|
|
|
|
--mode run-pass \
|
|
|
|
$$(CTEST_RUNTOOL)
|
|
|
|
|
2011-11-29 16:07:25 +01:00
|
|
|
BENCH_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/bench/ \
|
2011-11-24 00:20:28 +01:00
|
|
|
--build-base $(3)/test/bench/ \
|
2011-11-29 16:07:25 +01:00
|
|
|
--mode run-pass \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(CTEST_RUNTOOL)
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
PERF_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/bench/ \
|
2011-11-24 00:20:28 +01:00
|
|
|
--build-base $(3)/test/perf/ \
|
2011-11-22 07:45:14 +01:00
|
|
|
--mode run-pass \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(CTEST_PERF_RUNTOOL)
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
PRETTY_RPASS_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/run-pass/ \
|
2011-11-24 00:20:28 +01:00
|
|
|
--build-base $(3)/test/run-pass/ \
|
2011-11-22 07:45:14 +01:00
|
|
|
--mode pretty
|
|
|
|
|
2012-06-02 01:01:53 +02:00
|
|
|
PRETTY_RPASS_FULL_ARGS$(1)-T-$(2)-H-$(3) := \
|
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/run-pass-fulldeps/ \
|
|
|
|
--build-base $(3)/test/run-pass-fulldeps/ \
|
|
|
|
--mode pretty
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
PRETTY_RFAIL_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/run-fail/ \
|
2011-11-24 00:20:28 +01:00
|
|
|
--build-base $(3)/test/run-fail/ \
|
2011-11-22 07:45:14 +01:00
|
|
|
--mode pretty
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
PRETTY_BENCH_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/bench/ \
|
2011-11-24 00:20:28 +01:00
|
|
|
--build-base $(3)/test/bench/ \
|
2011-11-22 07:45:14 +01:00
|
|
|
--mode pretty
|
|
|
|
|
2011-11-24 00:20:28 +01:00
|
|
|
PRETTY_PRETTY_ARGS$(1)-T-$(2)-H-$(3) := \
|
2011-11-22 07:45:14 +01:00
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $$(S)src/test/pretty/ \
|
2011-11-24 00:20:28 +01:00
|
|
|
--build-base $(3)/test/pretty/ \
|
2011-11-22 07:45:14 +01:00
|
|
|
--mode pretty
|
|
|
|
|
2012-01-21 03:05:07 +01:00
|
|
|
DOC_TUTORIAL_ARGS$(1)-T-$(2)-H-$(3) := \
|
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $(3)/test/doc-tutorial/ \
|
|
|
|
--build-base $(3)/test/doc-tutorial/ \
|
|
|
|
--mode run-pass
|
|
|
|
|
2012-09-16 03:06:20 +02:00
|
|
|
DOC_TUTORIAL_FFI_ARGS$(1)-T-$(2)-H-$(3) := \
|
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $(3)/test/doc-tutorial-ffi/ \
|
|
|
|
--build-base $(3)/test/doc-tutorial-ffi/ \
|
|
|
|
--mode run-pass
|
|
|
|
|
|
|
|
DOC_TUTORIAL_MACROS_ARGS$(1)-T-$(2)-H-$(3) := \
|
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $(3)/test/doc-tutorial-macros/ \
|
|
|
|
--build-base $(3)/test/doc-tutorial-macros/ \
|
|
|
|
--mode run-pass
|
|
|
|
|
|
|
|
DOC_TUTORIAL_BORROWED_PTR_ARGS$(1)-T-$(2)-H-$(3) := \
|
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $(3)/test/doc-tutorial-borrowed-ptr/ \
|
|
|
|
--build-base $(3)/test/doc-tutorial-borrowed-ptr/ \
|
|
|
|
--mode run-pass
|
|
|
|
|
2012-09-23 00:33:50 +02:00
|
|
|
DOC_TUTORIAL_TASKS_ARGS$(1)-T-$(2)-H-$(3) := \
|
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $(3)/test/doc-tutorial-tasks/ \
|
|
|
|
--build-base $(3)/test/doc-tutorial-tasks/ \
|
|
|
|
--mode run-pass
|
|
|
|
|
2012-03-21 00:49:12 +01:00
|
|
|
DOC_REF_ARGS$(1)-T-$(2)-H-$(3) := \
|
|
|
|
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--src-base $(3)/test/doc-ref/ \
|
|
|
|
--build-base $(3)/test/doc-ref/ \
|
|
|
|
--mode run-pass
|
|
|
|
|
2011-11-22 20:25:51 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-cfail-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-29 16:07:25 +01:00
|
|
|
$$(CFAIL_TESTS)
|
2011-11-22 20:25:51 +01:00
|
|
|
@$$(call E, run cfail: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(CFAIL_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-cfail.log
|
2011-07-13 00:27:00 +02:00
|
|
|
|
2011-11-22 20:25:51 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rfail-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-29 16:07:25 +01:00
|
|
|
$$(RFAIL_TESTS)
|
2011-11-22 20:25:51 +01:00
|
|
|
@$$(call E, run rfail: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(RFAIL_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-rfail.log
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
|
2011-11-22 20:25:51 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rpass-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-29 16:07:25 +01:00
|
|
|
$$(RPASS_TESTS)
|
2012-06-02 01:01:53 +02:00
|
|
|
@$$(call E, run rpass-full: $$<)
|
2011-11-22 20:25:51 +01:00
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(RPASS_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-rpass.log
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-dummy: \
|
|
|
|
$$(FULL_TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
|
|
|
$$(RPASS_FULL_TESTS)
|
|
|
|
@$$(call E, run rpass: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
|
|
|
$$(RPASS_FULL_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-rpass-full.log
|
|
|
|
|
2011-11-22 20:25:51 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-bench-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-29 16:07:25 +01:00
|
|
|
$$(BENCH_TESTS)
|
2011-11-22 20:25:51 +01:00
|
|
|
@$$(call E, run bench: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(BENCH_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-bench.log
|
2011-07-13 00:27:00 +02:00
|
|
|
|
2011-11-22 20:25:51 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-perf-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-29 20:06:08 +01:00
|
|
|
$$(BENCH_TESTS)
|
2011-09-14 00:06:21 +02:00
|
|
|
@$$(call E, perf: $$<)
|
2011-11-22 20:25:51 +01:00
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(PERF_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-perf.log
|
2011-09-14 00:06:21 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-29 16:07:25 +01:00
|
|
|
$$(RPASS_TESTS)
|
2011-11-22 20:25:51 +01:00
|
|
|
@$$(call E, run pretty-rpass: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(PRETTY_RPASS_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass.log
|
2011-08-01 20:57:05 +02:00
|
|
|
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-dummy: \
|
|
|
|
$$(FULL_TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
|
|
|
$$(RPASS_FULL_TESTS)
|
|
|
|
@$$(call E, run pretty-rpass-full: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
|
|
|
$$(PRETTY_RPASS_FULL_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full.log
|
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-29 16:07:25 +01:00
|
|
|
$$(RFAIL_TESTS)
|
2011-11-22 20:25:51 +01:00
|
|
|
@$$(call E, run pretty-rfail: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(PRETTY_RFAIL_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail.log
|
2011-08-01 20:57:05 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-bench-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-29 16:07:25 +01:00
|
|
|
$$(BENCH_TESTS)
|
2011-11-22 20:25:51 +01:00
|
|
|
@$$(call E, run pretty-bench: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(PRETTY_BENCH_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-pretty-bench.log
|
2011-08-02 23:37:03 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2011-11-29 16:07:25 +01:00
|
|
|
$$(PRETTY_TESTS)
|
2011-11-22 20:25:51 +01:00
|
|
|
@$$(call E, run pretty-pretty: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(PRETTY_PRETTY_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty.log
|
2011-07-31 06:44:30 +02:00
|
|
|
|
2012-01-21 03:05:07 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2012-01-21 03:05:07 +01:00
|
|
|
doc-tutorial-extract$(3)
|
|
|
|
@$$(call E, run doc-tutorial: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(DOC_TUTORIAL_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial.log
|
2012-01-21 03:05:07 +01:00
|
|
|
|
2012-09-16 03:06:20 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-ffi-dummy: \
|
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
|
|
|
doc-tutorial-ffi-extract$(3)
|
|
|
|
@$$(call E, run doc-tutorial-ffi: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
|
|
|
$$(DOC_TUTORIAL_FFI_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-ffi.log
|
|
|
|
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-macros-dummy: \
|
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
|
|
|
doc-tutorial-macros-extract$(3)
|
|
|
|
@$$(call E, run doc-tutorial-macros: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
|
|
|
$$(DOC_TUTORIAL_MACROS_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-macros.log
|
|
|
|
|
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-borrowed-ptr-dummy: \
|
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
|
|
|
doc-tutorial-borrowed-ptr-extract$(3)
|
|
|
|
@$$(call E, run doc-tutorial-borrowed-ptr: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
|
|
|
$$(DOC_TUTORIAL_BORROWED_PTR_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-borrowed-ptr.log
|
|
|
|
|
2012-09-23 00:33:50 +02:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-tasks-dummy: \
|
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
|
|
|
doc-tutorial-tasks-extract$(3)
|
|
|
|
@$$(call E, run doc-tutorial-tasks: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
|
|
|
$$(DOC_TUTORIAL_TASKS_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-doc-tutorial-tasks.log
|
|
|
|
|
2012-03-21 00:49:12 +01:00
|
|
|
check-stage$(1)-T-$(2)-H-$(3)-doc-ref-dummy: \
|
2012-04-24 22:30:00 +02:00
|
|
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
2012-03-21 00:49:12 +01:00
|
|
|
doc-ref-extract$(3)
|
|
|
|
@$$(call E, run doc-ref: $$<)
|
|
|
|
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(DOC_REF_ARGS$(1)-T-$(2)-H-$(3)) \
|
|
|
|
--logfile tmp/check-stage$(1)-T-$(2)-H-$(3)-doc-ref.log
|
2012-03-21 00:49:12 +01:00
|
|
|
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
endef
|
2011-07-13 00:27:00 +02:00
|
|
|
|
2011-07-30 03:35:32 +02:00
|
|
|
# Instantiate the template for stage 0, 1, 2, 3
|
2011-07-13 00:27:00 +02:00
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
$(foreach host,$(CFG_TARGET_TRIPLES), \
|
|
|
|
$(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
|
|
|
|
$(eval $(foreach stage,$(STAGES), \
|
|
|
|
$(eval $(call TEST_STAGEN,$(stage),$(target),$(host))))))))
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
|
2011-11-29 16:07:25 +01:00
|
|
|
######################################################################
|
|
|
|
# Fast-test rules
|
|
|
|
######################################################################
|
2011-11-17 21:04:37 +01:00
|
|
|
|
2012-02-17 22:38:19 +01:00
|
|
|
GENERATED += tmp/$(FT).rc tmp/$(FT_DRIVER).rs
|
2011-11-29 16:07:25 +01:00
|
|
|
|
2011-11-29 17:03:22 +01:00
|
|
|
tmp/$(FT).rc tmp/$(FT_DRIVER).rs: \
|
2012-02-17 22:38:19 +01:00
|
|
|
$(RPASS_TESTS) \
|
2011-11-29 17:03:22 +01:00
|
|
|
$(S)src/etc/combine-tests.py
|
|
|
|
@$(call E, check: building combined stage2 test runner)
|
|
|
|
$(Q)$(S)src/etc/combine-tests.py
|
2011-11-29 16:07:25 +01:00
|
|
|
|
|
|
|
define DEF_CHECK_FAST_FOR_T_H
|
|
|
|
# $(1) unused
|
|
|
|
# $(2) target triple
|
|
|
|
# $(3) host triple
|
|
|
|
|
|
|
|
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB): \
|
|
|
|
tmp/$$(FT).rc \
|
|
|
|
$$(SREQ2_T_$(2)_H_$(3))
|
|
|
|
@$$(call E, compile_and_link: $$@)
|
2011-11-29 17:03:22 +01:00
|
|
|
$$(STAGE2_T_$(2)_H_$(3)) --lib -o $$@ $$<
|
2011-11-29 16:07:25 +01:00
|
|
|
|
2011-11-29 17:03:22 +01:00
|
|
|
$(3)/test/$$(FT_DRIVER)-$(2)$$(X): \
|
|
|
|
tmp/$$(FT_DRIVER).rs \
|
|
|
|
$$(TLIB2_T_$(2)_H_$(3))/$$(FT_LIB) \
|
|
|
|
$$(SREQ2_T_$(2)_H_$(3))
|
|
|
|
@$$(call E, compile_and_link: $$@ $$<)
|
2012-04-06 07:24:46 +02:00
|
|
|
$$(STAGE2_T_$(2)_H_$(3)) -o $$@ $$<
|
2011-11-29 16:07:25 +01:00
|
|
|
|
2011-11-29 17:03:22 +01:00
|
|
|
$(3)/test/$$(FT_DRIVER)-$(2).out: \
|
|
|
|
$(3)/test/$$(FT_DRIVER)-$(2)$$(X) \
|
|
|
|
$$(SREQ2_T_$(2)_H_$(3))
|
2012-04-03 17:27:51 +02:00
|
|
|
$$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) \
|
|
|
|
--logfile tmp/$$(FT_DRIVER)-$(2).log
|
2011-11-29 16:07:25 +01:00
|
|
|
|
2012-08-29 23:32:54 +02:00
|
|
|
check-fast-T-$(2)-H-$(3): \
|
2011-11-29 16:07:25 +01:00
|
|
|
check-stage2-T-$(2)-H-$(3)-rustc \
|
2012-05-03 02:51:01 +02:00
|
|
|
check-stage2-T-$(2)-H-$(3)-core \
|
2011-11-29 16:07:25 +01:00
|
|
|
check-stage2-T-$(2)-H-$(3)-std \
|
2011-11-29 17:03:22 +01:00
|
|
|
$(3)/test/$$(FT_DRIVER)-$(2).out
|
2011-11-29 16:07:25 +01:00
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach host,$(CFG_TARGET_TRIPLES), \
|
|
|
|
$(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
|
|
|
|
$(eval $(call DEF_CHECK_FAST_FOR_T_H,,$(target),$(host))))))
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# Shortcut rules
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
define DEF_CHECK_FOR_STAGE_H
|
2011-11-17 21:04:37 +01:00
|
|
|
|
2011-11-30 00:37:33 +01:00
|
|
|
check-stage$(1)-H-$(2): \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2))
|
|
|
|
check-stage$(1)-H-$(2)-perf: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-perf)
|
|
|
|
check-stage$(1)-H-$(2)-rustc: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-rustc)
|
2012-01-18 01:45:22 +01:00
|
|
|
check-stage$(1)-H-$(2)-core: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-core)
|
2011-11-30 00:37:33 +01:00
|
|
|
check-stage$(1)-H-$(2)-std: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-std)
|
|
|
|
check-stage$(1)-H-$(2)-rpass: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-rpass)
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-H-$(2)-rpass-full: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-rpass-full)
|
2011-11-30 00:37:33 +01:00
|
|
|
check-stage$(1)-H-$(2)-rfail: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-rfail)
|
|
|
|
check-stage$(1)-H-$(2)-cfail: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-cfail)
|
|
|
|
check-stage$(1)-H-$(2)-bench: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-bench)
|
2012-01-13 23:47:42 +01:00
|
|
|
check-stage$(1)-H-$(2)-pretty: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-pretty)
|
|
|
|
check-stage$(1)-H-$(2)-pretty-rpass: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-pretty-rpass)
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-H-$(2)-pretty-rpass-full: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-pretty-rpass-full)
|
2012-01-13 23:47:42 +01:00
|
|
|
check-stage$(1)-H-$(2)-pretty-rfail: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-pretty-rfail)
|
|
|
|
check-stage$(1)-H-$(2)-pretty-bench: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-pretty-bench)
|
|
|
|
check-stage$(1)-H-$(2)-pretty-pretty: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-pretty-pretty)
|
2012-01-16 02:34:18 +01:00
|
|
|
check-stage$(1)-H-$(2)-rustdoc: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-rustdoc)
|
2012-10-03 03:15:02 +02:00
|
|
|
check-stage$(1)-H-$(2)-rusti: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-rusti)
|
2012-06-03 06:30:26 +02:00
|
|
|
check-stage$(1)-H-$(2)-cargo: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-cargo)
|
2012-01-21 03:05:07 +01:00
|
|
|
check-stage$(1)-H-$(2)-doc-tutorial: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-doc-tutorial)
|
2012-09-16 03:06:20 +02:00
|
|
|
check-stage$(1)-H-$(2)-doc-tutorial-ffi: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-doc-tutorial-ffi)
|
|
|
|
check-stage$(1)-H-$(2)-doc-tutorial-macros: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-doc-tutorial-macros)
|
|
|
|
check-stage$(1)-H-$(2)-doc-tutorial-borrowed-ptr: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-doc-tutorial-borrowed-ptr)
|
2012-09-23 00:33:50 +02:00
|
|
|
check-stage$(1)-H-$(2)-doc-tutorial-tasks: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-doc-tutorial-tasks)
|
2012-03-21 00:49:12 +01:00
|
|
|
check-stage$(1)-H-$(2)-doc-ref: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-T-$$(target)-H-$(2)-doc-ref)
|
2011-11-17 21:04:37 +01:00
|
|
|
|
|
|
|
endef
|
|
|
|
|
2011-11-29 16:07:25 +01:00
|
|
|
$(foreach stage,$(STAGES), \
|
2011-11-22 07:45:14 +01:00
|
|
|
$(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
|
2011-11-29 16:07:25 +01:00
|
|
|
$(eval $(call DEF_CHECK_FOR_STAGE_H,$(stage),$(target))))))
|
|
|
|
|
|
|
|
define DEF_CHECK_FAST_FOR_H
|
|
|
|
|
|
|
|
check-fast-H-$(1): check-fast-T-$(1)-H-$(1)
|
|
|
|
|
|
|
|
endef
|
2011-11-22 07:45:14 +01:00
|
|
|
|
2011-11-29 16:07:25 +01:00
|
|
|
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
|
|
|
$(eval $(call DEF_CHECK_FAST_FOR_H,$(target))))
|
|
|
|
|
2011-12-03 01:11:49 +01:00
|
|
|
define DEF_CHECK_ALL_FOR_STAGE
|
2011-11-22 07:45:14 +01:00
|
|
|
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-H-all: \
|
2011-11-30 00:37:33 +01:00
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target))
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-H-all-perf: \
|
2011-11-30 00:37:33 +01:00
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-perf)
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-H-all-rustc: \
|
2011-11-30 00:37:33 +01:00
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-rustc)
|
2012-01-18 01:45:22 +01:00
|
|
|
check-stage$(1)-H-all-core: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-core)
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-H-all-std: \
|
2011-11-30 00:37:33 +01:00
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-std)
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-H-all-rpass: \
|
2011-11-30 00:37:33 +01:00
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-rpass)
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-H-all-rpass-full: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-rpass-full)
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-H-all-rfail: \
|
2011-11-30 00:37:33 +01:00
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-rfail)
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-H-all-cfail: \
|
2011-11-30 00:37:33 +01:00
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-cfail)
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-H-all-bench: \
|
2011-11-30 00:37:33 +01:00
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-bench)
|
2012-01-13 23:47:42 +01:00
|
|
|
check-stage$(1)-H-all-pretty: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-pretty)
|
|
|
|
check-stage$(1)-H-all-pretty-rpass: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-pretty-rpass)
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-H-all-pretty-rpass-full: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-pretty-rpass-full)
|
2012-01-13 23:47:42 +01:00
|
|
|
check-stage$(1)-H-all-pretty-rfail: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-pretty-rfail)
|
|
|
|
check-stage$(1)-H-all-pretty-bench: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-pretty-bench)
|
|
|
|
check-stage$(1)-H-all-pretty-pretty: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-pretty-pretty)
|
2012-01-16 02:34:18 +01:00
|
|
|
check-stage$(1)-H-all-rustdoc: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-rustdoc)
|
2012-11-05 02:17:04 +01:00
|
|
|
check-stage$(1)-H-all-rusti: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-rusti)
|
2012-06-03 06:30:26 +02:00
|
|
|
check-stage$(1)-H-all-cargo: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-cargo)
|
2012-01-21 03:05:07 +01:00
|
|
|
check-stage$(1)-H-all-doc-tutorial: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-doc-tutorial)
|
2012-03-21 00:49:12 +01:00
|
|
|
check-stage$(1)-H-all-doc-ref: \
|
|
|
|
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
|
|
|
|
check-stage$(1)-H-$$(target)-doc-ref)
|
2011-11-22 07:45:14 +01:00
|
|
|
|
|
|
|
endef
|
2011-11-17 21:04:37 +01:00
|
|
|
|
2011-12-03 01:11:49 +01:00
|
|
|
$(foreach stage,$(STAGES), \
|
2011-12-04 05:23:54 +01:00
|
|
|
$(eval $(call DEF_CHECK_ALL_FOR_STAGE,$(stage))))
|
2011-12-03 01:11:49 +01:00
|
|
|
|
|
|
|
define DEF_CHECK_FOR_STAGE
|
|
|
|
|
|
|
|
check-stage$(1): check-stage$(1)-H-$$(CFG_HOST_TRIPLE)
|
|
|
|
check-stage$(1)-perf: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-perf
|
|
|
|
check-stage$(1)-rustc: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rustc
|
2012-01-18 01:45:22 +01:00
|
|
|
check-stage$(1)-core: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-core
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-std: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-std
|
|
|
|
check-stage$(1)-rpass: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rpass
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-rpass-full: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rpass-full
|
2011-12-03 01:11:49 +01:00
|
|
|
check-stage$(1)-rfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rfail
|
|
|
|
check-stage$(1)-cfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-cfail
|
|
|
|
check-stage$(1)-bench: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-bench
|
2012-01-13 23:47:42 +01:00
|
|
|
check-stage$(1)-pretty: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty
|
|
|
|
check-stage$(1)-pretty-rpass: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-rpass
|
2012-06-02 01:01:53 +02:00
|
|
|
check-stage$(1)-pretty-rpass-full: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-rpass-full
|
2012-01-13 23:47:42 +01:00
|
|
|
check-stage$(1)-pretty-rfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-rfail
|
|
|
|
check-stage$(1)-pretty-bench: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-bench
|
|
|
|
check-stage$(1)-pretty-pretty: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-pretty-pretty
|
2012-01-16 02:34:18 +01:00
|
|
|
check-stage$(1)-rustdoc: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rustdoc
|
2012-11-05 02:17:04 +01:00
|
|
|
check-stage$(1)-rusti: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rusti
|
2012-06-03 06:30:26 +02:00
|
|
|
check-stage$(1)-cargo: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-cargo
|
2012-01-21 03:05:07 +01:00
|
|
|
check-stage$(1)-doc-tutorial: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-doc-tutorial
|
2012-09-16 03:06:20 +02:00
|
|
|
check-stage$(1)-doc-tutorial-ffi: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-doc-tutorial-ffi
|
|
|
|
check-stage$(1)-doc-tutorial-macros: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-doc-tutorial-macros
|
|
|
|
check-stage$(1)-doc-tutorial-borrowed-ptr: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-doc-tutorial-borrowed-ptr
|
2012-09-23 00:33:50 +02:00
|
|
|
check-stage$(1)-doc-tutorial-tasks: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-doc-tutorial-tasks
|
2012-03-21 00:49:12 +01:00
|
|
|
check-stage$(1)-doc-ref: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-doc-ref
|
2011-12-03 01:11:49 +01:00
|
|
|
|
|
|
|
endef
|
|
|
|
|
2011-11-22 07:45:14 +01:00
|
|
|
$(foreach stage,$(STAGES), \
|
2011-11-29 16:07:25 +01:00
|
|
|
$(eval $(call DEF_CHECK_FOR_STAGE,$(stage))))
|
The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.
A few main things happen here:
1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.
2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.
3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.
4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.
It adds two new features to the cfail/rfail/rpass/bench tests:
1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.
2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.
There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.
Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.
This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-13 04:01:09 +02:00
|
|
|
|
2012-08-29 23:32:54 +02:00
|
|
|
check-fast: tidy check-fast-H-$(CFG_HOST_TRIPLE)
|