summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_codegen_cranelift/build_system/tests.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /compiler/rustc_codegen_cranelift/build_system/tests.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_codegen_cranelift/build_system/tests.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/build_system/tests.rs68
1 files changed, 24 insertions, 44 deletions
diff --git a/compiler/rustc_codegen_cranelift/build_system/tests.rs b/compiler/rustc_codegen_cranelift/build_system/tests.rs
index e7bd8b127..10736ff9a 100644
--- a/compiler/rustc_codegen_cranelift/build_system/tests.rs
+++ b/compiler/rustc_codegen_cranelift/build_system/tests.rs
@@ -9,7 +9,7 @@ use crate::path::{Dirs, RelPath};
use crate::prepare::{apply_patches, GitRepo};
use crate::rustc_info::get_default_sysroot;
use crate::shared_utils::rustflags_from_env;
-use crate::utils::{spawn_and_wait, spawn_and_wait_with_input, CargoProject, Compiler, LogGroup};
+use crate::utils::{spawn_and_wait, CargoProject, Compiler, LogGroup};
use crate::{CodegenBackend, SysrootKind};
static BUILD_EXAMPLE_OUT_DIR: RelPath = RelPath::BUILD.join("example");
@@ -99,15 +99,14 @@ const BASE_SYSROOT_SUITE: &[TestCase] = &[
TestCase::build_bin_and_run("aot.mod_bench", "example/mod_bench.rs", &[]),
TestCase::build_bin_and_run("aot.issue-72793", "example/issue-72793.rs", &[]),
TestCase::build_bin("aot.issue-59326", "example/issue-59326.rs"),
+ TestCase::build_bin_and_run("aot.neon", "example/neon.rs", &[]),
];
-// FIXME(rust-random/rand#1293): Newer rand versions fail to test on Windows. Update once this is
-// fixed.
pub(crate) static RAND_REPO: GitRepo = GitRepo::github(
"rust-random",
"rand",
- "50b9a447410860af8d6db9a208c3576886955874",
- "446203b96054891e",
+ "9a02c819cc1e4ec6959ae25eafbb5cf6acb68234",
+ "4934f0afb1d1c2ca",
"rand",
);
@@ -116,8 +115,8 @@ pub(crate) static RAND: CargoProject = CargoProject::new(&RAND_REPO.source_dir()
pub(crate) static REGEX_REPO: GitRepo = GitRepo::github(
"rust-lang",
"regex",
- "32fed9429eafba0ae92a64b01796a0c5a75b88c8",
- "fcc4df7c5b902633",
+ "061ee815ef2c44101dba7b0b124600fcb03c1912",
+ "dc26aefbeeac03ca",
"regex",
);
@@ -126,8 +125,8 @@ pub(crate) static REGEX: CargoProject = CargoProject::new(&REGEX_REPO.source_dir
pub(crate) static PORTABLE_SIMD_REPO: GitRepo = GitRepo::github(
"rust-lang",
"portable-simd",
- "7c7dbe0c505ccbc02ff30c1e37381ab1d47bf46f",
- "5bcc9c544f6fa7bd",
+ "4825b2a64d765317066948867e8714674419359b",
+ "9e67d07c00f5fb0b",
"portable-simd",
);
@@ -180,40 +179,6 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
spawn_and_wait(build_cmd);
}
}),
- TestCase::custom("test.regex-shootout-regex-dna", &|runner| {
- REGEX_REPO.patch(&runner.dirs);
-
- REGEX.clean(&runner.dirs);
-
- let mut build_cmd = REGEX.build(&runner.target_compiler, &runner.dirs);
- build_cmd.arg("--example").arg("shootout-regex-dna");
- spawn_and_wait(build_cmd);
-
- if runner.is_native {
- let mut run_cmd = REGEX.run(&runner.target_compiler, &runner.dirs);
- run_cmd.arg("--example").arg("shootout-regex-dna");
-
- let input = fs::read_to_string(
- REGEX.source_dir(&runner.dirs).join("examples").join("regexdna-input.txt"),
- )
- .unwrap();
- let expected = fs::read_to_string(
- REGEX.source_dir(&runner.dirs).join("examples").join("regexdna-output.txt"),
- )
- .unwrap();
-
- let output = spawn_and_wait_with_input(run_cmd, input);
-
- let output_matches = expected.lines().eq(output.lines());
- if !output_matches {
- println!("Output files don't match!");
- println!("Expected Output:\n{}", expected);
- println!("Actual Output:\n{}", output);
-
- std::process::exit(1);
- }
- }
- }),
TestCase::custom("test.regex", &|runner| {
REGEX_REPO.patch(&runner.dirs);
@@ -223,7 +188,22 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
let mut run_cmd = REGEX.test(&runner.target_compiler, &runner.dirs);
// regex-capi and regex-debug don't have any tests. Nor do they contain any code
// that is useful to test with cg_clif. Skip building them to reduce test time.
- run_cmd.args(["-p", "regex", "-p", "regex-syntax", "--", "-q"]);
+ run_cmd.args([
+ "-p",
+ "regex",
+ "-p",
+ "regex-syntax",
+ "--release",
+ "--all-targets",
+ "--",
+ "-q",
+ ]);
+ spawn_and_wait(run_cmd);
+
+ let mut run_cmd = REGEX.test(&runner.target_compiler, &runner.dirs);
+ // don't run integration tests for regex-autonata. they take like 2min each without
+ // much extra coverage of simd usage.
+ run_cmd.args(["-p", "regex-automata", "--release", "--lib", "--", "-q"]);
spawn_and_wait(run_cmd);
} else {
eprintln!("Cross-Compiling: Not running tests");