about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-01-23 15:23:30 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-01-26 10:26:36 +0000
commit9e5c6a2898fe49c984600ba34d05d8c6ad3dd50e (patch)
treeb29986782d6508d6510d2fe725860016750ce82f
parentb6a384194204f34b70fe738e809848ee274b9681 (diff)
downloadrust-9e5c6a2898fe49c984600ba34d05d8c6ad3dd50e.tar.gz
rust-9e5c6a2898fe49c984600ba34d05d8c6ad3dd50e.zip
Fix cg_clif testing coretests
-rw-r--r--compiler/rustc_codegen_cranelift/build_system/tests.rs2
-rw-r--r--compiler/rustc_codegen_cranelift/patches/0022-coretests-Disable-not-compiling-tests.patch44
-rw-r--r--compiler/rustc_codegen_cranelift/patches/0027-coretests-128bit-atomic-operations.patch15
-rw-r--r--compiler/rustc_codegen_cranelift/patches/0028-coretests-Disable-long-running-tests.patch6
4 files changed, 11 insertions, 56 deletions
diff --git a/compiler/rustc_codegen_cranelift/build_system/tests.rs b/compiler/rustc_codegen_cranelift/build_system/tests.rs
index 8de419a0c4e..bcb2b4881eb 100644
--- a/compiler/rustc_codegen_cranelift/build_system/tests.rs
+++ b/compiler/rustc_codegen_cranelift/build_system/tests.rs
@@ -151,7 +151,7 @@ const EXTENDED_SYSROOT_SUITE: &[TestCase] = &[
         apply_patches(
             &runner.dirs,
             "coretests",
-            &runner.stdlib_source.join("library/core/tests"),
+            &runner.stdlib_source.join("library/coretests"),
             &LIBCORE_TESTS_SRC.to_path(&runner.dirs),
         );
 
diff --git a/compiler/rustc_codegen_cranelift/patches/0022-coretests-Disable-not-compiling-tests.patch b/compiler/rustc_codegen_cranelift/patches/0022-coretests-Disable-not-compiling-tests.patch
deleted file mode 100644
index 161173d4765..00000000000
--- a/compiler/rustc_codegen_cranelift/patches/0022-coretests-Disable-not-compiling-tests.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From f6befc4bb51d84f5f1cf35938a168c953d421350 Mon Sep 17 00:00:00 2001
-From: bjorn3 <bjorn3@users.noreply.github.com>
-Date: Sun, 24 Nov 2019 15:10:23 +0100
-Subject: [PATCH] [core] Disable not compiling tests
-
----
- library/core/tests/Cargo.toml         | 8 ++++++++
- library/core/tests/num/flt2dec/mod.rs | 1 -
- library/core/tests/num/int_macros.rs  | 2 ++
- library/core/tests/num/uint_macros.rs | 2 ++
- library/core/tests/ptr.rs             | 2 ++
- library/core/tests/slice.rs           | 2 ++
- 6 files changed, 16 insertions(+), 1 deletion(-)
- create mode 100644 library/core/tests/Cargo.toml
-
-diff --git a/Cargo.toml b/Cargo.toml
-new file mode 100644
-index 0000000..46fd999
---- /dev/null
-+++ b/Cargo.toml
-@@ -0,0 +1,12 @@
-+[package]
-+name = "coretests"
-+version = "0.0.0"
-+edition = "2021"
-+
-+[lib]
-+name = "coretests"
-+path = "lib.rs"
-+
-+[dependencies]
-+rand = { version = "0.8.5", default-features = false }
-+rand_xorshift = { version = "0.3.0", default-features = false }
-diff --git a/lib.rs b/lib.rs
-index 42a26ae..5ac1042 100644
---- a/lib.rs
-+++ b/lib.rs
-@@ -1,3 +1,4 @@
-+#![cfg(test)]
- // tidy-alphabetical-start
- #![cfg_attr(target_has_atomic = "128", feature(integer_atomics))]
- #![cfg_attr(test, feature(cfg_match))]
---
-2.21.0 (Apple Git-122)
diff --git a/compiler/rustc_codegen_cranelift/patches/0027-coretests-128bit-atomic-operations.patch b/compiler/rustc_codegen_cranelift/patches/0027-coretests-128bit-atomic-operations.patch
index 06840624cef..4a06dc3f7ef 100644
--- a/compiler/rustc_codegen_cranelift/patches/0027-coretests-128bit-atomic-operations.patch
+++ b/compiler/rustc_codegen_cranelift/patches/0027-coretests-128bit-atomic-operations.patch
@@ -10,21 +10,20 @@ Cranelift doesn't support them yet
  library/core/tests/atomic.rs          |  4 ---
  4 files changed, 4 insertions(+), 50 deletions(-)
 
-diff --git a/lib.rs b/lib.rs
+diff --git a/tests/lib.rs b/tests/lib.rs
 index 1e336bf..35e6f54 100644
---- a/lib.rs
-+++ b/lib.rs
-@@ -2,6 +2,5 @@
- #![cfg(test)]
+--- a/tests/lib.rs
++++ b/tests/lib.rs
+@@ -2,5 +2,4 @@
  // tidy-alphabetical-start
 -#![cfg_attr(target_has_atomic = "128", feature(integer_atomics))]
  #![cfg_attr(test, feature(cfg_match))]
  #![feature(alloc_layout_extra)]
  #![feature(array_chunks)]
-diff --git a/atomic.rs b/atomic.rs
+diff --git a/tests/atomic.rs b/tests/atomic.rs
 index b735957..ea728b6 100644
---- a/atomic.rs
-+++ b/atomic.rs
+--- a/tests/atomic.rs
++++ b/tests/atomic.rs
 @@ -185,10 +185,6 @@ fn atomic_alignment() {
      assert_eq!(align_of::<AtomicU64>(), size_of::<AtomicU64>());
      #[cfg(target_has_atomic = "64")]
diff --git a/compiler/rustc_codegen_cranelift/patches/0028-coretests-Disable-long-running-tests.patch b/compiler/rustc_codegen_cranelift/patches/0028-coretests-Disable-long-running-tests.patch
index b98326c54a6..5a38dffa24f 100644
--- a/compiler/rustc_codegen_cranelift/patches/0028-coretests-Disable-long-running-tests.patch
+++ b/compiler/rustc_codegen_cranelift/patches/0028-coretests-Disable-long-running-tests.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Disable long running tests
  library/core/tests/slice.rs | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/slice.rs b/slice.rs
+diff --git a/tests/slice.rs b/tests/slice.rs
 index 8402833..84592e0 100644
---- a/slice.rs
-+++ b/slice.rs
+--- a/tests/slice.rs
++++ b/tests/slice.rs
 @@ -1809,6 +1809,7 @@ fn sort_unstable() {
      }
  }