about summary refs log tree commit diff
path: root/src/lib
AgeCommit message (Collapse)AuthorLines
2011-07-26Remove all uses of tuples from the compiler and stdlibMarijn Haverbeke-152/+169
2011-07-25Run test tasks in parallel according to RUST_THREADS. Issue #734Brian Anderson-31/+78
2011-07-25Fix signature and add string_reader to ioivec.Graydon Hoare-1/+5
2011-07-25Remove some rustboot-ismsMarijn Haverbeke-13/+5
Closes #464
2011-07-24Add task::send and task::recvBrian Anderson-0/+8
2011-07-24Add task::worker. Spawns a task and returns a channel to itBrian Anderson-0/+70
It takes a lot of boilerplate to create a task and establish a way to talk to it. This function simplifies that, allowing you to write something like 'worker(f).chan <| start'. Implementation is very unsafe and only works for a few types of channels, but something like this is very useful.
2011-07-24The Big Test Suite OverhaulBrian Anderson-2/+3
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-22More work on word-count.Eric Holk-0/+8
Updated the MapReduce protocol so that it's correct more often. It's still not perfect, but the bugs repro less often now. Also found a race condition in channel sending. The problem is that send and receive both need to refer to the _unread field in circular_buffer. For now I just grabbed the port lock to send. We can probably get around this by using atomics instead.
2011-07-22Print a list of test failures in the test summary. Issue #428Brian Anderson-0/+10
2011-07-21Use correct win file open constants, per MinGWBrian Anderson-6/+6
2011-07-21Add some support for using a map like a set.Michael Sullivan-2/+15
2011-07-20rustc: Implement ptr_eq in Rust. Shaves 4 s off compile time.Patrick Walton-4/+4
2011-07-20Add a huge hack to allow the test runner to continue if a single task leaksBrian Anderson-0/+14
This is just until unwinding works. Adds a flag to the runtime to turn the memory leak checks on task destruction into warnings instead of fatal errors. I am so sorry. Issue #428
2011-07-20Test runner should fail if any tests fail. Issue #428Brian Anderson-2/+3
2011-07-19Fix color term detection in std::termivecBrian Anderson-1/+1
Pretty error messages to be restored
2011-07-19Avoid double-closing pipes in std::run::start_programBrian Anderson-4/+13
Linux and mac seem fine with it, Windows does not
2011-07-19Refactor std::runBrian Anderson-9/+16
2011-07-19Fix an invalid memory access in run_program and friendsBrian Anderson-4/+8
2011-07-18Add str::replaceBrian Anderson-0/+17
2011-07-18Add str::is_empty, is_not_empty predsBrian Anderson-0/+12
2011-07-18Fix qsort to not skip the right side when the pivot element gets put at index 0.Michael Sullivan-4/+8
Closes #705.
2011-07-18Add setenv to standard libraryBrian Anderson-2/+52
2011-07-17Revert "Add setenv to standard library"Brian Anderson-48/+2
This reverts commit 6fb168b3dbd733f6fccebd01c2e5416f800a5566.
2011-07-17Add setenv to standard libraryBrian Anderson-2/+48
2011-07-16Sort tests before running them. Issue #428Brian Anderson-0/+12
2011-07-16Add std::ivec::to_mut, from_mutBrian Anderson-0/+16
2011-07-16Add ivec::zip/unzipBrian Anderson-0/+26
2011-07-15Refactor std::testBrian Anderson-16/+8
2011-07-15Run test functions in isolated tasks. Issue #428Brian Anderson-2/+21
Each test is run in its own task so that the failure can be trapped and the test runner can continue. The easiest way to get the test functions into tasks currently is by treating them as unsafe pointers.
2011-07-15Remove task_unsupervise from rt builtin functionsBrian Anderson-2/+2
This was an exact duplicate of the unsupervise function
2011-07-15Modify task::join to indicate how the task terminatedBrian Anderson-3/+11
This involves sticking yet another field into the task structure
2011-07-14Add an unsupervise builtin and function to std::taskBrian Anderson-0/+5
Calling task::unsupervise de-parents the current task, with the result that failures do not propogate up the task tree.
2011-07-14Add a flag to run ignored tests. Issue #428Brian Anderson-22/+79
2011-07-14Add head and tail functions to std::ivecBrian Anderson-0/+10
They even have typestate preconditions
2011-07-14Add is_empty, is_not_empty preds to std::ivecBrian Anderson-0/+20
2011-07-14Add a facility for ignoring tests. Issue #428Brian Anderson-17/+52
Adding the #[ignore] attribute will cause the test not to be run, though it will still show up in the list of tests.
2011-07-14The test runner's main returns unit, not int. Issue #428Brian Anderson-5/+3
The appropriate way to indicate failure from main is to fail.
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-4/+4
2011-07-13Feeble attempt at putting out the win tinderboxMarijn Haverbeke-2/+2
2011-07-12stdlib: Fix vector index in linux_os::waitpid. Put out burning tinderbox.Patrick Walton-1/+1
2011-07-12stdlib: Make pipe and waitpid use interior vectorsPatrick Walton-20/+20
2011-07-12stdlib: Port most of getopts over to interior vectorsPatrick Walton-28/+46
2011-07-12stdlib: Add interior vector methods to sha1Patrick Walton-17/+32
2011-07-12stdlib: Implement ivec::countPatrick Walton-0/+6
2011-07-12Improve test runner summary message. Issue #428Brian Anderson-2/+8
2011-07-12stdlib: Use the right upcall in win32_fs. Maybe puts out burning tinderbox?Patrick Walton-1/+3
2011-07-12stdlib: Implement str::split_ivec()Patrick Walton-0/+15
2011-07-12stdlib: Move fs over to interior vectors by introducing a ↵Patrick Walton-6/+8
rust_list_files_ivec builtin
2011-07-12stdlib: Port std::either over to interior vectorsPatrick Walton-11/+11
2011-07-12stdlib: Switch lib::deque over to interior vectorsPatrick Walton-24/+28