Commit Graph

97 Commits

Author SHA1 Message Date
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
Graydon Hoare ad954fcecc Add an NSIS script for building a win32 installer. Closes #522. 2011-07-23 12:27:06 -07:00
Eric Holk 8f2254b8c2 Update configure script to make the task-perf output directory. 2011-07-22 18:45:34 -07:00
Rafael Ávila de Espíndola 88894b6f9c Add support for building with a static libstd for testing static crate support. 2011-07-20 16:02:36 -04:00
Brian Anderson a38ba01fa4 Move stdtest output files up a directory. Issue #428 2011-07-12 16:54:46 -07: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
Graydon Hoare 8fc51dfc65 Some work on reviving the mingw-cross build. Not working yet. 2011-06-27 11:53:28 -07:00
Brian Anderson 59c76a371f Move creation of stageN/lib directories to the configure script 2011-06-17 18:36:44 -07:00
Eric Holk d1857d30fc This is the mega-ucontext commit. It replaces the task switching mechanism with a new one inspired by ucontext. It works under Linux, OS X and Windows, and is Valgrind clean on Linux and OS X (provided the runtime is built with gcc).
This commit also moves yield and join to the standard library, as requested in #42. Join is currently a no-op though.
2011-06-13 18:14:13 -07:00
Graydon Hoare 0a8f9a394b Handle missing git in build env. 2011-06-13 14:45:49 -07:00
Eric Holk 193c1fac4c Enabling valgrind on OSX. It appears to work now. 2011-05-27 16:58:11 -07:00
Erick Tryzelaar 7341055b84 Make sure we're using clang >=3.0svn. 2011-05-20 12:32:44 -07:00
Erick Tryzelaar 134b61a317 Use CFG_LLVM_ROOT's llvm-config if it exists.
On some platform (OS X), llvm needs macros like
__STDC_LIMIT_MACROS defined in order to work, which is
normally defined in llvm-config. This patch modifies
the config to use CFG_LLVM_ROOT's llvm-config if it
exists, which fixes the compile failures.
2011-05-20 12:32:44 -07:00
Graydon Hoare 6a4a85f452 Re-export CFG_LLVM_ROOT to reconfiguring. 2011-05-18 12:00:33 -07:00
Graydon Hoare 6997adf763 Remove rustboot from the repository. 2011-05-13 18:38:28 -07:00
Graydon Hoare ae784df3ce Add support for 'T' transition snapshots, which are identical to S snapshots except they tell the makefile to stop at stage1. 2011-05-13 17:06:58 -07:00
Patrick Walton 11d22debef build: Search for clang++. Tinderboxes don't have it. 2011-05-09 10:16:56 -07:00
Patrick Walton 269550f673 build: Use clang to compile the runtime if available 2011-05-08 21:10:43 -07:00
Patrick Walton f8514d95d0 build: `uname -m` is a lie on 64-bit Darwin. Add a workaround. 2011-05-08 21:10:42 -07:00
Patrick Walton 518e2d249c build: Disable valgrind by default on the Mac. Our suppressions file doesn't even begin to cover the huge stream of errors that dyld generates. 2011-05-05 18:11:40 -07:00
Ralph Giles 0b2cfcaab9 Make ocamlc and optional dependency.
Since moving to a downloadable snapshot for stage0, it's been
possible to complete the build without compiling code written
in ocaml. However, the configure script still required it to
be present.

This commit changes detection failure to a non-fatal condition,
allowing the build to complete on systems without an ocaml
compiler.

An info message is also made conditional.
2011-05-05 11:02:16 -07:00
Patrick Walton 1299e74db3 build: Whitespace police in configure. Puts out burning tinderbox. 2011-05-04 19:14:19 -07:00
Patrick Walton 04f966f0bc build: Build intrinsics.bc 2011-05-04 18:29:08 -07:00
Graydon Hoare dbe5dc9768 Attempt to shift build to stage0-from-snapshots. 2011-05-03 11:34:44 -07:00
Graydon Hoare 73ba2dd4c7 Shift stages around; stage0/rustc depends on stage0/libstd.so. 2011-04-30 18:44:34 +00:00
Graydon Hoare cae703c0b1 Add support for --disable-optimize 2011-04-08 15:49:14 -07:00
Graydon Hoare 94731fa458 Add support for --enable-foo and --disable-foo flags to configure, that Makefile.in respects. 2011-03-30 04:45:09 +00:00
Graydon Hoare 10f336055c Auto-reconfigure on Makefile.in or configure change. 2011-03-25 10:29:45 -07:00
Graydon Hoare 9b617dab3c More bandaids for win32. 2011-03-23 16:30:26 -07:00
Patrick Walton 865a2812b6 build: Fix minor typo in "cp" output 2011-03-23 15:55:58 -07:00
Graydon Hoare e6969929db More miserable win32 configury fixes. Getting closer. 2011-03-23 14:35:28 -07:00
Graydon Hoare afa6960338 Silly typo. 2011-03-23 13:34:42 -07:00
Graydon Hoare f740747ea5 Guard texi2pdf on tex probe as well. OSX package systems are real permissive. 2011-03-23 13:33:15 -07:00
Graydon Hoare 9d925436f3 Someday I'll have a talk with the person who thought backslashes were wise in win32. 2011-03-23 13:28:41 -07:00
Graydon Hoare 7ac885ee8c Repair some fallout from pcwalton's last few build changes. 2011-03-21 23:06:42 -07:00
Patrick Walton 35951c92db Support CFG_LLVM_ROOT since CMake-built LLVM has no llvm-config 2011-03-21 18:08:57 -07:00
Graydon Hoare 7941b41b6a Include benchmark dirs in test build dirs. 2011-03-21 14:45:03 -07:00
Graydon Hoare d9dc070588 Fix typo. 2011-03-20 19:43:36 -07:00
Graydon Hoare 4691a75150 Begin porting rules for testsuite execution. 2011-03-20 01:12:26 -07:00
Graydon Hoare 65f6fcb23a Minor clarification. 2011-03-19 18:34:44 -07:00
Graydon Hoare 3e7ff65201 Truncate long lines in configure output. 2011-03-19 18:34:42 -07:00
Graydon Hoare 50c78313f2 Separate scan for commands used during configure. 2011-03-19 18:34:40 -07:00
Graydon Hoare b56f4540e9 Probe for python, git, makeinfo and texi2pdf, but not sed. 2011-03-19 18:34:38 -07:00
Graydon Hoare 5d5b63adb9 Probe for llvm libdir as well. 2011-03-19 18:34:37 -07:00
Graydon Hoare 7055c3928c Make the llvmext dir in builddir from configure. 2011-03-18 16:06:45 -07:00
Graydon Hoare 4c2245d842 Yet more painstaking configure/make logic. 2011-03-17 23:52:15 -07:00
Graydon Hoare 3ae9ca444c Move Makefile.in and configure to top level, BOOT_-qualify names, various tweaks. 2011-03-17 14:26:32 -07:00