about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/test/src/formatters/pretty.rs2
-rw-r--r--library/test/src/formatters/terse.rs2
-rw-r--r--library/test/src/tests.rs38
-rw-r--r--library/test/src/types.rs10
-rw-r--r--src/librustdoc/doctest.rs2
-rw-r--r--src/tools/compiletest/src/main.rs2
6 files changed, 53 insertions, 3 deletions
diff --git a/library/test/src/formatters/pretty.rs b/library/test/src/formatters/pretty.rs
index 543b9a6924a..c1a0bb9f3e1 100644
--- a/library/test/src/formatters/pretty.rs
+++ b/library/test/src/formatters/pretty.rs
@@ -169,7 +169,7 @@ impl<T: Write> PrettyFormatter<T> {
 
     fn write_test_name(&mut self, desc: &TestDesc) -> io::Result<()> {
         let name = desc.padded_name(self.max_name_len, desc.name.padding());
-        self.write_plain(&format!("test {} - {} ... ", name, desc.test_mode_string()))?;
+        self.write_plain(&format!("test {} - {} ... ", name, desc.test_mode()))?;
 
         Ok(())
     }
diff --git a/library/test/src/formatters/terse.rs b/library/test/src/formatters/terse.rs
index 286b50b525d..a9589829ad2 100644
--- a/library/test/src/formatters/terse.rs
+++ b/library/test/src/formatters/terse.rs
@@ -158,7 +158,7 @@ impl<T: Write> TerseFormatter<T> {
 
     fn write_test_name(&mut self, desc: &TestDesc) -> io::Result<()> {
         let name = desc.padded_name(self.max_name_len, desc.name.padding());
-        self.write_plain(&format!("test {} - {} ... ", name, desc.test_mode_string()))?;
+        self.write_plain(&format!("test {} - {} ... ", name, desc.test_mode()))?;
 
         Ok(())
     }
diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs
index 794f7277004..5a4a540b04e 100644
--- a/library/test/src/tests.rs
+++ b/library/test/src/tests.rs
@@ -61,7 +61,9 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
                 ignore: true,
                 should_panic: ShouldPanic::No,
                 allow_fail: false,
+                #[cfg(not(bootstrap))]
                 compile_fail: false,
+                #[cfg(not(bootstrap))]
                 no_run: false,
                 test_type: TestType::Unknown,
             },
@@ -73,7 +75,9 @@ fn one_ignored_one_unignored_test() -> Vec<TestDescAndFn> {
                 ignore: false,
                 should_panic: ShouldPanic::No,
                 allow_fail: false,
+                #[cfg(not(bootstrap))]
                 compile_fail: false,
+                #[cfg(not(bootstrap))]
                 no_run: false,
                 test_type: TestType::Unknown,
             },
@@ -93,7 +97,9 @@ pub fn do_not_run_ignored_tests() {
             ignore: true,
             should_panic: ShouldPanic::No,
             allow_fail: false,
+            #[cfg(not(bootstrap))]
             compile_fail: false,
+            #[cfg(not(bootstrap))]
             no_run: false,
             test_type: TestType::Unknown,
         },
@@ -114,7 +120,9 @@ pub fn ignored_tests_result_in_ignored() {
             ignore: true,
             should_panic: ShouldPanic::No,
             allow_fail: false,
+            #[cfg(not(bootstrap))]
             compile_fail: false,
+            #[cfg(not(bootstrap))]
             no_run: false,
             test_type: TestType::Unknown,
         },
@@ -139,7 +147,9 @@ fn test_should_panic() {
             ignore: false,
             should_panic: ShouldPanic::Yes,
             allow_fail: false,
+            #[cfg(not(bootstrap))]
             compile_fail: false,
+            #[cfg(not(bootstrap))]
             no_run: false,
             test_type: TestType::Unknown,
         },
@@ -164,7 +174,9 @@ fn test_should_panic_good_message() {
             ignore: false,
             should_panic: ShouldPanic::YesWithMessage("error message"),
             allow_fail: false,
+            #[cfg(not(bootstrap))]
             compile_fail: false,
+            #[cfg(not(bootstrap))]
             no_run: false,
             test_type: TestType::Unknown,
         },
@@ -194,7 +206,9 @@ fn test_should_panic_bad_message() {
             ignore: false,
             should_panic: ShouldPanic::YesWithMessage(expected),
             allow_fail: false,
+            #[cfg(not(bootstrap))]
             compile_fail: false,
+            #[cfg(not(bootstrap))]
             no_run: false,
             test_type: TestType::Unknown,
         },
@@ -228,7 +242,9 @@ fn test_should_panic_non_string_message_type() {
             ignore: false,
             should_panic: ShouldPanic::YesWithMessage(expected),
             allow_fail: false,
+            #[cfg(not(bootstrap))]
             compile_fail: false,
+            #[cfg(not(bootstrap))]
             no_run: false,
             test_type: TestType::Unknown,
         },
@@ -254,7 +270,9 @@ fn test_should_panic_but_succeeds() {
                 ignore: false,
                 should_panic,
                 allow_fail: false,
+                #[cfg(not(bootstrap))]
                 compile_fail: false,
+                #[cfg(not(bootstrap))]
                 no_run: false,
                 test_type: TestType::Unknown,
             },
@@ -288,7 +306,9 @@ fn report_time_test_template(report_time: bool) -> Option<TestExecTime> {
             ignore: false,
             should_panic: ShouldPanic::No,
             allow_fail: false,
+            #[cfg(not(bootstrap))]
             compile_fail: false,
+            #[cfg(not(bootstrap))]
             no_run: false,
             test_type: TestType::Unknown,
         },
@@ -323,7 +343,9 @@ fn time_test_failure_template(test_type: TestType) -> TestResult {
             ignore: false,
             should_panic: ShouldPanic::No,
             allow_fail: false,
+            #[cfg(not(bootstrap))]
             compile_fail: false,
+            #[cfg(not(bootstrap))]
             no_run: false,
             test_type,
         },
@@ -362,7 +384,9 @@ fn typed_test_desc(test_type: TestType) -> TestDesc {
         ignore: false,
         should_panic: ShouldPanic::No,
         allow_fail: false,
+        #[cfg(not(bootstrap))]
         compile_fail: false,
+        #[cfg(not(bootstrap))]
         no_run: false,
         test_type,
     }
@@ -475,7 +499,9 @@ pub fn exclude_should_panic_option() {
             ignore: false,
             should_panic: ShouldPanic::Yes,
             allow_fail: false,
+            #[cfg(not(bootstrap))]
             compile_fail: false,
+            #[cfg(not(bootstrap))]
             no_run: false,
             test_type: TestType::Unknown,
         },
@@ -499,7 +525,9 @@ pub fn exact_filter_match() {
                     ignore: false,
                     should_panic: ShouldPanic::No,
                     allow_fail: false,
+                    #[cfg(not(bootstrap))]
                     compile_fail: false,
+                    #[cfg(not(bootstrap))]
                     no_run: false,
                     test_type: TestType::Unknown,
                 },
@@ -593,7 +621,9 @@ pub fn sort_tests() {
                     ignore: false,
                     should_panic: ShouldPanic::No,
                     allow_fail: false,
+                    #[cfg(not(bootstrap))]
                     compile_fail: false,
+                    #[cfg(not(bootstrap))]
                     no_run: false,
                     test_type: TestType::Unknown,
                 },
@@ -672,7 +702,9 @@ pub fn test_bench_no_iter() {
         ignore: false,
         should_panic: ShouldPanic::No,
         allow_fail: false,
+        #[cfg(not(bootstrap))]
         compile_fail: false,
+        #[cfg(not(bootstrap))]
         no_run: false,
         test_type: TestType::Unknown,
     };
@@ -694,7 +726,9 @@ pub fn test_bench_iter() {
         ignore: false,
         should_panic: ShouldPanic::No,
         allow_fail: false,
+        #[cfg(not(bootstrap))]
         compile_fail: false,
+        #[cfg(not(bootstrap))]
         no_run: false,
         test_type: TestType::Unknown,
     };
@@ -710,7 +744,9 @@ fn should_sort_failures_before_printing_them() {
         ignore: false,
         should_panic: ShouldPanic::No,
         allow_fail: false,
+        #[cfg(not(bootstrap))]
         compile_fail: false,
+        #[cfg(not(bootstrap))]
         no_run: false,
         test_type: TestType::Unknown,
     };
@@ -720,7 +756,9 @@ fn should_sort_failures_before_printing_them() {
         ignore: false,
         should_panic: ShouldPanic::No,
         allow_fail: false,
+        #[cfg(not(bootstrap))]
         compile_fail: false,
+        #[cfg(not(bootstrap))]
         no_run: false,
         test_type: TestType::Unknown,
     };
diff --git a/library/test/src/types.rs b/library/test/src/types.rs
index a2c3d5fa8ee..4cbdc7affc6 100644
--- a/library/test/src/types.rs
+++ b/library/test/src/types.rs
@@ -124,7 +124,9 @@ pub struct TestDesc {
     pub ignore: bool,
     pub should_panic: options::ShouldPanic,
     pub allow_fail: bool,
+    #[cfg(not(bootstrap))]
     pub compile_fail: bool,
+    #[cfg(not(bootstrap))]
     pub no_run: bool,
     pub test_type: TestType,
 }
@@ -143,7 +145,8 @@ impl TestDesc {
         }
     }
 
