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
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
$(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
--- /dev/null
+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: