about summary refs log tree commit diff
path: root/src/compiletest
AgeCommit message (Collapse)AuthorLines
2016-04-18rustbuild: Add support for compiletest test suitesAlex Crichton-3641/+0
This commit adds support in rustbuild for running all of the compiletest test suites as part of `make check`. The `compiletest` program was moved to `src/tools` (like `rustbook` and others) and is now just compiled like any other old tool. Each test suite has a pretty standard set of dependencies and just tweaks various parameters to the final compiletest executable. Note that full support is lacking in terms of: * Once a test suite has passed, that's not remembered. When a test suite is requested to be run, it's always run. * The arguments to compiletest probably don't work for every possible combination of platforms and testing environments just yet. There will likely need to be future updates to tweak various pieces here and there. * Cross compiled test suites probably don't work just yet, support for that will come in a follow-up patch.
2016-04-15Add initial version of codegen unit partitioning for incremental compilation.Michael Woerister-17/+130
2016-04-12Auto merge of #32803 - eddyb:mir-debuginfo, r=nikomatsakisbors-17/+1
Initial implementation of debuginfo in MIR trans. Progress is made towards #31005, but several issues remain, such as #32790.
2016-04-11tests: update for MIR debuginfo.Eduard Burtescu-17/+1
2016-04-11std: Stabilize APIs for the 1.9 releaseAlex Crichton-15/+24
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-04-06Address nits.Niko Matsakis-3/+4
2016-04-06add incremental test runner and some testsNiko Matsakis-2/+71
2016-03-31allow RUST_BACKTRACE=0 to act as if unsetEmanuel Czirai-1/+4
/# This is a combination of 16 commits. /# The first commit's message is: allow RUST_BACKTRACE=disabled to act as if unset When RUST_BACKTRACE is set to "disabled" then this acts as if the env. var is unset. /# This is the 2nd commit message: case insensitive "DiSaBLeD" RUST_BACKTRACE value previously it expected a lowercase "disabled" to treat the env. var as unset /# This is the 3rd commit message: RUST_BACKTRACE=0 acts as if unset previously RUST_BACKTRACE=disabled was doing the same thing /# This is the 4th commit message: RUST_BACKTRACE=0|n|no|off acts as if unset previously only RUST_BACKTRACE=0 acted as if RUST_BACKTRACE was unset Now added more options (case-insensitive): 'n','no' and 'off' eg. RUST_BACKTRACE=oFF /# This is the 5th commit message: DRY on the value of 2 DRY=don't repeat yourself Because having to remember to keep the two places of '2' in sync is not ideal, even though this is a simple enough case. /# This is the 6th commit message: Revert "DRY on the value of 2" This reverts commit 95a0479d5cf72a2b2d9d21ec0bed2823ed213fef. Nevermind this DRY on 2, because we already have a RY on 1, besides the code is less readable this way... /# This is the 7th commit message: attempt to document unsetting RUST_BACKTRACE /# This is the 8th commit message: curb allocations when checking for RUST_BACKTRACE this means we don't check for case-insensitivity anymore /# This is the 9th commit message: as decided, RUST_BACKTRACE=0 turns off backtrace /# This is the 10th commit message: RUST_TEST_NOCAPTURE=0 acts as if unset (that is, capture is on) Any other value acts as if nocapture is enabled (that is, capture is off) /# This is the 11th commit message: update other RUST_TEST_NOCAPTURE occurrences apparently only one place needs updating /# This is the 12th commit message: update RUST_BACKTRACE in man page /# This is the 13th commit message: handle an occurrence of RUST_BACKTRACE /# This is the 14th commit message: ensure consistency with new rules for backtrace /# This is the 15th commit message: a more concise comment for RUST_TEST_NOCAPTURE /# This is the 16th commit message: update RUST_TEST_NOCAPTURE in man page
2016-03-26Set source file name when setting breakpoints in lldbTed Horst-1/+4
2016-03-25remove unused variable in compiletestNiko Matsakis-6/+0
2016-03-25Make library paths passed by compiletest tool absolute.Michael Woerister-9/+23
Otherwise, changing the current working directory can mess up runtime linking.
2016-03-23add back `&` that was deleted by mistakeJorge Aparicio-1/+1
2016-03-22fix alignmentJorge Aparicio-4/+4
2016-03-22sprinkle feature gates here and thereJorge Aparicio-0/+1
2016-03-22try! -> ?Jorge Aparicio-6/+6
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2016-03-22Auto merge of #32341 - frewsxcv:compiletest-enum, r=nikomatsakisbors-14/+57
Use enum for message kind in compiletest harness. None
2016-03-21Refactor 'kind' extraction to use `str::split_whitespace`.Corey Farwell-6/+5
2016-03-19Rollup merge of #32271 - frewsxcv:compiletest-ignored-help-note, r=nikomatsakisEduard-Mihai Burtescu-0/+4
Add comment about opt-in nature of compiletest note/help messages. The opt-in functionality was proposed and discussed in https://github.com/rust-lang/rust/issues/21195
2016-03-18Use enum for message kind in compiletest harness.Corey Farwell-11/+55
2016-03-18Auto merge of #32080 - eddyb:transcendent, r=nikomatsakisbors-8/+31
Refactor call & function handling in trans, enable MIR bootstrap. Non-Rust and Rust ABIs were combined into a common codepath, which means: * The ugly `__rust_abi` "clown shoes" shim for C->Rust FFI is gone, fixes #10116. * Methods, *including virtual ones* support non-Rust ABIs, closes #30235. * Non-Rust ABIs also pass fat pointers in two arguments; the result should be identical. * Zero-sized types are never passed as arguments; again, behavior shouldn't change. Additionally, MIR support for calling intrinsics (through old trans) was implemented. Alongside assorted fixes, it enabled MIR to launch :rocket: and do a *complete* bootstrap. To try it yourself, `./configure --enable-orbit` *or* `make RUSTFLAGS="-Z orbit"`.
2016-03-17Add #[rustc_no_mir] to make tests pass with -Z orbit.Eduard Burtescu-4/+20
2016-03-17compiletest: Add rustc-env for run-pass/super-fast-paren-parsing.Eduard Burtescu-4/+11
2016-03-16Stop ignoring expected note/help messages in compiletest suite.Corey Farwell-2/+2
Original issue: https://github.com/rust-lang/rust/issues/21195 Relevant PR: https://github.com/rust-lang/rust/pull/30778 Prior to this commit, if a compiletest testcase included the text "HELP:" or "NOTE:" (note the colons), then it would indicate to the compiletest suite that we should verify "help" and "note" expected messages. This commit updates this check to also check "HELP" and "NOTE" (not the absense of colons) so that we always verify "help" and "note" expected messages.
2016-03-15Add comment about opt-in nature of compiletest note/help messages.Corey Farwell-0/+4
The opt-in functionality was proposed and discussed in https://github.com/rust-lang/rust/issues/21195
2016-03-15Auto merge of #31887 - SimonSapin:quiet-test, r=alexcrichtonbors-1/+8
Shorter output for `rustc --test` binaries. Until now, a program created with `rustc --test` prints at least one line per test. This can be very verbose, especially with [data-driven tests](https://internals.rust-lang.org/t/test-and-external-test-harnesses/3145) when hundreds or thousands of tests is not rare. This changes the default output to one character per test (except metrics and benchmarks results which have additional data to show): ``` Running target/debug/wpt-75c594dc1e6e6187 running 314 tests .............................................................................. .............................................................................. .............................................................................. .............................................................................. .. test result: ok. 314 passed; 0 failed; 0 ignored; 0 measured ``` <s>The previous behavior is available by passing `--verbose` to the test program. Maybe `cargo test --verbose` could be changed to do that?</s> **Edit:** the default is now unchanged, `-q` or `--quiet` enables the new output.
2016-03-15Shorter output for `rustc --test` binaries.Simon Sapin-1/+8
A program created with `rustc --test` prints at least one line per test. This can be very verbose, especially with [data-driven tests]( https://internals.rust-lang.org/t/test-and-external-test-harnesses/3145) when hundreds or thousands of tests is not rare. This adds a `-q` or `--quiet` option that changes the output to one character instead of one line per test (except metrics and benchmarks results which have additional data to show): ``` Running target/debug/wpt-75c594dc1e6e6187 running 314 tests .............................................................................. .............................................................................. .............................................................................. .............................................................................. .. test result: ok. 314 passed; 0 failed; 0 ignored; 0 measured ``` This is a breaking change since the `test::TestOpts` struct now has one more field.
2016-03-14Clean up cloning logic in compiletest.rs.Corey Farwell-11/+2
2016-03-12std: Clean out deprecated APIsAlex Crichton-7/+12
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2016-03-09Differentiate "line" and "line number" variable names.Corey Farwell-15/+14
2016-03-09Prefer `Option::expect` over explicit unwrapping.Corey Farwell-3/+2
2016-03-03make pretty printer tests understand revisions, and make them ignore theNiko Matsakis-20/+32
should-fail annotation
2016-03-03Do not assert revisions list is empty for pretty printing testsNiko Matsakis-1/+5
2016-03-02rename should-panic to should-fail, per acrichto's suggestionNiko Matsakis-6/+6
2016-03-02make it possible for a test to declare `should-panic`Niko Matsakis-28/+49
and write a really basic "meta test" of the compilertest framework
2016-03-02thread revision identifier around in test outputNiko Matsakis-91/+134
2016-03-02refactor and generalize revisionsNiko Matsakis-16/+52
2016-03-01introduce the notion of revisions, currently unusedNiko Matsakis-27/+88
a test file may specify `// revisions: foo bar baz` headers and expected errors may be made specific to a revision by writing `//[foo] header` or `//[foo]~ ERROR`
2016-03-01change compile_flags to eagerly split into a vector on whitespaceNiko Matsakis-9/+11
2016-03-01refactor header parsing so it can work "in-place"Niko Matsakis-62/+64
2016-03-01require that header lines begin with `//`Niko Matsakis-2/+3
2016-02-25add comment and stop creating directories in runtestNiko Matsakis-1/+2
2016-02-25create the required directories while gathering tests rather than duringNiko Matsakis-0/+9
parallel execution
2016-02-25translate backslashes to forward slashes in the expected stringsNiko Matsakis-1/+3
2016-02-24Recurse to find test files in any subdirectory of the base path. If aNiko Matsakis-14/+46
subdirectory contains `compiletest-ignore-dir`, then ignore it.
2016-02-24Generalize from passing around a single path to the test file to passingNiko Matsakis-170/+202
around a set of paths called `TestPaths` This commit is not quite standalone; it basically contains all the borrowing plumbing bits, the interesting stuff comes in the next commit.
2016-02-10Fix half of emscripten's failing testsPierre Krieger-5/+7
2016-02-06Add emscripten support to compiletestBrian Anderson-1/+14
2016-02-03Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichtonbors-0/+1
This pull request adds support for [Illumos](http://illumos.org/)-based operating systems: SmartOS, OpenIndiana, and others. For now it's x86-64 only, as I'm not sure if 32-bit installations are widespread. This PR is based on #28589 by @potatosalad, and also closes #21000, #25845, and #25846. Required changes in libc are already merged: https://github.com/rust-lang-nursery/libc/pull/138 Here's a snapshot required to build a stage0 compiler: https://s3-eu-west-1.amazonaws.com/nbaksalyar/rustc-sunos-snapshot.tar.gz It passes all checks from `make check`. There are some changes I'm not quite sure about, e.g. macro usage in `src/libstd/num/f64.rs` and `DirEntry` structure in `src/libstd/sys/unix/fs.rs`, so any comments on how to rewrite it better would be greatly appreciated. Also, LLVM configure script might need to be patched to build it successfully, or a pre-built libLLVM should be used. Some details can be found here: https://llvm.org/bugs/show_bug.cgi?id=25409 Thanks! r? @brson
2016-02-02Auto merge of #31312 - alexcrichton:no-le-in-powerpc64le, r=alexcrichtonbors-1/+0
Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the `target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the `powerpc64le` target does indeed set the `target_arch` as `powerpc64le`, causing a bit of inconsistency between theset two. As these are just the same instance of one instruction set, let's use `target_endian` to switch between them and only set the `target_arch` as one value. This should cut down on the number of `#[cfg]` annotations necessary and all around be a little more ergonomic.
2016-02-01Remove "powerpc64le" and "mipsel" target_archAlex Crichton-1/+0
Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the `target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the `powerpc64le` target does indeed set the `target_arch` as `powerpc64le`, causing a bit of inconsistency between theset two. As these are just the same instance of one instruction set, let's use `target_endian` to switch between them and only set the `target_arch` as one value. This should cut down on the number of `#[cfg]` annotations necessary and all around be a little more ergonomic.