about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2016-05-28Auto merge of #33848 - alexcrichton:android-gdb-sysroot, r=michaelwoeristerbors-5/+6
test: Use `set sysroot` for more NDK compatibility Recent versions of the Android NDK no longer ship debuggers like `arm-linux-androideabi-gdb`, but instead one prebuilt binary `gdb`. We can symlink this into place at least to get our detection still working, but it now needs to be told what the sysroot is so it can correctly do... something. Long story short, tests didn't pass with this change and after this change they pass.
2016-05-25trans: save metadata even with -Z no-trans.Eduard Burtescu-0/+7
2016-05-24test: Use `set sysroot` for more NDK compatibilityAlex Crichton-5/+6
Recent versions of the Android NDK no longer ship debuggers like `arm-linux-androideabi-gdb`, but instead one prebuilt binary `gdb`. We can symlink this into place at least to get our detection still working, but it now needs to be told what the sysroot is so it can correctly do... something. Long story short, tests didn't pass with this change and after this change they pass.
2016-05-18Auto merge of #33688 - jonathandturner:fix_old_school, r=nikomatsakisbors-21/+33
Fix for old school error issues, improvements to new school This PR: * Fixes some old school error issues, specifically #33559, #33543, #33366 * Improves wording borrowck errors with match patterns * De-emphasize multi-line spans, so we don't color the single source character when we're trying to say "span starts here" * Rollup of #33392 (which should help fix #33390) r? @nikomatsakis
2016-05-18pass revision and incr_comp directory to auxbuildNiko Matsakis-10/+40
This is needed for incremental compilation harness to support cross-crate testing. Also support cfg for typechecking prettyprint
2016-05-17Improve a few errors and fix #33366Jonathan Turner-19/+28
2016-05-17De-emph minimized spans, add better debugging outputJonathan Turner-7/+10
2016-05-16Auto merge of #33588 - nikomatsakis:compiletest-ui, r=acrichtobors-1/+175
add UI testing framework This adds a framework for capturing and tracking the precise output of rustc, which allows us to check all manner of minor details with the output. It's pretty strict right now -- the output must match almost exactly -- and hence maybe a bit too strict. But I figure we can add wildcards or whatever later. There is also a script intended to make updating the references easy, though the script could make things a *bit* easier (in particular, it'd be nice if it would find the build directory for you automatically). One thing I was wondering about is the best way to test colors. Since windows doesn't embed those in the output stream, this test framework can't test colors on windows -- so I figure we can just write tests that are ignored on windows and which pass `--color=always` or whatever to rustc. cc @jonathandturner r? @alexcrichton
2016-05-16pacify the mercilous tidyNiko Matsakis-1/+2
2016-05-13dump outputs, diff on UI test failureNiko Matsakis-14/+98
2016-05-13add UI testing frameworkNiko Matsakis-1/+90
2016-05-11Use symlink_metadata in tidy to avoid panicking on broken symlinks.Eduard Burtescu-1/+1
2016-05-09rustc: Implement custom panic runtimesAlex Crichton-0/+3
This commit is an implementation of [RFC 1513] which allows applications to alter the behavior of panics at compile time. A new compiler flag, `-C panic`, is added and accepts the values `unwind` or `panic`, with the default being `unwind`. This model affects how code is generated for the local crate, skipping generation of landing pads with `-C panic=abort`. [RFC 1513]: https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md Panic implementations are then provided by crates tagged with `#![panic_runtime]` and lazily required by crates with `#![needs_panic_runtime]`. The panic strategy (`-C panic` value) of the panic runtime must match the final product, and if the panic strategy is not `abort` then the entire DAG must have the same panic strategy. With the `-C panic=abort` strategy, users can expect a stable method to disable generation of landing pads, improving optimization in niche scenarios, decreasing compile time, and decreasing output binary size. With the `-C panic=unwind` strategy users can expect the existing ability to isolate failure in Rust code from the outside world. Organizationally, this commit dismantles the `sys_common::unwind` module in favor of some bits moving part of it to `libpanic_unwind` and the rest into the `panicking` module in libstd. The custom panic runtime support is pretty similar to the custom allocator support with the only major difference being how the panic runtime is injected (takes the `-C panic` flag into account).
2016-05-08Auto merge of #33365 - birkenfeld:makehelpfix, r=alexcrichtonbors-1/+1
Makefile: there is only one tidy target now Also removes mention of tidy.py from the tidy sources.
2016-05-08Auto merge of #33414 - Nercury:master, r=alexcrichtonbors-4/+4
Add armv7-linux-androideabi target This PR adds `armv7-linux-androideabi` target that matches `armeabi-v7a` Android ABI, ~~downscales `arm-linux-androideabi` target to match `armeabi` Android ABI~~ (TBD later if needed). This should allow us to get the best performance from every [Android ABI level](http://developer.android.com/ndk/guides/abis.html). Currently existing target `arm-linux-androideabi` started gaining features out of the supported range of [android `armeabi`](http://developer.android.com/ndk/guides/abis.html). While android compiler does not use a different target for later supported `armv7` architecture, it has distinct ABI name `armeabi-v7a`. We decided to add rust target `armv7-linux-androideabi` to match it. Note that `NEON`, `VFPv3-D32`, and `ThumbEE` instruction sets are not added, because not all android devices are guaranteed to support all or some of these, and [their availability should be checked at runtime](http://developer.android.com/ndk/guides/abis.html#v7a). ~~This reduces performance of existing `arm-linux-androideabi` and may make it _much_ slower (we are talking more than order of magnitude in some random ad-hoc fp benchmark that I did).~~ Part of #33278.
2016-05-08Rollup merge of #33404 - gsquire:cargo-lock, r=alexcrichtonManish Goregaokar-0/+45
Cargo lock tidy check A rebased PR for #32901
2016-05-08Auto merge of #33091 - sanxiyn:unused-trait-import-3, r=nrcbors-3/+1
Warn unused trait imports, rebased Rebase of #30021. Fix #25730.
2016-05-08Auto merge of #33130 - eddyb:mir-const, r=nikomatsakisbors-0/+5
Implement constant support in MIR. All of the intended features in `trans::consts` are now supported by `mir::constant`. The implementation is considered a temporary measure until `miri` replaces it. A `-Z orbit` bootstrap build will only translate LLVM IR from AST for `#[rustc_no_mir]` functions. Furthermore, almost all checks of constant expressions have been moved to MIR. In non-`const` functions, trees of temporaries are promoted, as per RFC 1414 (rvalue promotion). Promotion before MIR borrowck would allow reasoning about promoted values' lifetimes. The improved checking comes at the cost of four `[breaking-change]`s: * repeat counts must contain a constant expression, e.g.: `let arr = [0; { println!("foo"); 5 }];` used to be allowed (it behaved like `let arr = [0; 5];`) * dereference of a reference to a `static` cannot be used in another `static`, e.g.: `static X: [u8; 1] = [1]; static Y: u8 = (&X)[0];` was unintentionally allowed before * the type of a `static` *must* be `Sync`, irrespective of the initializer, e.g. `static FOO: *const T = &BAR;` worked as `&T` is `Sync`, but it shouldn't because `*const T` isn't * a `static` cannot wrap `UnsafeCell` around a type that *may* need drop, e.g. `static X: MakeSync<UnsafeCell<Option<String>>> = MakeSync(UnsafeCell::new(None));` was previously allowed based on the fact `None` alone doesn't need drop, but in `UnsafeCell` it can be later changed to `Some(String)` which *does* need dropping The drop restrictions are relaxed by RFC 1440 (#33156), which is implemented, but feature-gated. However, creating `UnsafeCell` from constants is unstable, so users can just enable the feature gate.
2016-05-07Always remove tmp/partitioning-tests before check-codegen-units to work ↵Eduard Burtescu-0/+5
around #33435.
2016-05-07Rollup merge of #33438 - birkenfeld:dup-words, r=steveklabnikSteve Klabnik-1/+1
Fix some some duplicate words.
2016-05-07Check for both arm and armv7 android targets in runtest.Nerijus Arlauskas-4/+4
2016-05-06s/aux/auxiliary, because windowsNiko Matsakis-3/+3
For legacy reasons (presumably), Windows does not permit files name aux.
2016-05-06kill the old auxiliary directoryNiko Matsakis-5/+0
2016-05-06move auxiliary builds to a test-relative `aux`Niko Matsakis-44/+61
Instead of finding aux-build files in `auxiliary`, we now search for an `aux` directory relative to the test. So if your test is `compile-fail/foo.rs`, we would look in `compile-fail/aux`. Similarly, we ignore the `aux` directory when searching for tets.
2016-05-06tweak incremental commentNiko Matsakis-9/+9
2016-05-06move free functions in runtest into methodsNiko Matsakis-1732/+1692
Also, promote the for loop iterating over revisions out into the top-level method, whereas before it was pushed down instead each test's method. Not entirely clear that this was the right call.
2016-05-06use methods for EarlyProps and TestPropsNiko Matsakis-214/+220
2016-05-06refactor interface of make_compile_argsNiko Matsakis-21/+26
2016-05-06Auto merge of #33225 - michaelwoerister:fix-debuginfo-struct-ns, r=eddybbors-47/+51
debuginfo: Fix regression in namespace handling for struct types. Fixes a small regression that has been introduced in recent refactorings. Fixes #33193 r? @eddyb
2016-05-05Fix some some duplicate words.Georg Brandl-1/+1
2016-05-04add a check to make tidy to ensure cargo lock file is updatedGarrett Squire-0/+45
2016-05-03mk: Pass CFLAGS for target, not hostAlex Crichton-0/+5
This changes the CFLAGS and related variables passed to compiletest to be passed for the target, not the host, so we can correctly test 32-bit cross compiles on 64-bit host machines. Hopefuly fixes #33379
2016-05-04Update commit hash in cargotestSeo Sanghyeon-1/+1
2016-05-03Make runtest::check_debugger_output() handle wildcards at end.Michael Woerister-47/+51
2016-05-03Remove unused trait imports flagged by lintSeo Sanghyeon-2/+0
2016-05-03Makefile: there is only one tidy target nowGeorg Brandl-1/+1
Also removes mention of tidy.py from the tidy sources.
2016-05-02adapt JSON to new modelNiko Matsakis-11/+36
Each Span now carries a `is_primary` boolean along with an optional label. If there are multiple labels for a span, it will appear multiple times.
2016-04-28Auto merge of #33093 - alexcrichton:rustbuild-rmake, r=nikomatsakisbors-17/+153
test: Move run-make tests into compiletest Forcing them to be embedded in makefiles precludes being able to run them in rustbuild, and adding them to compiletest gives us a great way to leverage future enhancements to our "all encompassing test suite runner" as well as just moving more things into Rust. All tests are still Makefile-based in the sense that they rely on `make` being available to run them, but there's no longer any Makefile-trickery to run them and rustbuild can now run them out of the box as well.
2016-04-28test: Move run-make tests into compiletestAlex Crichton-17/+153
Forcing them to be embedded in makefiles precludes being able to run them in rustbuild, and adding them to compiletest gives us a great way to leverage future enhancements to our "all encompassing test suite runner" as well as just moving more things into Rust. All tests are still Makefile-based in the sense that they rely on `make` being available to run them, but there's no longer any Makefile-trickery to run them and rustbuild can now run them out of the box as well.
2016-04-27Auto merge of #32791 - LeoTestard:feature-gate-clean, r=nikomatsakisbors-7/+7
Feature gate clean This PR does a bit of cleaning in the feature-gate-handling code of libsyntax. It also fixes two bugs (#32782 and #32648). Changes include: * Change the way the existing features are declared in `feature_gate.rs`. The array of features and the `Features` struct are now defined together by a single macro. `featureck.py` has been updated accordingly. Note: there are now three different arrays for active, removed and accepted features instead of a single one with a `Status` item to tell wether a feature is active, removed, or accepted. This is mainly due to the way I implemented my macro in the first time and I can switch back to a single array if needed. But an advantage of the way it is now is that when an active feature is used, the parser only searches through the list of active features. It goes through the other arrays only if the feature is not found. I like to think that error checking (in this case, checking that an used feature is active) does not slow down compilation of valid code. :) But this is not very important... * Feature-gate checking pass now use the `Features` structure instead of looking through a string vector. This should speed them up a bit. The construction of the `Features` struct should be faster too since it is build directly when parsing features instead of calling `has_feature` dozens of times. * The MacroVisitor pass has been removed, it was mostly useless since the `#[cfg]-stripping` phase happens before (fixes #32648). The features that must actually be checked before expansion are now checked at the time they are used. This also allows us to check attributes that are generated by macro expansion and not visible to MacroVisitor, but are also removed by macro expansion and thus not visible to PostExpansionVisitor either. This fixes #32782. Note that in order for `#[derive_*]` to be feature-gated but still accepted when generated by `#[derive(Trait)]`, I had to do a little bit of trickery with spans that I'm not totally confident into. Please review that part carefully. (It's in `libsyntax_ext/deriving/mod.rs`.):: Note: this is a [breaking change], since programs with feature-gated attributes on macro-generated macro invocations were not rejected before. For example: ```rust macro_rules! bar ( () => () ); macro_rules! foo ( () => ( #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps bar!(); ); ); ``` foo!();
2016-04-23Auto merge of #33084 - alexcrichton:osx-python-sanity, r=michaelwoeristerbors-6/+11
Sanity check Python on OSX for LLDB tests Two primary changes: * Don't get past the configure stage if `python` isn't coming from `/usr/bin` * Call `debugger.Terminate()` to prevent segfaults on newer versions of LLDB. Closes #32994
2016-04-22Fix filepath check for macro backtraceJonathan Turner-1/+1
2016-04-21Fix for filepath for cfail tests in windowsJonathan Turner-1/+4
2016-04-22Fix tidy for the new syntax of feature declarations in libsyntax.Leo Testard-7/+7
2016-04-21add serialize as a dep for compiletestNiko Matsakis-0/+13
2016-04-21move json.rs fileNiko Matsakis-0/+194
2016-04-21improve tidy to give you file that failedNiko Matsakis-4/+9
the current tidy panics give you no idea why it failed
2016-04-21port compiletest to use JSON outputNiko Matsakis-195/+149
This uncovered a lot of bugs in compiletest and also some shortcomings of our existing JSON output. We had to add information to the JSON output, such as suggested text and macro backtraces. We also had to fix various bugs in the existing tests. Joint work with jntrnr.
2016-04-19mk: Force system python for LLDB tests on OSXAlex Crichton-6/+11
Force usage of /usr/bin/python whenever we run LLDB tests on OSX because it looks like no other Python will work.
2016-04-18rustbuild: Add support for compiletest test suitesAlex Crichton-0/+3748
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.