Commit Graph

50 Commits

Author SHA1 Message Date
Brian Anderson 3a6f3cf275 Move compiletest to src/ and cleanup build rules 2011-10-02 17:28:59 -07:00
Brian Anderson 821dd6c02c Change the directory for target libs
This pushes them down from stageN/lib/rustc/$(target) to
stageN/lib/rustc/$(target)/lib in order to make room for a target bin dir
2011-09-30 17:19:24 -07:00
Brian Anderson f634eb2bfd Make config of static stdlib more consistent with rest of makefile
I haven't tested if it actually works. Static stdlib is probably becoming
bitrotted.
2011-09-30 16:18:19 -07:00
Brian Anderson 38c67a4c8d Abstract the build directories further in the makefiles
This defines variables for host bin and lib directories as well as all target
bin and lib directories then uses them everywhere.
2011-09-30 16:18:19 -07:00
Brian Anderson ed106dd6ea Fix some make variables in tests.mk 2011-09-30 16:18:19 -07:00
Brian Anderson 80829af872 Remove legacy library search paths 2011-09-29 23:12:31 -07:00
Brian Anderson 6306c81826 Fix a variety of things in the makefiles
Make tests and perf work again. Correctly get the host triple in rustc. Add
some FIXMEs about transitional code that needs to be removed.
2011-09-29 22:58:33 -07:00
Brian Anderson ab8338fb5a Make rustc's host triple agree with the build system's 2011-09-29 22:58:33 -07:00
Brian Anderson 0148daa058 Reorganize structure of build directory
Each stage is organized more according to Unix standards and to
accommodate multiple target architectures.

