about summary refs log tree commit diff
path: root/src/compiletest/compiletest.rs
AgeCommit message (Collapse)AuthorLines
2014-03-26auto merge of #13117 : alexcrichton/rust/no-crate-map, r=brsonbors-1/+3
This can be done now that logging has been moved out and libnative is the default (not libgreen)
2014-03-24green: Remove the dependence on the crate mapAlex Crichton-1/+3
This is the final nail in the coffin for the crate map. The `start` function for libgreen now has a new added parameter which is the event loop factory instead of inferring it from the crate map. The two current valid values for this parameter are `green::basic::event_loop` and `rustuv::event_loop`.
2014-03-23Snapshot cleanupAlex Crichton-1/+0
2014-03-21rustc: Switch defaults from libgreen to libnativeAlex Crichton-0/+5
The compiler will no longer inject libgreen as the default runtime for rust programs, this commit switches it over to libnative by default. Now that libnative has baked for some time, it is ready enough to start getting more serious usage as the default runtime for rustc generated binaries. We've found that there isn't really a correct decision in choosing a 1:1 or M:N runtime as a default for all applications, but it seems that a larger number of programs today would work more reasonable with a native default rather than a green default. With this commit come a number of bugfixes: * The main native task is now named "<main>" * The main native task has the stack bounds set up properly * #[no_uv] was renamed to #[no_start] * The core-run-destroy test was rewritten for both libnative and libgreen and one of the tests was modified to be more robust. * The process-detach test was locked to libgreen because it uses signal handling
2014-03-22Remove outdated and unnecessary std::vec_ng::Vec imports.Huon Wilson-1/+0
(And fix some tests.)
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-18/+18
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-20syntax: Tidy up parsing the new attribute syntaxAlex Crichton-0/+1
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-15log: Introduce liblog, the old std::loggingAlex Crichton-0/+3
This commit moves all logging out of the standard library into an external crate. This crate is the new crate which is responsible for all logging macros and logging implementation. A few reasons for this change are: * The crate map has always been a bit of a code smell among rust programs. It has difficulty being loaded on almost all platforms, and it's used almost exclusively for logging and only logging. Removing the crate map is one of the end goals of this movement. * The compiler has a fair bit of special support for logging. It has the __log_level() expression as well as generating a global word per module specifying the log level. This is unfairly favoring the built-in logging system, and is much better done purely in libraries instead of the compiler itself. * Initialization of logging is much easier to do if there is no reliance on a magical crate map being available to set module log levels. * If the logging library can be written outside of the standard library, there's no reason that it shouldn't be. It's likely that we're not going to build the highest quality logging library of all time, so third-party libraries should be able to provide just as high-quality logging systems as the default one provided in the rust distribution. With a migration such as this, the change does not come for free. There are some subtle changes in the behavior of liblog vs the previous logging macros: * The core change of this migration is that there is no longer a physical log-level per module. This concept is still emulated (it is quite useful), but there is now only a global log level, not a local one. This global log level is a reflection of the maximum of all log levels specified. The previously generated logging code looked like: if specified_level <= __module_log_level() { println!(...) } The newly generated code looks like: if specified_level <= ::log::LOG_LEVEL { if ::log::module_enabled(module_path!()) { println!(...) } } Notably, the first layer of checking is still intended to be "super fast" in that it's just a load of a global word and a compare. The second layer of checking is executed to determine if the current module does indeed have logging turned on. This means that if any module has a debug log level turned on, all modules with debug log levels get a little bit slower (they all do more expensive dynamic checks to determine if they're turned on or not). Semantically, this migration brings no change in this respect, but runtime-wise, this will have a perf impact on some code. * A `RUST_LOG=::help` directive will no longer print out a list of all modules that can be logged. This is because the crate map will no longer specify the log levels of all modules, so the list of modules is not known. Additionally, warnings can no longer be provided if a malformed logging directive was supplied. The new "hello world" for logging looks like: #[phase(syntax, link)] extern crate log; fn main() { debug!("Hello, world!"); }
2014-03-14lint: add lint for use of a `~[T]`.Huon Wilson-0/+1
This is useless at the moment (since pretty much every crate uses `~[]`), but should help avoid regressions once completely removed from a crate.
2014-03-12rustc: Remove matching on ~str from the languageMichael Darakananda-7/+7
The `~str` type is not long for this world as it will be superseded by the soon-to-come DST changes for the language. The new type will be `~Str`, and matching over the allocation will no longer be supported. Matching on `&str` will continue to work, in both a pre and post DST world.
2014-02-20move extra::test to libtestLiigo Zhuang-4/+1
2014-02-14extern mod => extern crateAlex Crichton-2/+2
This was previously implemented, and it just needed a snapshot to go through
2014-02-14auto merge of #12192 : luqmana/rust/fix-cross, r=alexcrichtonbors-3/+6
Fix some fall out from the big command line option changes.
2014-02-13compiletest: Run all android tests seriallyBrian Anderson-3/+5
This is an attempt to isolate test failures on the bots. It may also eliminate problems with the emulators breaking by reducing the chance of OOM.
2014-02-13mk: Fix non-android cross builds.Luqman Aden-3/+6
2014-02-11Change `xfail` directives in compiletests to `ignore`, closes #11363Florian Hahn-1/+1
2014-02-06getopts: replaced base functions with those from groupArcterus-5/+5
2014-02-06Move getopts out of extraArcterus-2/+2
2014-02-03compiletest: Remove io_error usageAlex Crichton-2/+8
2014-01-21Remove unnecessary parentheses.Huon Wilson-8/+3
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-11Remove re-exports of std::io::stdio::{print, println} in the prelude.Brendan Zabarauskas-6/+6
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
2014-01-06Register new snapshotsAlex Crichton-1/+0
2013-12-25Test fixes and rebase conflictsAlex Crichton-0/+1
* vec::raw::to_ptr is gone * Pausible => Pausable * Removing @ * Calling the main task "<main>" * Removing unused imports * Removing unused mut * Bringing some libextra tests up to date * Allowing compiletest to work at stage0 * Fixing the bootstrap-from-c rmake tests * assert => rtassert in a few cases * printing to stderr instead of stdout in fail!()
2013-12-24Test fixes and rebase problemsAlex Crichton-2/+2
Note that this removes a number of run-pass tests which are exercising behavior of the old runtime. This functionality no longer exists and is thoroughly tested inside of libgreen and libnative. There isn't really the notion of "starting the runtime" any more. The major notion now is "bootstrapping the initial task".
2013-12-10compiletest: Remove uses of `Cell`.Patrick Walton-8/+6
2013-12-08Remove dead codesKiet Tran-4/+0
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-6/+6
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-6/+6
2013-11-26librustc: Make `||` lambdas not infer to `proc`sPatrick Walton-2/+4
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-2/+2
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-26libsyntax: Remove the old-style borrowed closure type syntax from thePatrick Walton-2/+2
language.
2013-11-11Move std::rt::io to std::ioAlex Crichton-1/+1
2013-11-06Add make check support(arm-linux-androideabi debuginfo)sh8281.kim-0/+13
2013-11-04Move io::file to io::fs and fns out of FileAlex Crichton-2/+2
This renames the `file` module to `fs` because that more accurately describes its current purpose (manipulating the filesystem, not just files). Additionally, this adds an UnstableFileStat structure as a nested structure of FileStat to signify that the fields should not be depended on. The structure is currently flagged with #[unstable], but it's unlikely that it has much meaning. Closes #10241
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-1/+2
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-7/+7
Who doesn't like a massive renaming?
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-6/+6
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-17/+19
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-10-09option: rewrite the API to use compositionDaniel Micay-5/+5
2013-09-30rpass: Remove usage of fmt!Alex Crichton-1/+1
2013-09-30compiletest: Remove usage of fmt!Alex Crichton-33/+33
2013-09-19Turned extra::getopts functions into methodsMarvin Löbel-27/+25
Some minor api and doc adjustments
2013-09-18std: Remove {float,f64,f32}::from_str in favor of from_strblake2-ppc-2/+1
Like issue #9209, remove float::{from_str, from_str_radix} in favor of the two corresponding traits. The same for modules f64 and f32. New usage is from_str::<float>("1.2e34")
2013-09-12std: rename Option::unwrap_or_default() to unwrap_or()Erick Tryzelaar-1/+1
2013-09-04Update clients of path.rs to use new API.Felix S. Klock II-2/+3
In most cases this involved removing a ~str allocations or clones (yay), or coercing a ~str to a slice. In a few places, I had to bind an intermediate Path (e.g. path.pop() return values), so that it would live long enough to support the borrowed &str. And in a few places, where the code was actively using the property that the old API returned ~str's, I had to put in to_owned() or clone(); but in those cases, we're trading an allocation within the path.rs code for one in the client code, so they neutralize each other.
2013-09-02Raise the file descriptor limits when running compiletestAlex Crichton-0/+5
We already do this for libstd tests automatically, and compiletest runs into the same problems where when forking lots of processes lots of file descriptors are created. On OSX we can use specific syscalls to raise the limits, in this situation, though. Closes #8904
2013-08-30auto merge of #8886 : cmr/rust/test-restructure, r=cmrbors-18/+16
2013-08-30Revert "Teach compiletest to use multiple --src-base's"Corey Richardson-18/+16
This reverts commit 8a07f5708196dd72ec030018c2a215a4dd823b2e.