summary refs log tree commit diff
path: root/src/test/run-make
AgeCommit message (Collapse)AuthorLines
2018-02-23Encode linker arguments as UTF-16 on MSVC platformsMark Simulacrum-9/+37
2018-02-06Auto merge of #47203 - varkor:output-filename-conflicts-with-directory, ↵bors-2/+34
r=estebank Warn when rustc output conflicts with existing directories When the compiled executable would conflict with a directory, display a rustc error instead of a verbose and potentially-confusing linker error. This is a usability improvement, and doesn’t actually change behaviour with regards to compilation success. This addresses the concern in #35887. Fixes #13098.
2018-02-06Rollup merge of #48007 - nrc:rls-field-init, r=eddybkennytm-0/+8
save-analysis: avoid implicit unwrap When looking up a field defintion, since the name might be incorrect in the field init shorthand case. cc https://github.com/rust-lang-nursery/rls/issues/699 r? @eddyb
2018-02-06Rollup merge of #47496 - QuietMisdreavus:rls-doc-include, r=estebankkennytm-0/+5
add documentation from doc(include) to analysis data cc #44732 Currently save-analysis only loads docs from plain doc comments and doc attributes. Since `#[doc(include="filename.md")]` doesn't create a plain doc attribute when it loads the file, we need to be sure to pick up this info for the analysis data.
2018-02-05save-analysis: avoid implicit unwrapNick Cameron-0/+8
When looking up a field defintion, since the name might be incorrect in the field init shorthand case. cc https://github.com/rust-lang-nursery/rls/issues/699
2018-01-31Use file containing non-UTF-8 character instead of echo -evarkor-1/+3
2018-01-31Add echo escape flagvarkor-1/+1
2018-01-30add doc(include) to the save-analysis testQuietMisdreavus-0/+5
2018-01-31Fix ICE when reading non-UTF-8 input from stdinvarkor-0/+5
Fixes #22387.
2018-01-29Specify output filenames for compatibility with Windowsvarkor-4/+18
2018-01-29Fix quotation markvarkor-1/+1
2018-01-29Warn when rustc output conflicts with existing directoriesvarkor-0/+18
When the compiled executable would conflict with a directory, display a rustc error instead of a verbose and potentially-confusing linker error. This is a usability improvement, and doesn’t actually change behaviour with regards to compilation success. This addresses the concern in #35887.
2018-01-28Auto merge of #47671 - alexcrichton:trans-c-api-only, r=Mark-Simulacrumbors-6/+8
rustc: Load the `rustc_trans` crate at runtime Building on the work of #45684 this commit updates the compiler to unconditionally load the `rustc_trans` crate at runtime instead of linking to it at compile time. The end goal of this work is to implement #46819 where rustc will have multiple backends available to it to load. This commit starts off by removing the `extern crate rustc_trans` from the driver. This involved moving some miscellaneous functionality into the `TransCrate` trait and also required an implementation of how to locate and load the trans backend. This ended up being a little tricky because the sysroot isn't always the right location (for example `--sysroot` arguments) so some extra code was added as well to probe a directory relative to the current dll (the rustc_driver dll). Rustbuild has been updated accordingly as well to have a separate compilation invocation for the `rustc_trans` crate and assembly it accordingly into the sysroot. Finally, the distribution logic for the `rustc` package was also updated to slurp up the trans backends folder. A number of assorted fallout changes were included here as well to ensure tests pass and such, and they should all be commented inline.
2018-01-27rustc: Load the `rustc_trans` crate at runtimeAlex Crichton-6/+8
Building on the work of # 45684 this commit updates the compiler to unconditionally load the `rustc_trans` crate at runtime instead of linking to it at compile time. The end goal of this work is to implement # 46819 where rustc will have multiple backends available to it to load. This commit starts off by removing the `extern crate rustc_trans` from the driver. This involved moving some miscellaneous functionality into the `TransCrate` trait and also required an implementation of how to locate and load the trans backend. This ended up being a little tricky because the sysroot isn't always the right location (for example `--sysroot` arguments) so some extra code was added as well to probe a directory relative to the current dll (the rustc_driver dll). Rustbuild has been updated accordingly as well to have a separate compilation invocation for the `rustc_trans` crate and assembly it accordingly into the sysroot. Finally, the distribution logic for the `rustc` package was also updated to slurp up the trans backends folder. A number of assorted fallout changes were included here as well to ensure tests pass and such, and they should all be commented inline.
2018-01-27Auto merge of #46450 - Gilnaa:libtest_json_output, r=nrcbors-0/+74
Libtest json output A revisit to my [last PR](https://github.com/rust-lang/rust/pull/45923). Events are now more atomic, printed in a flat hierarchy. For the normal test output: ``` running 1 test test f ... FAILED failures: ---- f stdout ---- thread 'f' panicked at 'assertion failed: `(left == right)` left: `3`, right: `4`', f.rs:3:1 note: Run with `RUST_BACKTRACE=1` for a backtrace. failures: f test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ``` The JSON equivalent is: ``` { "type": "suite", "event": "started", "test_count": "1" } { "type": "test", "event": "started", "name": "f" } { "type": "test", "event": "failed", "name": "f" } { "type": "suite", "event": "failed", "passed": 0, "failed": 1, "allowed_fail": 0, "ignored": 0, "measured": 0, "filtered_out": "0" } { "type": "test_output", "name": "f", "output": "thread 'f' panicked at 'assertion failed: `(left == right)` left: `3`, right: `4`', f.rs:3:1 note: Run with `RUST_BACKTRACE=1` for a backtrace. " } ```
2018-01-27libtest: Fixed call to python in run-makeGilad Naaman-1/+1
2018-01-26libtest: Split-up formatters.rs into smaller modulesGilad Naaman-2/+13
libtest: Split HumanFormatter into {Pretty,Terse} libtest: Fixed padding of benchmarks when not benchmarking libtest: Fixed benchmarks' names not showing in terse-mode libtest: Formatting
2018-01-26libtest: Added UI tests for --format=jsonGilad Naaman-0/+63
libtest: Remove usage of jq libtest: Fixed UI tests - Now comparing to the right file. - A python script checks for validity of JSON documents
2018-01-25Merge branch 'configure-lto' of https://github.com/alexcrichton/rust into rollupAlex Crichton-3/+3
2018-01-25Rollup merge of #47453 - pftbest:nointas, r=alexcrichtonAlex Crichton-0/+20
Fix no_integrated_as option to work with new codegen architecture. Old implementation called the assembler once per crate, but we need to call it for each object file instead, because a single crate can now have more than one object file. This patch fixes issue #45836 (Can't compile core for msp430 in release mode) This change can be tested on x86_64 using ```sh export RUSTFLAGS="-C no_integrated_as -C save_temps" ``` r? @alexcrichton cc @japaric
2018-01-23rustc: Add `-C lto=val` optionAlex Crichton-3/+3
This commit primarily adds the ability to control what kind of LTO happens when rustc performs LTO, namely allowing values to be specified to the `-C lto` option, such as `-C lto=thin` and `-C lto=fat`. (where "fat" is the previous kind of LTO, throw everything in one giant module) Along the way this also refactors a number of fields which store information about whether LTO/ThinLTO are enabled to unify them all into one field through which everything is dispatched, hopefully removing a number of special cases throughout. This is intended to help mitigate #47409 but will require a backport as well, and this would unfortunately need to be an otherwise insta-stable option.
2018-01-23Rollup merge of #47440 - mark-i-m:zunpretty, r=nikomatsakiskennytm-5/+4
Change the --unpretty flag to -Z unpretty First PR :smile: ! -Z unpretty no longer requires -Z unstable-options. Also, I mildly changed the syntax of the flag to match the other -Z flags. All uses of the flag take the form `unpretty=something` where something can either `string` or `string=string` (see the help messages of the CLI). Fix #47395 r? @nikomatsakis EDIT: apparently rust-highfive doesn't see edits...
2018-01-21rustc: Lower link args to `@`-files on Windows moreAlex Crichton-0/+103
When spawning a linker rustc has historically been known to blow OS limits for the command line being too large, notably on Windows. This is especially true of incremental compilation where there can be dozens of object files per compilation. The compiler currently has logic for detecting a failure to spawn and instead passing arguments via a file instead, but this failure detection only triggers if a process actually fails to spawn. Unfortunately on Windows we've got something else to worry about which is `cmd.exe`. The compiler may be running a linker through `cmd.exe` where `cmd.exe` has a limit of 8192 on the command line vs 32k on `CreateProcess`. Moreso rustc actually succeeds in spawning `cmd.exe` today, it's just that after it's running `cmd.exe` fails to spawn its child, which rustc doesn't currently detect. Consequently this commit updates the logic for the spawning the linker on Windows to instead have a heuristic to see if we need to pass arguments via a file. This heuristic is an overly pessimistic and "inaccurate" calculation which just calls `len` on a bunch of `OsString` instances (where `len` is not precisely the length in u16 elements). This number, when exceeding the 6k threshold, will force rustc to always pass arguments through a file. This strategy should avoid us trying to parse the output on Windows of the linker to see if it successfully spawned yet failed to actually sub-spawn the linker. We may just be passing arguments through files a little more commonly now... The motivation for this commit was a recent bug in Gecko [1] when beta testing, notably when incremental compilation was enabled it blew out the limit on `cmd.exe`. This commit will also fix #46999 as well though as emscripten uses a bat script as well (and we're blowing the limit there). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1430886 Closes #46999
2018-01-20Remove the 'extern "C"' in the right placebjorn3-1/+1
2018-01-19Hopefully fix the 32bit SEGVbjorn3-1/+0
2018-01-19Add missing licensesbjorn3-1/+21
2018-01-19Fix hotplug backend and add testbjorn3-0/+85
2018-01-19Allow runtime switching between trans backendsbjorn3-98/+18
2018-01-18Change the --unpretty flag to -Z unprettyMark Mansi-5/+4
-Z unpretty no longer requires -Z unstable-options. Also, I mildly changed the syntax of the flag to match the other -Z flags. All uses of the flag take the form `unpretty=something` where something can either `string` or `string=string` (see the help messages of the CLI).
2018-01-16Add run-make test for no_integrated_as flag.Vadzim Dambrouski-0/+20
2018-01-15Reexport -> re-export in prose and documentation commentsCarol (Nichols || Goulding)-1/+1
2018-01-14Auto merge of #47274 - Manishearth:rustdoc-span, r=QuietMisdreavusbors-0/+29
Use correct line offsets for doctests Not yet tested. This doesn't handle char positions. It could if I collected a map of char offsets and lines, but this is a bit more work and requires hooking into the parser much more (unsure if it's possible). r? @QuietMisdreavus (fixes #45868)
2018-01-13Adjust tests for removal of `impl Foo for .. {}`leonardo.yvens-6/+2
2018-01-10Add test for #45868Manish Goregaokar-0/+29
2018-01-10Fix typoRyan Cumming-1/+1
2018-01-10Restore the original Window commentRyan Cumming-2/+6
The Windows situation is more complicated than I realised
2018-01-09Skip linker-output-non-utf8 test on AppleRyan Cumming-8/+12
This test fails on APFS filesystems with the following error: mkdir: /Users/ryan/Code/rust/build/x86_64-apple-darwin/test/run-make/linker-output-non-utf8.stage2-x86_64-apple-darwin/zzz�: Illegal byte sequence This is due to APFS now requiring that all paths are valid UTF-8. As APFS will be the default filesystem for all new Darwin-based systems the most straightforward fix is to skip this test on Darwin as well as Windows.
2017-12-30Remove excessive trailing newlines.kennytm-4/+0
2017-12-26Revert "Just compare the symbol names and types, not the addresses"Bastian Köcher-6/+6
This reverts commit 7d4d98e5c870a2dcdca8ea3aa47ecee680a35e60.
2017-12-26Use `start` for the `sepcomp-inlining` testBastian Köcher-3/+8
2017-12-26The test functions are now in the same compile unitBastian Köcher-2/+2
2017-12-26Just compare the symbol names and types, not the addressesBastian Köcher-6/+6
2017-12-22Rollup merge of #46858 - QuietMisdreavus:external-doc-error, r=estebankkennytm-1/+7
tweaks and fixes for doc(include) This PR makes a handful of changes around `#[doc(include="file.md")]` (https://github.com/rust-lang/rust/issues/44732): * Turns errors when loading files into full errors. This matches the original RFC text. * Makes the `missing_docs` lint check for `#[doc(include="file.md")]` as well as regular `#[doc="text"]` attributes. * Loads files included by `#[doc(include="file.md")]` into dep-info, mirroring the behavior of `include_str!()` and friends. * Adds or modifies tests to check for all of these.
2017-12-19add files loaded through doc(include) into dep-infoQuietMisdreavus-1/+7
2017-12-19Fix a `compile_input` testvarkor-1/+1
2017-12-18Prevent rustc overwriting input filesvarkor-2/+23
If rustc is invoked on a file that would be overwritten by the compilation, the compilation now fails, to avoid accidental loss. This resolves #13019.
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-5/+5
2017-12-04rustc_back: move dynamic_lib to rustc_metadata.Irina-Gabriela Popa-2/+2
2017-11-28Disable the cdylib-fewer-symbols test for all Windows (test was broken).kennytm-1/+3
2017-11-28Replace most call to grep in run-make by a script that cat the input.kennytm-119/+152
Introduced a new src/etc/cat-and-grep.sh script (called in run-make as $(CGREP)), which prints the input and do a grep simultaneously. This is mainly used to debug spurious failures in run-make, such as the sanitizer error in #45810, as well as real errors such as #46126.