about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-11-22 17:20:14 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2023-12-04 15:29:23 +0100
commit87c284c9bc05e290cb0ee577717a94de9e853c89 (patch)
tree878554d68a53719c26843a97a42a79626412e937
parent9d104a0cbf0abbf5d2f5176298373510392e5a36 (diff)
downloadrust-87c284c9bc05e290cb0ee577717a94de9e853c89.tar.gz
rust-87c284c9bc05e290cb0ee577717a94de9e853c89.zip
Only read rust test files
-rw-r--r--build_system/src/test.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/build_system/src/test.rs b/build_system/src/test.rs
index 7785957541f..bbe2322f93d 100644
--- a/build_system/src/test.rs
+++ b/build_system/src/test.rs
@@ -928,7 +928,9 @@ where
     }
     fn file_handling(file: &Path) -> Result<(), String> {
         let path_str = file.display().to_string().replace("\\", "/");
-        if should_not_remove_test(&path_str) {
+        if !path_str.ends_with(".rs") {
+            return Ok(())
+        } else if should_not_remove_test(&path_str) {
             return Ok(());
         } else if should_remove_test(file, &path_str) {
             return std::fs::remove_file(file)