about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-05-29 03:25:08 +0100
committerGitHub <noreply@github.com>2024-05-29 03:25:08 +0100
commit3cc59aeaaeddb6fa6c2723e4664f46a395d25e30 (patch)
tree3587fc3686974f86f3119a1a7fec8d7edaf955d5 /tests/codegen
parent7e441a11a151098a0ff928fdeb52492798678ede (diff)
parente6b9bb7b7200c69b82fd69572a7c0a03ead3d60f (diff)
downloadrust-3cc59aeaaeddb6fa6c2723e4664f46a395d25e30.tar.gz
rust-3cc59aeaaeddb6fa6c2723e4664f46a395d25e30.zip
Rollup merge of #125226 - madsmtm:fix-mac-catalyst-tests, r=workingjubilee
Make more of the test suite run on Mac Catalyst

Combined with https://github.com/rust-lang/rust/pull/125225, the only failing parts of the test suite are in `tests/rustdoc-js`, `tests/rustdoc-js-std` and `tests/debuginfo`. Tested with:
```console
./x test --target=aarch64-apple-ios-macabi library/std
./x test --target=aarch64-apple-ios-macabi --skip=tests/rustdoc-js --skip=tests/rustdoc-js-std --skip=tests/debuginfo tests
```

Will probably put up a PR later to enable _running_ on (not just compiling for) Mac Catalyst in CI, though not sure where exactly I should do so? `src/ci/github-actions/jobs.yml`?

Note that I've deliberately _not_ enabled stack overflow handlers on iOS/tvOS/watchOS/visionOS (see https://github.com/rust-lang/rust/issues/25872), but rather just skipped those tests, as it uses quite a few APIs that I'd be weary about getting rejected by the App Store (note that Swift doesn't do it on those platforms either).

r? ``@workingjubilee``

CC ``@thomcc``

``@rustbot`` label O-ios O-apple
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/gdb_debug_script_load.rs2
-rw-r--r--tests/codegen/instrument-coverage/testprog.rs4
-rw-r--r--tests/codegen/issues/issue-44056-macos-tls-align.rs2
-rw-r--r--tests/codegen/mainsubprogram.rs5
-rw-r--r--tests/codegen/mainsubprogramstart.rs2
-rw-r--r--tests/codegen/pgo-counter-bias.rs2
6 files changed, 8 insertions, 9 deletions
diff --git a/tests/codegen/gdb_debug_script_load.rs b/tests/codegen/gdb_debug_script_load.rs
index f15defeaca8..30d518c0bcb 100644
--- a/tests/codegen/gdb_debug_script_load.rs
+++ b/tests/codegen/gdb_debug_script_load.rs
@@ -1,6 +1,6 @@
 //
 //@ ignore-windows
-//@ ignore-macos
+//@ ignore-apple
 //@ ignore-wasm
 //@ ignore-emscripten
 
diff --git a/tests/codegen/instrument-coverage/testprog.rs b/tests/codegen/instrument-coverage/testprog.rs
index b352cbdb755..acc4f35d905 100644
--- a/tests/codegen/instrument-coverage/testprog.rs
+++ b/tests/codegen/instrument-coverage/testprog.rs
@@ -11,7 +11,7 @@
 //@ [LINUX] filecheck-flags: -DINSTR_PROF_COVFUN=__llvm_covfun
 //@ [LINUX] filecheck-flags: '-DCOMDAT_IF_SUPPORTED=, comdat'
 
-//@ [DARWIN] only-macos
+//@ [DARWIN] only-apple
 //@ [DARWIN] filecheck-flags: -DINSTR_PROF_DATA=__DATA,__llvm_prf_data,regular,live_support
 //@ [DARWIN] filecheck-flags: -DINSTR_PROF_NAME=__DATA,__llvm_prf_names
 //@ [DARWIN] filecheck-flags: -DINSTR_PROF_CNTS=__DATA,__llvm_prf_cnts
@@ -49,7 +49,7 @@ where
 
 pub fn wrap_with<F, T>(inner: T, should_wrap: bool, wrapper: F)
 where
-    F: FnOnce(&T)
+    F: FnOnce(&T),
 {
     if should_wrap {
         wrapper(&inner)
diff --git a/tests/codegen/issues/issue-44056-macos-tls-align.rs b/tests/codegen/issues/issue-44056-macos-tls-align.rs
index c99f0b73038..972b8490d18 100644
--- a/tests/codegen/issues/issue-44056-macos-tls-align.rs
+++ b/tests/codegen/issues/issue-44056-macos-tls-align.rs
@@ -1,5 +1,5 @@
 //
-//@ only-macos
+//@ only-apple
 //@ compile-flags: -O
 
 #![crate_type = "rlib"]
diff --git a/tests/codegen/mainsubprogram.rs b/tests/codegen/mainsubprogram.rs
index c1933b2b390..12b24c90229 100644
--- a/tests/codegen/mainsubprogram.rs
+++ b/tests/codegen/mainsubprogram.rs
@@ -2,7 +2,7 @@
 // before 4.0, formerly backported to the Rust LLVM fork.
 
 //@ ignore-windows
-//@ ignore-macos
+//@ ignore-apple
 //@ ignore-wasi
 
 //@ compile-flags: -g -C no-prepopulate-passes
@@ -10,5 +10,4 @@
 // CHECK-LABEL: @main
 // CHECK: {{.*}}DISubprogram{{.*}}name: "main",{{.*}}DI{{(SP)?}}FlagMainSubprogram{{.*}}
 
-pub fn main() {
-}
+pub fn main() {}
diff --git a/tests/codegen/mainsubprogramstart.rs b/tests/codegen/mainsubprogramstart.rs
index 84d680b9bff..20741791db5 100644
--- a/tests/codegen/mainsubprogramstart.rs
+++ b/tests/codegen/mainsubprogramstart.rs
@@ -1,5 +1,5 @@
 //@ ignore-windows
-//@ ignore-macos
+//@ ignore-apple
 //@ ignore-wasi wasi codegens the main symbol differently
 
 //@ compile-flags: -g -C no-prepopulate-passes
diff --git a/tests/codegen/pgo-counter-bias.rs b/tests/codegen/pgo-counter-bias.rs
index 1263eaf206f..87d31073d5a 100644
--- a/tests/codegen/pgo-counter-bias.rs
+++ b/tests/codegen/pgo-counter-bias.rs
@@ -1,6 +1,6 @@
 // Test that __llvm_profile_counter_bias does not get internalized by lto.
 
-//@ ignore-macos -runtime-counter-relocation not honored on Mach-O
+//@ ignore-apple -runtime-counter-relocation not honored on Mach-O
 //@ compile-flags: -Cprofile-generate -Cllvm-args=-runtime-counter-relocation -Clto=fat
 //@ needs-profiler-support
 //@ no-prefer-dynamic