about summary refs log tree commit diff
path: root/src/bootstrap/test.rs
AgeCommit message (Collapse)AuthorLines
2022-11-09Rollup merge of #104046 - RalfJung:run-miri-run, r=oli-obkMichael Goulet-43/+55
bootstrap: add support for running Miri on a file This enables: ``` ./x.py run src/tools/miri --stage 0 --args src/tools/miri/tests/pass/hello.rs ``` That can be super helpful for debugging. Also avoid sharing the Miri sysroot dir with a system-wide (rustup-managed) installation of Miri. Fixes https://github.com/rust-lang/rust/issues/76666
2022-11-06bootstrap: put Miri sysroot into local build dirRalf Jung-1/+9
2022-11-06bootstrap: add support for running Miri on a fileRalf Jung-43/+47
2022-11-06Rollup merge of #103851 - viandoxdev:103816_bootstrap_fix_json_doc, r=jyn514Matthias Krüger-1/+6
Fix json flag in bootstrap doc Fix the `--json` flag not working with x.py (Closes #103816) While this works I'm not sure about the `should_run` of `JsonStd`, had to change it because https://github.com/rust-lang/rust/blob/ab5a2bc7316012ee9b2a4a4f3821673f2677f3d5/src/bootstrap/builder.rs#L334 would match with JsonStd and remove the paths that Std matched. So I did [this](https://github.com/viandoxdev/rust/blob/ffd4078264c4892b5098d6191e0adfe3564d62ca/src/bootstrap/doc.rs#L526-L534) but that looks more like a hack/workaround than anything. I'm guessing there's something to do with the default condition thing but idk how it works
2022-11-02Ban dashes in miropt test file namesJakob Degen-0/+3
2022-11-02merge JsonStd and Std stepsviandoxdev-1/+6
2022-11-01Rollup merge of #103805 - Mark-Simulacrum:forward-port, r=jyn514Yuki Okushi-0/+3
Enable RUSTC_BOOTSTRAP for a few steps This forward-ports this commit so we don't need to keep applying it when branching beta (as done in 1.64, 1.65, and 1.66 beta bumps).
2022-10-31Auto merge of #102950 - oli-obk:check_miri, r=RalfJungbors-2/+2
Enable `x.py check` for miri Now that the miri subtree is working properly, let's add it to x.py check. cc `@rust-lang/miri`
2022-10-31Enable RUSTC_BOOTSTRAP for a few stepsMark Rousskov-0/+3
2022-10-30Rollup merge of #102101 - BelovDV:new-check-lld-version, r=petrochenkovMichael Howell-1/+4
check lld version to choose correct option to disable multi-threading in tests Testing compiler with 'use-lld = true' may be incorrect with old lld. Flag, disabling multi-threading, should consider lld version. r? ``@petrochenkov``
2022-10-29Rollup merge of #102634 - andrewpollack:refactor-test-rustcflags, ↵Guillaume Gomez-3/+7
r=Mark-Simulacrum compiletest: Refactor test rustcflags Refactoring `host-rustcflags` and `target-rustcflags` from `Option<String>` to `Vec<String>` Ref: #102438 r? `@Mark-Simulacrum`
2022-10-26check lld version to choose correct flag for testsDaniil Belov-1/+4
2022-10-24also smoke-test 'cargo miri test'Ralf Jung-2/+36
2022-10-24add support for testing Miri on other targets, and do some cross-testing on CIRalf Jung-3/+13
2022-10-19compiletest: refactor rustcflags to VecAndrew Pollack-3/+7
2022-10-12Enable `x.py check` for miriOli Scherer-2/+2
2022-10-11Auto merge of #102755 - pcc:data-local-tmp, r=Mark-Simulacrumbors-1/+1
tools/remote-test-{server,client}: Use /data/local/tmp on Android The /data/tmp directory does not exist, at least not on recent versions of Android, which currently leads to test failures on that platform. I checked a virtual device running AOSP master and a Nexus 5 running Android Marshmallow and on both devices the /data/tmp directory does not exist and /data/local/tmp does, so let's switch to /data/local/tmp.
2022-10-06tools/remote-test-{server,client}: Use /data/local/tmp on AndroidPeter Collingbourne-1/+1
The /data/tmp directory does not exist, at least not on recent versions of Android, which currently leads to test failures on that platform. I checked a virtual device running AOSP master and a Nexus 5 running Android Marshmallow and on both devices the /data/tmp directory does not exist and /data/local/tmp does, so let's switch to /data/local/tmp.
2022-10-06Auto merge of #102573 - RalfJung:mirisync, r=oli-obkbors-12/+0
Miri sync This is a Miri sync created with my experimental fork of josh. We should probably not merge this yet, but we can use this to check if the sync looks the way it should. r? `@oli-obk`
2022-10-04test Miri changes in PR CI; we no longer need xargoRalf Jung-12/+0
2022-09-24bootstrap/miri: switch to non-deprecated env var for setting the sysroot folderRalf Jung-1/+1
2022-09-21Remove miri from the submodule list and require it for CI to passOli Scherer-101/+88
2022-09-14jsondoclint: New ToolNixon Enraght-Moony-0/+2
2022-09-01Auto merge of #100606 - cuviper:upgrade-linux-ci, r=Mark-Simulacrumbors-1/+4
ci: Upgrade non-dist Linux testers from ubuntu:16.04 to 22.04 The main goal of updating to 22.04 is to get away from `llvm.allow-old-toolchain`. A side benefit is that they can also use the system `cmake` instead of building one.
2022-08-27Sunset RLSEric Huss-51/+0
2022-08-27Add replace-version-placeholder toolest31-0/+37
This tool is to be ran at specific points in the release process to replace the version place holder made by stabilizations with the version number.
2022-08-23rustbuild: fix version parsing for browser-ui-testJosh Stone-1/+4
2022-08-21Correct test-args to compiletest on Windowsczzrr-1/+9
2022-08-11Add instructions on how to update the browser-ui-test versionGuillaume Gomez-0/+5
2022-08-09Rollup merge of #100181 - RalfJung:alloc-ref-mutability, r=jackh726Dylan DPC-0/+4
add method to get the mutability of an AllocId Miri needs this for https://github.com/rust-lang/miri/issues/2463.
2022-08-07Auto merge of #100004 - jyn514:exclude-single-test, r=Mark-Simulacrumbors-0/+5
Move `x test --skip` to be part of `--exclude` `--skip` is inconsistent with the rest of the interface and redundant with `--exclude`. Fix --exclude to work properly for files and directories rather than having a separate flag. Fixes https://github.com/rust-lang/rust/issues/96342. cc https://github.com/rust-lang/rust/pull/96493#issuecomment-1200521720 r? `@Mark-Simulacrum`
2022-08-05propagate --bless to MiriRalf Jung-0/+4
2022-08-02Remove CARGO_TEST_DISABLE_GIT_CLIEric Huss-2/+0
This was a leftover from the Appveyor days.
2022-07-31Move `x test --skip` to be part of `--exclude`Joshua Nelson-0/+5
`--skip` is inconsistent with the rest of the interface and redundant with `--exclude`. Fix --exclude to work properly for files and directories rather than having a separate flag. If someone needs to use --skip for something other than compiletest, they can use `--test-args --skip` instead.
2022-07-28Build rust demangler before running run-make testsTomasz Miąsko-2/+6
2022-07-24Only run proc-macro-srv tests for now (after discussion with @Veykril, ↵Amos Wenger-4/+7
@jyn514, and @lnicola)
2022-07-24Don't run slow tests in Rust CI, only RA CIAmos Wenger-0/+4
2022-07-24Add comment about CARGO_WORKSPACE_DIRAmos Wenger-0/+2
2022-07-24Add test step for rust-analyzer, run it by defaultAmos Wenger-0/+49
2022-07-22miri: make --stage 0 testing workRalf Jung-0/+8
2022-07-07Rollup merge of #98994 - kons-9:dont_use_process_exit, r=jyn514Matthias Krüger-3/+3
replace process exit with more detailed exit in src/bootstrap/*.rs Fixes [#98830](https://github.com/rust-lang/rust/issues/98830) I implemeted "detail_exit.rs" in lib.rs, and replace all of std::process::exit. So, error code should panic in test code. ``` // lib.rs pub fn detail_exit(code: i32) -> ! { // Successful exit if code == 0 { std::process::exit(0); } if cfg!(test) { panic!("status code: {}", code); } else { std::panic::resume_unwind(Box::new(code)); } } ``` <details> <summary>% rg "exit\(" src/bootstrap/*.rs</summary> ``` builder.rs 351: crate::detail_exit(1); 1000: crate::detail_exit(1); 1429: crate::detail_exit(1); compile.rs 1331: crate::detail_exit(1); config.rs 818: crate::detail_exit(2); 1488: crate::detail_exit(1); flags.rs 263: crate::detail_exit(exit_code); 349: crate::detail_exit(exit_code); 381: crate::detail_exit(1); 602: crate::detail_exit(1); 616: crate::detail_exit(1); 807: crate::detail_exit(1); format.rs 35: crate::detail_exit(1); 117: crate::detail_exit(1); lib.rs 714: detail_exit(1); 1620: detail_exit(1); 1651:pub fn detail_exit(code: i32) -> ! { 1654: std::process::exit(0); sanity.rs 107: crate::detail_exit(1); setup.rs 97: crate::detail_exit(1); 290: crate::detail_exit(1); test.rs 676: crate::detail_exit(1); 1024: crate::detail_exit(1); 1254: crate::detail_exit(1); tool.rs 207: crate::detail_exit(1); toolstate.rs 96: crate::detail_exit(3); 111: crate::detail_exit(1); 182: crate::detail_exit(1); 228: crate::detail_exit(1); util.rs 339: crate::detail_exit(1); 378: crate::detail_exit(1); 468: crate::detail_exit(1); ``` </details>
2022-07-07squash the commitstoshiki goto-3/+3
implement detail_exit but I'm not sure it is right. not create new file and write detail exit in lib.rs replace std::process::exit to detail_exit that is not related to code runnning. remove pub
2022-07-05Rollup merge of #95503 - jyn514:build-single-crate, r=Mark-SimulacrumGuillaume Gomez-16/+16
bootstrap: Allow building individual crates This aims to be as unintrusive as possible, but did still require adding a new `tail_args` field to all `Rustc` and `Std` steps. New library and compiler crates are added to the sysroot as they are built, since it's useful to have e.g. just alloc and not std. Fixes https://github.com/rust-lang/rust/issues/44293.
2022-07-02Allow building single crates for the compiler and standard libraryJoshua Nelson-16/+16
- Add `Interned<Vec<String>>` and use it for tail args - Refactor `cache.rs` not to need a separate impl for each internable type
2022-07-02move optimize-tests flag handling from bootstrap to compiletestThe 8472-7/+1
2022-07-02Only obey optimize-tests flag on UI tests that are run-passThe 8472-1/+4
``` optimize-tests = false, master 25.98s optimize-tests = true, master 34.69s optimize-tests = true, patched 28.79s ``` Effects: - faster UI tests - llvm asserts get exercised less on build-pass tests - the difference between opt and nopt builds shrinks a bit - aux libs don't get optimized since they don't have a pass mode and almost never have explicit compile flags
2022-06-18Pass all paths to `Step::run` at once when using `ShouldRun::krate`Joshua Nelson-13/+22
This was surprisingly complicated. The main changes are: 1. Invert the order of iteration in `StepDescription::run`. Previously, it did something like: ```python for path in paths: for (step, should_run) in should_runs: if let Some(set) = should_run.pathset_for_path(path): step.run(builder, set) ``` That worked ok for individual paths, but didn't allow passing more than one path at a time to `Step::run` (since `pathset_for_paths` only had one path available to it). Change it to instead look at the intersection of `paths` and `should_run.paths`: ```python for (step, should_run) in should_runs: if let Some(set) = should_run.pathset_for_paths(paths): step.run(builder, set) ``` 2. Change `pathset_for_path` to take multiple pathsets. The goal is to avoid `x test library/alloc` testing *all* library crates, instead of just alloc. The changes here are similarly subtle, to use the intersection between the paths rather than all paths in `should_run.paths`. I added a test for the behavior to try and make it more clear. Note that we use pathsets instead of just paths to allow for sets with multiple aliases (*cough* `all_krates` *cough*). See the documentation added in the next commit for more detail. 3. Change `StepDescription::run` to explicitly handle 0 paths. Before this was implicitly handled by the `for` loop, which just didn't excute when there were no paths. Now it needs a check, to avoid trying to run all steps (this is a problem for steps that use `default_condition`). 4. Change `RunDescription` to have a list of pathsets, rather than a single path. 5. Remove paths as they're matched This allows checking at the end that no invalid paths are left over. Note that if two steps matched the same path, this will no longer run both; but that's a bug anyway. 6. Handle suite paths separately from regular sets. Running multiple suite paths at once instead of in separate `make_run` invocations is both tricky and not particularly useful. The respective test Steps already handle this by introspecting the original paths. Avoid having to deal with it by moving suite handling into a seperate loop than `PathSet::Set` checks.
2022-06-07Move beta rustfmt downloads to rustbuildJoshua Nelson-2/+2
2022-06-03Fully stabilize NLLJack Huey-6/+1
2022-05-30be less redundant redundantRalf Jung-4/+0