-    pub fn test_mode_string(&self) -> &'static str {
+    #[cfg(not(bootstrap))]
+    pub fn test_mode(&self) -> &'static str {
         if self.ignore {
             return &"ignore";
         }
@@ -164,6 +167,11 @@ impl TestDesc {
         }
         &"run"
     }
+
+    #[cfg(bootstrap)]
+    pub fn test_mode(&self) -> &'static str {
+        &""
+    }
 }
 
 #[derive(Debug)]
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs
index 8ef9170f919..c33d0ba4e57 100644
--- a/src/librustdoc/doctest.rs
+++ b/src/librustdoc/doctest.rs
@@ -935,7 +935,9 @@ impl Tester for Collector {
                 // compiler failures are test failures
                 should_panic: testing::ShouldPanic::No,
                 allow_fail: config.allow_fail,
+                #[cfg(not(bootstrap))]
                 compile_fail: config.compile_fail,
+                #[cfg(not(bootstrap))]
                 no_run,
                 test_type: testing::TestType::DocTest,
             },
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index f3751ff244f..0aa1f336b6d 100644
--- a/src/tools/compiletest/src/main.rs
+++ b/src/tools/compiletest/src/main.rs
@@ -649,7 +649,9 @@ fn make_test(config: &Config, testpaths: &TestPaths, inputs: &Stamp) -> Vec<test
                     ignore,
                     should_panic,
                     allow_fail: false,
+                    #[cfg(not(bootstrap))]
                     compile_fail: false,
+                    #[cfg(not(bootstrap))]
                     no_run: false,
                     test_type: test::TestType::Unknown,
                 },