about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2024-09-17 23:55:53 +0200
committerUrgau <urgau@numericable.fr>2025-01-02 16:49:55 +0100
commite8a4792b3e5ffa85453451ba27026de3a48c1581 (patch)
tree3c3ee4c44923be08317ddef12e16b4e95d4814d4 /src/tools/compiletest
parentbc3e3015b6e449bf1607f1023d2fbc2838ee37af (diff)
downloadrust-e8a4792b3e5ffa85453451ba27026de3a48c1581.tar.gz
rust-e8a4792b3e5ffa85453451ba27026de3a48c1581.zip
Make the `test` cfg a "userspace" check-cfg
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/runtest.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 7084c407a64..9e8443cd13c 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -506,8 +506,9 @@ impl<'test> TestCx<'test> {
             // Generate `cfg(FALSE, REV1, ..., REVN)` (for all possible revisions)
             //
             // For compatibility reason we consider the `FALSE` cfg to be expected
-            // since it is extensively used in the testsuite.
-            check_cfg.push_str("cfg(FALSE");
+            // since it is extensively used in the testsuite, as well as the `test`
+            // cfg since we have tests that uses it.
+            check_cfg.push_str("cfg(test,FALSE");
             for revision in &self.props.revisions {
                 check_cfg.push(',');
                 check_cfg.push_str(&normalize_revision(revision));