Skip to content

Commit 7610be4

Browse files
committed
Move abi-checker to y.rs test
1 parent e5ba71a commit 7610be4

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ jobs:
105105
106106
./y.rs test
107107
108-
109-
- name: Run abi-checker
110-
if: matrix.env.TARGET_TRIPLE == ''
111-
run: ./y.rs abi-checker
112-
113108
- name: Package prebuilt cg_clif
114109
run: tar cvfJ cg_clif.tar.xz build
115110

build_system/abi_checker.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use super::build_sysroot;
2+
use super::config;
23
use super::utils::spawn_and_wait_with_input;
34
use build_system::SysrootKind;
45
use std::env;
@@ -13,10 +14,15 @@ pub(crate) fn run(
1314
host_triple: &str,
1415
target_triple: &str,
1516
) {
16-
assert_eq!(
17-
host_triple, target_triple,
18-
"abi-checker not supported on cross-compilation scenarios"
19-
);
17+
if !config::get_bool("testsuite.abi-checker") {
18+
eprintln!("[SKIP] abi-checker");
19+
return;
20+
}
21+
22+
if host_triple != target_triple {
23+
eprintln!("[SKIP] abi-checker (cross-compilation not supported)");
24+
return;
25+
}
2026

2127
eprintln!("Building sysroot for abi-checker");
2228
build_sysroot::build_sysroot(

build_system/mod.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ fn usage() {
2222
eprintln!(
2323
" ./y.rs test [--debug] [--sysroot none|clif|llvm] [--target-dir DIR] [--no-unstable-features]"
2424
);
25-
eprintln!(
26-
" ./y.rs abi-checker [--debug] [--sysroot none|clif|llvm] [--target-dir DIR] [--no-unstable-features]"
27-
);
2825
}
2926

3027
macro_rules! arg_error {
@@ -39,7 +36,6 @@ macro_rules! arg_error {
3936
enum Command {
4037
Build,
4138
Test,
42-
AbiChecker,
4339
}
4440

4541
#[derive(Copy, Clone, Debug)]
@@ -71,7 +67,6 @@ pub fn main() {
7167
}
7268
Some("build") => Command::Build,
7369
Some("test") => Command::Test,
74-
Some("abi-checker") => Command::AbiChecker,
7570
Some(flag) if flag.starts_with('-') => arg_error!("Expected command found flag {}", flag),
7671
Some(command) => arg_error!("Unknown command {}", command),
7772
None => {
@@ -147,9 +142,8 @@ pub fn main() {
147142
&host_triple,
148143
&target_triple,
149144
);
150-
}
151-
Command::Build => {
152-
build_sysroot::build_sysroot(
145+
146+
abi_checker::run(
153147
channel,
154148
sysroot_kind,
155149
&target_dir,
@@ -158,8 +152,8 @@ pub fn main() {
158152
&target_triple,
159153
);
160154
}
161-
Command::AbiChecker => {
162-
abi_checker::run(
155+
Command::Build => {
156+
build_sysroot::build_sysroot(
163157
channel,
164158
sysroot_kind,
165159
&target_dir,

config.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ test.libcore
4848
test.regex-shootout-regex-dna
4949
test.regex
5050
test.portable-simd
51+
52+
testsuite.abi-checker

0 commit comments

Comments
 (0)