Move abi-checker to y.rs test
This commit is contained in:
parent
e5ba71a71b
commit
7610be478f
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
@ -105,11 +105,6 @@ jobs:
|
|||||||
|
|
||||||
./y.rs test
|
./y.rs test
|
||||||
|
|
||||||
|
|
||||||
- name: Run abi-checker
|
|
||||||
if: matrix.env.TARGET_TRIPLE == ''
|
|
||||||
run: ./y.rs abi-checker
|
|
||||||
|
|
||||||
- name: Package prebuilt cg_clif
|
- name: Package prebuilt cg_clif
|
||||||
run: tar cvfJ cg_clif.tar.xz build
|
run: tar cvfJ cg_clif.tar.xz build
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
use super::build_sysroot;
|
use super::build_sysroot;
|
||||||
|
use super::config;
|
||||||
use super::utils::spawn_and_wait_with_input;
|
use super::utils::spawn_and_wait_with_input;
|
||||||
use build_system::SysrootKind;
|
use build_system::SysrootKind;
|
||||||
use std::env;
|
use std::env;
|
||||||
@ -13,10 +14,15 @@ pub(crate) fn run(
|
|||||||
host_triple: &str,
|
host_triple: &str,
|
||||||
target_triple: &str,
|
target_triple: &str,
|
||||||
) {
|
) {
|
||||||
assert_eq!(
|
if !config::get_bool("testsuite.abi-checker") {
|
||||||
host_triple, target_triple,
|
eprintln!("[SKIP] abi-checker");
|
||||||
"abi-checker not supported on cross-compilation scenarios"
|
return;
|
||||||
);
|
}
|
||||||
|
|
||||||
|
if host_triple != target_triple {
|
||||||
|
eprintln!("[SKIP] abi-checker (cross-compilation not supported)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
eprintln!("Building sysroot for abi-checker");
|
eprintln!("Building sysroot for abi-checker");
|
||||||
build_sysroot::build_sysroot(
|
build_sysroot::build_sysroot(
|
||||||
|
@ -22,9 +22,6 @@ fn usage() {
|
|||||||
eprintln!(
|
eprintln!(
|
||||||
" ./y.rs test [--debug] [--sysroot none|clif|llvm] [--target-dir DIR] [--no-unstable-features]"
|
" ./y.rs test [--debug] [--sysroot none|clif|llvm] [--target-dir DIR] [--no-unstable-features]"
|
||||||
);
|
);
|
||||||
eprintln!(
|
|
||||||
" ./y.rs abi-checker [--debug] [--sysroot none|clif|llvm] [--target-dir DIR] [--no-unstable-features]"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! arg_error {
|
macro_rules! arg_error {
|
||||||
@ -39,7 +36,6 @@ macro_rules! arg_error {
|
|||||||
enum Command {
|
enum Command {
|
||||||
Build,
|
Build,
|
||||||
Test,
|
Test,
|
||||||
AbiChecker,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
@ -71,7 +67,6 @@ pub fn main() {
|
|||||||
}
|
}
|
||||||
Some("build") => Command::Build,
|
Some("build") => Command::Build,
|
||||||
Some("test") => Command::Test,
|
Some("test") => Command::Test,
|
||||||
Some("abi-checker") => Command::AbiChecker,
|
|
||||||
Some(flag) if flag.starts_with('-') => arg_error!("Expected command found flag {}", flag),
|
Some(flag) if flag.starts_with('-') => arg_error!("Expected command found flag {}", flag),
|
||||||
Some(command) => arg_error!("Unknown command {}", command),
|
Some(command) => arg_error!("Unknown command {}", command),
|
||||||
None => {
|
None => {
|
||||||
@ -147,6 +142,15 @@ pub fn main() {
|
|||||||
&host_triple,
|
&host_triple,
|
||||||
&target_triple,
|
&target_triple,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
abi_checker::run(
|
||||||
|
channel,
|
||||||
|
sysroot_kind,
|
||||||
|
&target_dir,
|
||||||
|
&cg_clif_build_dir,
|
||||||
|
&host_triple,
|
||||||
|
&target_triple,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
Command::Build => {
|
Command::Build => {
|
||||||
build_sysroot::build_sysroot(
|
build_sysroot::build_sysroot(
|
||||||
@ -158,15 +162,5 @@ pub fn main() {
|
|||||||
&target_triple,
|
&target_triple,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Command::AbiChecker => {
|
|
||||||
abi_checker::run(
|
|
||||||
channel,
|
|
||||||
sysroot_kind,
|
|
||||||
&target_dir,
|
|
||||||
&cg_clif_build_dir,
|
|
||||||
&host_triple,
|
|
||||||
&target_triple,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,3 +48,5 @@ test.libcore
|
|||||||
test.regex-shootout-regex-dna
|
test.regex-shootout-regex-dna
|
||||||
test.regex
|
test.regex
|
||||||
test.portable-simd
|
test.portable-simd
|
||||||
|
|
||||||
|
testsuite.abi-checker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user