Rename tests/assembly into tests/assembly-llvm

This commit is contained in:
Guillaume Gomez 2025-07-21 14:22:51 +02:00
parent c0b282f0cc
commit ed93c1783b
124 changed files with 22 additions and 17 deletions

View file

@ -588,7 +588,7 @@ fn asm_tests(env: &Env, args: &TestArg) -> Result<(), String> {
&"always",
&"--stage",
&"0",
&"tests/assembly/asm",
&"tests/assembly-llvm/asm",
&"--compiletest-rustc-args",
&rustc_args,
],

View file

@ -1407,7 +1407,12 @@ test!(Pretty {
test!(RunMake { path: "tests/run-make", mode: "run-make", suite: "run-make", default: true });
test!(Assembly { path: "tests/assembly", mode: "assembly", suite: "assembly", default: true });
test!(AssemblyLlvm {
path: "tests/assembly-llvm",
mode: "assembly",
suite: "assembly-llvm",
default: true
});
/// Runs the coverage test suite at `tests/coverage` in some or all of the
/// coverage test modes.

View file

@ -411,7 +411,7 @@ const PATH_REMAP: &[(&str, &[&str])] = &[
"tests",
&[
// tidy-alphabetical-start
"tests/assembly",
"tests/assembly-llvm",
"tests/codegen",
"tests/codegen-units",
"tests/coverage",
@ -1051,7 +1051,7 @@ impl<'a> Builder<'a> {
test::MirOpt,
test::Codegen,
test::CodegenUnits,
test::Assembly,
test::AssemblyLlvm,
test::Incremental,
test::Debuginfo,
test::UiFullDeps,

View file

@ -66,13 +66,13 @@ ENV WASM_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_T
tests/mir-opt \
tests/codegen-units \
tests/codegen \
tests/assembly \
tests/assembly-llvm \
library/core
ENV NVPTX_TARGETS=nvptx64-nvidia-cuda
ENV NVPTX_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $NVPTX_TARGETS \
tests/run-make \
tests/assembly
tests/assembly-llvm
ENV MUSL_TARGETS=x86_64-unknown-linux-musl \
CC_x86_64_unknown_linux_musl=x86_64-linux-musl-gcc \

View file

@ -155,9 +155,9 @@ can't know ahead of time whether a function will require a frame/base pointer.
Various tests for inline assembly are available:
- `tests/assembly/asm`
- `tests/assembly-llvm/asm`
- `tests/ui/asm`
- `tests/codegen/asm-*`
Every architecture supported by inline assembly must have exhaustive tests in
`tests/assembly/asm` which test all combinations of register classes and types.
`tests/assembly-llvm/asm` which test all combinations of register classes and types.

View file

@ -307,7 +307,7 @@ If you need to work with `#![no_std]` cross-compiling tests, consult the
### Assembly tests
The tests in [`tests/assembly`] test LLVM assembly output. They compile the test
The tests in [`tests/assembly-llvm`] test LLVM assembly output. They compile the test
with the `--emit=asm` flag to emit a `.s` file with the assembly output. They
then run the LLVM [FileCheck] tool.
@ -324,7 +324,7 @@ See also the [codegen tests](#codegen-tests) for a similar set of tests.
If you need to work with `#![no_std]` cross-compiling tests, consult the
[`minicore` test auxiliary](./minicore.md) chapter.
[`tests/assembly`]: https://github.com/rust-lang/rust/tree/master/tests/assembly
[`tests/assembly-llvm`]: https://github.com/rust-lang/rust/tree/master/tests/assembly-llvm
### Codegen-units tests

View file

@ -100,7 +100,7 @@ llvm-config = "{llvm_config}"
env.host_tuple(),
"--stage",
"0",
"tests/assembly",
"tests/assembly-llvm",
"tests/codegen",
"tests/codegen-units",
"tests/incremental",

View file

@ -8,7 +8,7 @@ use std::path::Path;
use crate::walk::{filter_not_rust, walk};
const TARGET_DEFINITIONS_PATH: &str = "compiler/rustc_target/src/spec/targets/";
const ASSEMBLY_TEST_PATH: &str = "tests/assembly/targets/";
const ASSEMBLY_LLVM_TEST_PATH: &str = "tests/assembly-llvm/targets/";
const REVISION_LINE_START: &str = "//@ revisions: ";
const EXCEPTIONS: &[&str] = &[
// FIXME: disabled since it fails on CI saying the csky component is missing
@ -43,7 +43,7 @@ pub fn check(root_path: &Path, bad: &mut bool) {
let _ = targets_to_find.insert(target_name);
}
walk(&root_path.join(ASSEMBLY_TEST_PATH), |_, _| false, &mut |_, contents| {
walk(&root_path.join(ASSEMBLY_LLVM_TEST_PATH), |_, _| false, &mut |_, contents| {
for line in contents.lines() {
let Some(_) = line.find(REVISION_LINE_START) else {
continue;
@ -55,7 +55,7 @@ pub fn check(root_path: &Path, bad: &mut bool) {
for target in targets_to_find {
if !EXCEPTIONS.contains(&target.as_str()) {
tidy_error!(bad, "{ASSEMBLY_TEST_PATH}: missing assembly test for {target}")
tidy_error!(bad, "{ASSEMBLY_LLVM_TEST_PATH}: missing assembly test for {target}")
}
}
}

Some files were not shown because too many files have changed in this diff Show more