Skip to content

Commit aeb198b

Browse files
committed
Make more of the test suite run on Mac Catalyst
This adds the `only-apple`/`ignore-apple` compiletest directive, and uses that basically everywhere instead of `only-macos`/`ignore-macos`. Some of the updates in `run-make` are a bit redundant, as they use `ignore-cross-compile` and won't run on iOS - but using Apple in these is still more correct, so I've made that change anyhow.
1 parent 6ac7fe7 commit aeb198b

File tree

41 files changed

+98
-93
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+98
-93
lines changed

library/std/src/fs/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ fn metadata_access_times() {
14311431
assert_eq!(check!(a.modified()), check!(a.modified()));
14321432
assert_eq!(check!(b.accessed()), check!(b.modified()));
14331433

1434-
if cfg!(target_os = "macos") || cfg!(target_os = "windows") {
1434+
if cfg!(target_vendor = "apple") || cfg!(target_os = "windows") {
14351435
check!(a.created());
14361436
check!(b.created());
14371437
}

src/bootstrap/src/utils/dylib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
pub fn dylib_path_var() -> &'static str {
66
if cfg!(target_os = "windows") {
77
"PATH"
8-
} else if cfg!(target_os = "macos") {
8+
} else if cfg!(target_vendor = "apple") {
99
"DYLD_LIBRARY_PATH"
1010
} else if cfg!(target_os = "haiku") {
1111
"LIBRARY_PATH"

src/tools/compiletest/src/header.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
747747
"ignore-aarch64",
748748
"ignore-aarch64-unknown-linux-gnu",
749749
"ignore-android",
750+
"ignore-apple",
750751
"ignore-arm",
751752
"ignore-avr",
752753
"ignore-beta",
@@ -829,7 +830,6 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
829830
"ignore-x32",
830831
"ignore-x86",
831832
"ignore-x86_64",
832-
"ignore-x86_64-apple-darwin",
833833
"ignore-x86_64-unknown-linux-gnu",
834834
"incremental",
835835
"known-bug",
@@ -876,6 +876,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
876876
"only-32bit",
877877
"only-64bit",
878878
"only-aarch64",
879+
"only-apple",
879880
"only-arm",
880881
"only-avr",
881882
"only-beta",

src/tools/compiletest/src/header/cfg.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ pub(super) fn parse_cfg_name_directive<'a>(
159159
message: "when the architecture is part of the Thumb family"
160160
}
161161

162+
condition! {
163+
name: "apple",
164+
condition: config.target.contains("apple"),
165+
message: "when the target vendor is Apple"
166+
}
167+
162168
// Technically the locally built compiler uses the "dev" channel rather than the "nightly"
163169
// channel, even though most people don't know or won't care about it. To avoid confusion, we
164170
// treat the "dev" channel as the "nightly" channel when processing the directive.

src/tools/compiletest/src/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ fn get_lib_name(lib: &str, aux_type: AuxType) -> Option<String> {
9898
AuxType::Lib => Some(format!("lib{}.rlib", lib)),
9999
AuxType::Dylib => Some(if cfg!(windows) {
100100
format!("{}.dll", lib)
101-
} else if cfg!(target_os = "macos") {
101+
} else if cfg!(target_vendor = "apple") {
102102
format!("lib{}.dylib", lib)
103103
} else {
104104
format!("lib{}.so", lib)

src/tools/compiletest/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl PathBufExt for PathBuf {
5757
pub fn dylib_env_var() -> &'static str {
5858
if cfg!(windows) {
5959
"PATH"
60-
} else if cfg!(target_os = "macos") {
60+
} else if cfg!(target_vendor = "apple") {
6161
"DYLD_LIBRARY_PATH"
6262
} else if cfg!(target_os = "haiku") {
6363
"LIBRARY_PATH"

src/tools/tidy/src/issues.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,6 @@ ui/issues/issue-33687.rs
21222122
ui/issues/issue-33770.rs
21232123
ui/issues/issue-3389.rs
21242124
ui/issues/issue-33941.rs
2125-
ui/issues/issue-33992.rs
21262125
ui/issues/issue-34047.rs
21272126
ui/issues/issue-34074.rs
21282127
ui/issues/issue-34209.rs

src/tools/tidy/src/ui_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::path::{Path, PathBuf};
1515
const ENTRY_LIMIT: usize = 900;
1616
// FIXME: The following limits should be reduced eventually.
1717

18-
const ISSUES_ENTRY_LIMIT: usize = 1676;
18+
const ISSUES_ENTRY_LIMIT: usize = 1674;
1919

2020
const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
2121
"rs", // test source files

tests/assembly/stack-protector/stack-protector-heuristics-effect.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ revisions: all strong basic none missing
22
//@ assembly-output: emit-asm
3-
//@ ignore-macos slightly different policy on stack protection of arrays
3+
//@ ignore-apple slightly different policy on stack protection of arrays
44
//@ ignore-msvc stack check code uses different function names
55
//@ ignore-nvptx64 stack protector is not supported
66
//@ ignore-wasm32-bare
@@ -17,12 +17,9 @@
1717
// See comments on https://github.com/rust-lang/rust/issues/114903.
1818

1919
#![crate_type = "lib"]
20-
2120
#![allow(incomplete_features)]
22-
2321
#![feature(unsized_locals, unsized_fn_params)]
2422

25-
2623
// CHECK-LABEL: emptyfn:
2724
#[no_mangle]
2825
pub fn emptyfn() {

tests/assembly/x86_64-array-pair-load-store-merge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
33
//@ only-x86_64
44
//@ ignore-sgx
5-
//@ ignore-macos (manipulates rsp too)
5+
//@ ignore-apple (manipulates rsp too)
66

77
// Depending on various codegen choices, this might end up copying
88
// a `<2 x i8>`, an `i16`, or two `i8`s.

0 commit comments

Comments
 (0)