about summary refs log tree commit diff
path: root/src/compiletest/common.rs
AgeCommit message (Collapse)AuthorLines
2016-04-18rustbuild: Add support for compiletest test suitesAlex Crichton-165/+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-06add incremental test runner and some testsNiko Matsakis-1/+4
2016-03-25Make library paths passed by compiletest tool absolute.Michael Woerister-2/+2
Otherwise, changing the current working directory can mess up runtime linking.
2016-03-15Shorter output for `rustc --test` binaries.Simon Sapin-1/+4
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-01-26Implement the translation item collector.Michael Woerister-0/+3
The purpose of the translation item collector is to find all monomorphic instances of functions, methods and statics that need to be translated into LLVM IR in order to compile the current crate. So far these instances have been discovered lazily during the trans path. For incremental compilation we want to know the set of these instances in advance, and that is what the trans::collect module provides. In the future, incremental and regular translation will be driven by the collector implemented here.
2015-06-13compiletest: remove JITTamir Duberstein-3/+0
2015-05-27Revamp codegen tests to check IR quality instead of quantityBjörn Steinbrink-3/+0
The current codegen tests only compare IR line counts between similar rust and C programs, the latter getting compiled with clang. That looked like a good idea back then, but actually things like lifetime intrinsics mean that less IR isn't always better, so the metric isn't really helpful. Instead, we can start doing tests that check specific aspects of the generated IR, like attributes or metadata. To do that, we can use LLVM's FileCheck tool which has a number of useful features for such tests. To start off, I created some tests for a few things that were recently added and/or broken.
2015-04-07compiletest: Add support for running rustdoc testsAlex Crichton-1/+10
Add a new test directory called 'rustdoc' where all files inside are documented and run against the `htmldocck` script to have assertions about the output.
2015-03-04std: Deprecate std::old_io::fsAlex Crichton-8/+9
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
2015-02-16Add pfail targets for parse-fail testsFlorian Hahn-0/+3
2015-01-30std: Stabilize FromStr and parseAlex Crichton-10/+11
This commits adds an associated type to the `FromStr` trait representing an error payload for parses which do not succeed. The previous return value, `Option<Self>` did not allow for this form of payload. After the associated type was added, the following attributes were applied: * `FromStr` is now stable * `FromStr::Err` is now stable * `FromStr::from_str` is now stable * `StrExt::parse` is now stable * `FromStr for bool` is now stable * `FromStr for $float` is now stable * `FromStr for $integral` is now stable * Errors returned from stable `FromStr` implementations are stable * Errors implement `Display` and `Error` (both impl blocks being `#[stable]`) Closes #15138
2015-01-29register snaphotsJorge Aparicio-14/+0
2015-01-25cleanup: s/impl Copy/#[derive(Copy)]/gJorge Aparicio-5/+2
2015-01-24Rollup merge of #21550 - FlaPer87:fix-compiletest, r=huonwFlavio Percoco Premoli-0/+15
2015-01-23regex: Remove in-tree versionAlex Crichton-5/+1
The regex library was largely used for non-critical aspects of the compiler and various external tooling. The library at this point is duplicated with its out-of-tree counterpart and as such imposes a bit of a maintenance overhead as well as compile time hit for the compiler itself. The last major user of the regex library is the libtest library, using regexes for filters when running tests. This removal means that the filtering has gone back to substring matching rather than using regexes.
2015-01-23Fix compile test for stage0Flavio Percoco-0/+15
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-9/+3
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-9/+3
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-19Remove unsupported test features from compiletest.Ahmed Charles-14/+0
Removes test-shard, ratchet-metrics and save-metrics from Config in compiletest/common.rs.
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-4/+9
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-2/+2
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+2
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+1
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-16Move FromStr to core::strBrendan Zabarauskas-1/+1
2014-10-23Error if we should be able to Valgrind but can'tNick Cameron-0/+4
2014-10-23Add run-pass-valgrind testsNick Cameron-0/+6
Closes #16914
2014-10-08debuginfo: Add LLDB version handling to test infrastructure.Michael Woerister-0/+3
2014-08-27debuginfo: Emit different autotest debugger scripts depending on GDB version.Michael Woerister-0/+3
2014-08-01Fix misspelled comments.Joseph Crail-1/+1
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-1/+1
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-11/+11
[breaking-change]
2014-05-20compiletest: Refactor compile-fail to regex.Kevin Butler-2/+4
2014-05-16compiletest: Remove all uses of `~str` from `compiletest`Patrick Walton-11/+11
2014-05-15core: Update all tests for fmt movementAlex Crichton-8/+8
2014-05-15test: allow the test filter to be a regex.Huon Wilson-1/+2
This is fully backwards compatible, since test names are Rust identifiers + `:`, and hence not special regex characters. Fixes #2866.
2014-05-14Get rid of the android-cross-path flag to rustc.Luqman Aden-0/+3
There's no need to include this specific flag just for android. We can already deal with what it tries to solve by using -C linker=/path/to/cc and -C ar=/path/to/ar. The Makefiles for rustc already set this up when we're crosscompiling. I did add the flag to compiletest though so it can find gdb. Though, I'm pretty sure we don't run debuginfo tests on android anyways right now. [breaking-change]
2014-05-13compiletest: Modernize typenamesklutzy-10/+43
2014-05-07debuginfo: Split debuginfo autotests into debuginfo-gdb and debuginfo-lldbMichael Woerister-1/+5
2014-03-31compiletest: Switch field privacy where necessaryAlex Crichton-28/+28
2014-02-13mk: Fix non-android cross builds.Luqman Aden-2/+5
2014-01-17test: Add the ability to force a host targetAlex Crichton-0/+3
The new macro loading infrastructure needs the ability to force a procedural-macro crate to be built with the host architecture rather than the target architecture (because the compiler is just about to dlopen it).
2014-01-04etc: licenseck: don't hardcode a specific yearAdrien Tétar-2/+2
2013-08-30auto merge of #8886 : cmr/rust/test-restructure, r=cmrbors-1/+1
2013-08-30Revert "Teach compiletest to use multiple --src-base's"Corey Richardson-1/+1
This reverts commit 8a07f5708196dd72ec030018c2a215a4dd823b2e.
2013-08-30auto merge of #8839 : sanxiyn/rust/env, r=thestingerbors-3/+0
2013-08-28Remove --newrt optionSeo Sanghyeon-3/+0
2013-08-28Teach compiletest to use multiple --src-base'sCorey Richardson-1/+1
2013-08-23test: add support for sharding testsuite by passing --test-shard=a.bGraydon Hoare-0/+5
2013-07-17test: Fix tests.Patrick Walton-1/+2
2013-07-16compiletest: Add support for metrics and ratchet modes.Graydon Hoare-0/+9