about summary refs log tree commit diff
path: root/src/compiletest
AgeCommit message (Collapse)AuthorLines
2014-07-29Add pretty=typed test support to compiletest and add a test for fixed size ↵Luqman Aden-1/+28
arrays.
2014-07-23collections: Deprecate shift/unshiftBrian Anderson-1/+1
Use insert/remove instead.
2014-07-17deprecate Vec::getNick Cameron-15/+15
2014-07-16debuginfo: Make sure that only one LLDB test task is run at a time.Michael Woerister-1/+11
Some older versions of LLDB have problems with multiple instances running in parallel. This commit makes sure we don't do that.
2014-07-16debuginfo: Inject 'Rust-mode' LLDB prelude into debuginfo test scripts.Michael Woerister-0/+10
2014-07-15Deprecate `str::from_chars`Adolfo Ochagavía-1/+1
Use `String::from_chars` instead [breaking-change]
2014-07-15Deprecate `str::from_utf8_owned`Adolfo Ochagavía-11/+10
Use `String::from_utf8` instead [breaking-change]
2014-07-10io::process::Command: add fine-grained env builderAaron Turon-17/+20
This commit changes the `io::process::Command` API to provide fine-grained control over the environment: * The `env` method now inserts/updates a key/value pair. * The `env_remove` method removes a key from the environment. * The old `env` method, which sets the entire environment in one shot, is renamed to `env_set_all`. It can be used in conjunction with the finer-grained methods. This renaming is a breaking change. To support these new methods, the internal `env` representation for `Command` has been changed to an optional `HashMap` holding owned `CString`s (to support non-utf8 data). The `HashMap` is only materialized if the environment is updated. The implementation does not try hard to avoid allocation, since the cost of launching a process will dwarf any allocation cost. This patch also adds `PartialOrd`, `Eq`, and `Hash` implementations for `CString`. [breaking-change]
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-3/+3
[breaking-change]
2014-06-28auto merge of #15208 : alexcrichton/rust/snapshots, r=pcwaltonbors-1/+1
This change registers new snapshots, allowing `*T` to be removed from the language. This is a large breaking change, and it is recommended that if compiler errors are seen that any FFI calls are audited to determine whether they should be actually taking `*mut T`.
2014-06-28Rename all raw pointers as necessaryAlex Crichton-1/+1
2014-06-26Remove unnecessary to_string callsPiotr Jawniak-5/+2
This commit removes superfluous to_string calls from various places
2014-06-25compiletest: Remove superfluous to_string callsPiotr Jawniak-95/+77
2014-06-18Deprecate the bytes!() macro.Simon Sapin-2/+2
Replace its usage with byte string literals, except in `bytes!()` tests. Also add a new snapshot, to be able to use the new b"foo" syntax. The src/etc/2014-06-rewrite-bytes-macros.py script automatically rewrites `bytes!()` invocations into byte string literals. Pass it filenames as arguments to generate a diff that you can inspect, or `--apply` followed by filenames to apply the changes in place. Diffs can be piped into `tip` or `pygmentize -l diff` for coloring.
2014-06-16Fix --disable-rpath and testsAlex Crichton-18/+38
This involved a few changes to the local build system: * Makefiles now prefer our own LD_LIBRARY_PATH over the user's LD_LIBRARY_PATH in order to support building rust with rust already installed. * The compiletest program was taught to correctly pass through the aux dir as a component of LD_LIBRARY_PATH in more situations. This change was spliced out of #14832 to consist of just the fixes to running tests without an rpath setting embedded in executables.
2014-06-14Register new snapshotsAlex Crichton-8/+1
2014-06-14getopts: format failure messages with `Show`.Huon Wilson-1/+1
This obsoletes the old `to_err_msg` method. Replace println!("Error: {}", failure.to_err_msg()) let string = failure.to_err_msg(); with println!("Error: {}", failure) let string = failure.to_str(); [breaking-change]
2014-06-09std: Move dynamic_lib from std::unstable to stdBrian Anderson-1/+1
This leaves a deprecated reexport in place temporarily. Closes #1457.
2014-06-09Add a --color flag to test binariesSteven Fackler-0/+1
It uses the same behavior as rustc's.
2014-06-09Use phase(plugin) in bootstrap cratesKeegan McAllister-2/+8
Do this to avoid warnings on post-stage0 builds.
2014-06-06Rename Iterator::len to countAaron Turon-1/+1
This commit carries out the request from issue #14678: > The method `Iterator::len()` is surprising, as all the other uses of > `len()` do not consume the value. `len()` would make more sense to be > called `count()`, but that would collide with the current > `Iterator::count(|T| -> bool) -> unit` method. That method, however, is > a bit redundant, and can be easily replaced with > `iter.filter(|x| x < 5).count()`. > After this change, we could then define the `len()` method > on `iter::ExactSize`. Closes #14678. [breaking-change]
2014-06-06Change to_str().to_string() to just to_str()Adolfo Ochagavía-2/+2
2014-06-03std: Remove generics from Option::expectAlex Crichton-11/+11
This commit removes the <M: Any + Send> type parameter from Option::expect in favor of just taking a hard-coded `&str` argument. This allows this function to move into libcore. Previous code using strings with `expect` will continue to work, but code using this implicitly to transmit task failure will need to unwrap manually with a `match` statement. [breaking-change] Closes #14008
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-30librustc: Fix snake case errors.Kevin Butler-28/+28
A number of functions/methods have been moved or renamed to align better with rust standard conventions. rustc::back::link::WriteOutputFile => write_output_file rustc::middle::ty::EmptyBuiltinBounds => empty_builtin_bounds rustc::middle::ty::AllBuiltinBounds => all_builtin_bounds rustc::middle::liveness::IrMaps => IrMaps::new rustc::middle::liveness::Liveness => Liveness::new rustc::middle::resolve::NameBindings => NameBindings::new rustc::middle::resolve::PrimitiveTypeTable => PrimitiveTypeTable::new rustc::middle::resolve::Resolver => Resolver::new rustc::middle::trans::datum::Datum => Datum::new rustc::middle::trans::datum::DatumBlock => DatumBlock::new rustc::middle::trans::datum::Rvalue => Rvalue::new rustc::middle::typeck::infer::new_ValsAndBindings => ::infer::unify::ValsAndBindings::new rustc::middle::typeck::infer::region_inference::RegionVarBindings => RegionVarBindings::new [breaking-change]
2014-05-28std: Remove format_strbuf!()Alex Crichton-138/+105
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-191/+191
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-4/+4
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-86/+86
[breaking-change]
2014-05-24Update ascii functions used elsewhereAdolfo Ochagavía-1/+1
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-9/+23
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-8/+14
2014-05-20auto merge of #14283 : Ryman/rust/commented_compile_fail_error, r=kballardbors-59/+31
Edit: This now only covers refactoring to regex.
2014-05-20compiletest: Refactor compile-fail to regex.Kevin Butler-59/+31
2014-05-18Fixing rustdoc stage1.Felix S. Klock II-42/+19
See #13983 and #14000. Fix was originally authored by alexcrichton and then rebased a couple times by pnkfelix, most recently atop PR 13954. ---- Regarding the change to librustdoc/lib.rs, to do `map_err` before unwrapping a `TqskResult`: I do not understand how master is passing without this change or something like it, since `Box<Any:Send>` does not implement `Show`. (Is this something that is only a problem for the snapshot stage0 compiler?) Still, the change I have put in here (which was added as part of a rebase after alex's review) seems harmless to me to apply to rustdoc at all stages, since a call to `unwrap` is just going to `fail!` on the err case anyway.
2014-05-17auto merge of #14253 : alexcrichton/rust/issue-14221, r=pcwaltonbors-1/+2
This plugs a leak where resolve was treating enums defined in parent modules as in-scope for all children modules when resolving a pattern identifier. This eliminates the code path in resolve entirely. If this breaks any existing code, then it indicates that the variants need to be explicitly imported into the module. Closes #14221
2014-05-16rustc: Stop leaking enum variants into childrenAlex Crichton-1/+2
This plugs a leak where resolve was treating enums defined in parent modules as in-scope for all children modules when resolving a pattern identifier. This eliminates the code path in resolve entirely. If this breaks any existing code, then it indicates that the variants need to be explicitly imported into the module. Closes #14221 [breaking-change]
2014-05-16libgetopts: Remove all uses of `~str` from `libgetopts`Patrick Walton-7/+6
2014-05-16compiletest: Remove all uses of `~str` from `compiletest`Patrick Walton-425/+699
2014-05-15core: Update all tests for fmt movementAlex Crichton-8/+8
2014-05-15auto merge of #13948 : huonw/rust/test-regex-filter, r=alexcrichtonbors-9/+20
This allows writing a regex to filter tests more precisely, rather than having to list long paths e.g. ``` $ ./stdtest-x86_64-unknown-linux-gnu 'vec.*clone' running 2 tests test vec::tests::test_clone ... ok test vec::tests::test_clone_from ... ok test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured ``` The regex change is fully backwards compatible, since test names are Rust identifiers + `:`, and hence not special regex characters. (See commits for details.)
2014-05-15test: allow the test filter to be a regex.Huon Wilson-9/+20
This is fully backwards compatible, since test names are Rust identifiers + `:`, and hence not special regex characters. Fixes #2866.
2014-05-14Process::new etc should support non-utf8 commands/argsAaron Turon-38/+12
The existing APIs for spawning processes took strings for the command and arguments, but the underlying system may not impose utf8 encoding, so this is overly limiting. The assumption we actually want to make is just that the command and arguments are viewable as [u8] slices with no interior NULLs, i.e., as CStrings. The ToCStr trait is a handy bound for types that meet this requirement (such as &str and Path). However, since the commands and arguments are often a mixture of strings and paths, it would be inconvenient to take a slice with a single T: ToCStr bound. So this patch revamps the process creation API to instead use a builder-style interface, called `Command`, allowing arguments to be added one at a time with differing ToCStr implementations for each. The initial cut of the builder API has some drawbacks that can be addressed once issue #13851 (libstd as a facade) is closed. These are detailed as FIXMEs. Closes #11650. [breaking-change]
2014-05-14libtest: Remove all uses of `~str` from `libtest`.Patrick Walton-3/+9
2014-05-14Get rid of the android-cross-path flag to rustc.Luqman Aden-12/+10
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-13io: Implement process wait timeoutsAlex Crichton-6/+8
This implements set_timeout() for std::io::Process which will affect wait() operations on the process. This follows the same pattern as the rest of the timeouts emerging in std::io::net. The implementation was super easy for everything except libnative on unix (backwards from usual!), which required a good bit of signal handling. There's a doc comment explaining the strategy in libnative. Internally, this also required refactoring the "helper thread" implementation used by libnative to allow for an extra helper thread (not just the timer). This is a breaking change in terms of the io::Process API. It is now possible for wait() to fail, and subsequently wait_with_output(). These two functions now return IoResult<T> due to the fact that they can time out. Additionally, the wait_with_output() function has moved from taking `&mut self` to taking `self`. If a timeout occurs while waiting with output, the semantics are undesirable in almost all cases if attempting to re-wait on the process. Equivalent functionality can still be achieved by dealing with the output handles manually. [breaking-change] cc #13523
2014-05-13test: Give a test a bigger stack for pretty printingAlex Crichton-1/+1
2014-05-13Touch up and rebase previous commitsAlex Crichton-10/+30
* Added `// no-pretty-expanded` to pretty-print a test, but not run it through the `expanded` variant. * Removed #[deriving] and other expanded attributes after they are expanded * Removed hacks around &str and &&str and friends (from both the parser and the pretty printer). * Un-ignored a bunch of tests
2014-05-13compiletest: Test `--pretty expanded`klutzy-5/+20
After testing `--pretty normal`, it tries to run `--pretty expanded` and typecheck output. Here we don't check convergence since it really diverges: for every iteration, some extra lines (e.g.`extern crate std`) are inserted. Some tests are `ignore-pretty`-ed since they cause various issues with `--pretty expanded`.
2014-05-13compiletest: Modernize typenamesklutzy-112/+119