Add a stdtest crate to hold the standard library tests
This will link to std and compile with the --test flag. Eventually the run-pass/lib* tests will move here. We could also put the std tests directly into the library and compile both a library version and a test version, but I think this way will make for faster builds. Issue #428
This commit is contained in:
parent
b06ccb45ab
commit
2f7bc90514
3
configure
vendored
3
configure
vendored
@ -182,7 +182,8 @@ for i in \
|
||||
dl stage0 stage1 stage2 stage3 \
|
||||
stage0/lib stage1/lib stage2/lib stage3/lib \
|
||||
test/run-pass test/run-fail test/compile-fail \
|
||||
test/bench/99-bottles test/bench/shootout
|
||||
test/bench/99-bottles test/bench/shootout \
|
||||
test/stdtest
|
||||
do
|
||||
make_dir $i
|
||||
done
|
||||
|
@ -337,3 +337,10 @@ test/compile-fail/%.stage2.out.tmp: test/compile-fail/%.rc $(SREQ2)
|
||||
$(STAGE2) -c -o $(@:.o=$(X)) $< >$@ 2>&1; test $$? -ne 0
|
||||
$(Q)grep --text --quiet \
|
||||
"$$(grep error-pattern $< | cut -d : -f 2- | tr -d '\n\r')" $@
|
||||
|
||||
STDTEST_CRATE := $(S)src/test/stdtest/stdtest.rc
|
||||
STDTEST_INPUTS := $(wildcard $(S)src/test/stdtest/*rs)
|
||||
|
||||
test/stdtest/stdtest.stage1$(X): $(STDTEST_CRATE) $(STDTEST_INPUTS) $(SREQ1)
|
||||
@$(call E, compile_and_link: $@)
|
||||
$(STAGE1) -o $@ $< --test
|
||||
|
10
src/test/stdtest/stdtest.rc
Normal file
10
src/test/stdtest/stdtest.rc
Normal file
@ -0,0 +1,10 @@
|
||||
use std;
|
||||
|
||||
// Local Variables:
|
||||
// mode: rust
|
||||
// fill-column: 78;
|
||||
// indent-tabs-mode: nil
|
||||
// c-basic-offset: 4
|
||||
// buffer-file-coding-system: utf-8-unix
|
||||
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
||||
// End:
|
Loading…
Reference in New Issue
Block a user