stageN/
  bin - rustc lives here
  lib - libraries that rustc needs
  lib/rustc/$(target_triple/ - target libraries
2011-09-29 22:58:33 -07:00
Brian Anderson acb0e8dcad Don't pipe check-fast results through tee
This was having the effect of scrubbing failure error codes. The only affect
of removing this should be that the .out file isn't generated, so subsequent
make invocations will re-run the tests (which is how our other tests work
anyway).
2011-09-23 12:30:35 -07:00
Graydon Hoare d5b2d62b20 Add build-system mechanisms for running benchmarks under 'perf'. 2011-09-13 15:06:41 -07:00
Brian Anderson 40ae704ff2 Begin valgrinding run-fail tests
Introduce a temporary no-valgrind directive for the few that aren't clean
2011-08-10 13:36:57 -07:00
Brian Anderson ea2a968146 Include benchmarks in pretty-print tests 2011-08-02 14:37:03 -07:00
Brian Anderson 091a2c2f71 Run pretty-printer tests as part of make check. Issue #789 2011-08-02 10:39:14 -07:00
Brian Anderson 0fbb6782bb Add dedicated pretty-printer tests with new pp-exact directive
Add a new src/test/pretty directory to hold just source files for testing the
pretty-printer.

Add a new pp-exact directive. When this directive is followed by a file name
it specifies a file containing the output that the pretty-printer should
generate. When pp-exact is not followed by a filename it says that the file
should pretty-print as written.
2011-08-02 10:39:13 -07:00
Brian Anderson eea888af25 Add missing BENCH_TESTS variable to tests.mk 2011-08-02 10:39:13 -07:00
Brian Anderson 07950c8851 Add a FIXME about simplifying the make check rules 2011-08-02 10:39:13 -07:00
Brian Anderson e13390a199 Pretty-print test the rfail tests. Issue #789 2011-08-02 10:39:13 -07:00
Brian Anderson 59691b084f Don't run the compiletest runner itself under valgrind
This will reduce the valgrind deluge when a test fails. The tests themselves
are still run under valgrind. Leave a CTEST_VALGRIND environment variable for
running with the old behavior.
2011-08-02 10:39:13 -07:00
Brian Anderson 4e8ab8b3a8 Introduce pretty-print testing mode to compiletest. Issue #789 2011-08-02 10:39:12 -07:00
Brian Anderson 4e6bb137fe Enable build targets to run tests at stage0
This allows quicker turnaround for testing the standard library, since you
don't have to wait for the stage1 compiler every time.
2011-07-29 19:03:17 -07:00
Brian Anderson 9a995b0d25 Fix a typo in tests.mk that was building stdtest with the wrong compiler 2011-07-29 19:03:17 -07:00
Brian Anderson 2573fe7026 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-24 15:34:34 -07:00
Rafael Ávila de Espíndola ea371a3d37 Cleanup the library path now that we copy from stageN/lib to stageN+1/ 2011-07-21 15:12:10 -04:00
Graydon Hoare 1ba53c008a Fix check target names in tests.mk. 2011-07-13 13:13:44 -07:00
Brian Anderson ae7b757ac9 Add build targets for building rustc as a test runner. Issue #428 2011-07-12 16:54:46 -07:00
Brian Anderson a38ba01fa4 Move stdtest output files up a directory. Issue #428 2011-07-12 16:54:46 -07:00
Brian Anderson 9a37308101 Add build targets for running stdtest. Issue #428 2011-07-12 16:54:46 -07:00
Rafael Ávila de Espíndola bbcbaa6601 Try to fix the bots. 2011-07-07 15:28:01 -04:00
Brian Anderson 2f7bc90514 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
2011-07-06 14:39:40 -07:00
Brian Anderson 6853e04fc4 Temporarily introduce a stage2-check build target
The tinderbox snapshotting scripts seem to be looking for a stage2-check
target when they should be using check-stage2. Since Graydon is out of the
office, I'm making this change to see if the snapshot will go through.
2011-07-05 12:57:26 -07:00
Graydon Hoare afabde19dc More fixes to fast-check. 2011-06-29 17:54:05 -07:00
Graydon Hoare 4e5d32e1c4 Add fast-check target that combines the stage2 run-pass suite into a single executable. 2011-06-29 15:14:55 -07:00
Graydon Hoare 5059c5f8fd Actually notice xfail-stage2 as different from xfail-stage2. Fix affected tests. 2011-06-28 17:36:51 -07:00
Graydon Hoare 79ba31504b Fixes to speed and clean up makefiles. 2011-06-25 19:23:32 +00:00
Brian Anderson fc12577fdd Add makefile rules to run compile-fail tests on .rc files
There's even more duplication now, but I'm reluctant to touch it since it's
easy to subtly break the build rules
2011-06-16 17:23:20 -07:00
Rafael Ávila de Espíndola 346f1a6769 More driver related cleanups. 2011-06-16 15:06:09 -04:00
Rafael Ávila de Espíndola c3015b8952 Apply the makefile changes again, this time fixin the driver to not produce a
rustc.exe.exe.
2011-06-14 17:51:31 -04:00
Rafael Ávila de Espíndola 7b5c3afae5 Revert part of my last change while I figure out why windows doesn't like it. 2011-06-14 15:55:51 -04:00
Rafael Ávila de Espíndola 8d7f7c2a97 Move a bit more to use the driver. 2011-06-14 14:49:18 -04:00
Rafael Ávila de Espíndola 2c16be424b Use main.o directly now that stage0 is ok with it. 2011-06-08 13:33:35 -04:00
Rafael Ávila de Espíndola b1d6f12a05 Don't put a copy of main (the C one) in each binary we produce. This is a step
in getting a driver that works on all linux systems.

Sorry for the linker hacks, I will remove them after snapshotting a new compiler.
2011-06-07 16:56:27 -04:00
Brian Anderson e3b3a71e6a Don't fiddle with RUST_LOG in the Makefiles
This is no longer necessary since error logging is not affected by RUST_LOG.
2011-05-27 17:01:15 -04:00
Brian Anderson 70106f35ce test: Fix run-fail testing and bring tests up to date
A typo in the Makefile was causing these to not run. Happily, a lot of these
tests pass, so un-xfailed.
2011-05-24 22:09:12 -04:00
Graydon Hoare c787d6d4f3 Change 'check' make target to just stage2 tests; add full-check for all of them. 2011-05-11 09:37:23 -07:00
Patrick Walton 269550f673 build: Use clang to compile the runtime if available 2011-05-08 21:10:43 -07:00
Graydon Hoare add7d34164 Add stage-specific test targets (make check-stage1 etc.) 2011-05-04 17:32:35 -07:00
Graydon Hoare 48021ef1f6 Fix horrible rule-hijacking bug that was causing compile-fail targets to trigger honest compile attempts. 2011-05-04 11:21:14 -07:00
Graydon Hoare 4f52ab52c1 Remove everything to do with rustboot from makefiles. 2011-05-03 15:56:00 -07:00
Graydon Hoare 40624e35d7 Start splitting up Makefile.in 2011-05-01 20:20:25 +00:00