Skip to content

Commit 3282050

Browse files
committed
bye bye src/test/compile-fail.
1 parent 9723ed0 commit 3282050

File tree

6 files changed

+9
-23
lines changed

6 files changed

+9
-23
lines changed

src/bootstrap/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ build/
216216
# Output for all compiletest-based test suites
217217
test/
218218
run-pass/
219-
compile-fail/
220219
debuginfo/
221220
...
222221

src/bootstrap/builder.rs

-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ impl<'a> Builder<'a> {
372372
test::Tidy,
373373
test::Ui,
374374
test::RunPass,
375-
test::CompileFail,
376375
test::RunFail,
377376
test::RunPassValgrind,
378377
test::MirOpt,

src/bootstrap/test.rs

-6
Original file line numberDiff line numberDiff line change
@@ -828,12 +828,6 @@ default_test_with_compare_mode!(RunPass {
828828
compare_mode: "nll"
829829
});
830830

831-
default_test!(CompileFail {
832-
path: "src/test/compile-fail",
833-
mode: "compile-fail",
834-
suite: "compile-fail"
835-
});
836-
837831
default_test!(RunFail {
838832
path: "src/test/run-fail",
839833
mode: "run-fail",

src/tools/compiletest/src/common.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ use crate::util::PathBufExt;
1010

1111
#[derive(Clone, Copy, PartialEq, Debug)]
1212
pub enum Mode {
13-
CompileFail,
1413
RunFail,
1514
/// This now behaves like a `ui` test that has an implict `// run-pass`.
1615
RunPass,
@@ -50,7 +49,6 @@ impl FromStr for Mode {
5049
type Err = ();
5150
fn from_str(s: &str) -> Result<Mode, ()> {
5251
match s {
53-
"compile-fail" => Ok(CompileFail),
5452
"run-fail" => Ok(RunFail),
5553
"run-pass" => Ok(RunPass),
5654
"run-pass-valgrind" => Ok(RunPassValgrind),
@@ -76,7 +74,6 @@ impl FromStr for Mode {
7674
impl fmt::Display for Mode {
7775
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7876
let s = match *self {
79-
CompileFail => "compile-fail",
8077
RunFail => "run-fail",
8178
RunPass => "run-pass",
8279
RunPassValgrind => "run-pass-valgrind",
@@ -172,7 +169,7 @@ pub struct Config {
172169
/// The name of the stage being built (stage1, etc)
173170
pub stage_id: String,
174171

175-
/// The test mode, compile-fail, run-fail, run-pass
172+
/// The test mode, run-fail, run-pass
176173
pub mode: Mode,
177174

178175
/// Run ignored tests

src/tools/compiletest/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
125125
"",
126126
"mode",
127127
"which sort of compile tests to run",
128-
"(compile-fail|run-fail|run-pass|\
128+
"(run-fail|run-pass|\
129129
run-pass-valgrind|pretty|debug-info|incremental|mir-opt)",
130130
)
131131
.optflag("", "ignored", "run tests marked as ignored")

src/tools/compiletest/src/runtest.rs

+7-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::common::{expected_output_path, UI_EXTENSIONS, UI_FIXED, UI_STDERR, UI
55
use crate::common::{output_base_dir, output_base_name, output_testname_unique};
66
use crate::common::{Codegen, CodegenUnits, Rustdoc};
77
use crate::common::{DebugInfoCdb, DebugInfoGdbLldb, DebugInfoGdb, DebugInfoLldb};
8-
use crate::common::{CompileFail, Pretty, RunFail, RunPass, RunPassValgrind};
8+
use crate::common::{Pretty, RunFail, RunPass, RunPassValgrind};
99
use crate::common::{Config, TestPaths};
1010
use crate::common::{Incremental, MirOpt, RunMake, Ui, JsDocTest, Assembly};
1111
use diff;
@@ -286,7 +286,6 @@ impl<'test> TestCx<'test> {
286286
/// revisions, exactly once, with revision == None).
287287
fn run_revision(&self) {
288288
match self.config.mode {
289-
CompileFail => self.run_cfail_test(),
290289
RunFail => self.run_rfail_test(),
291290
RunPassValgrind => self.run_valgrind_test(),
292291
Pretty => self.run_pretty_test(),
@@ -319,7 +318,6 @@ impl<'test> TestCx<'test> {
319318

320319
fn should_compile_successfully(&self) -> bool {
321320
match self.config.mode {
322-
CompileFail => false,
323321
RunPass => true,
324322
JsDocTest => true,
325323
Ui => self.props.pass_mode.is_some(),
@@ -1535,12 +1533,11 @@ impl<'test> TestCx<'test> {
15351533
rustc.arg("-L").arg(&self.aux_output_dir_name());
15361534

15371535
match self.config.mode {
1538-
CompileFail | Ui => {
1539-
// compile-fail and ui tests tend to have tons of unused code as
1540-
// it's just testing various pieces of the compile, but we don't
1541-
// want to actually assert warnings about all this code. Instead
1542-
// let's just ignore unused code warnings by defaults and tests
1543-
// can turn it back on if needed.
1536+
Ui => {
1537+
// ui tests tend to have tons of unused code as it's just testing
1538+
// various pieces of the compile, but we don't want to actually assert
1539+
// warnings about all this code. Instead let's just ignore unused
1540+
// code warnings by defaults and tests can turn it back on if needed.
15441541
if !self.config.src_base.ends_with("rustdoc-ui") {
15451542
rustc.args(&["-A", "unused"]);
15461543
}
@@ -1922,7 +1919,7 @@ impl<'test> TestCx<'test> {
19221919
}
19231920

19241921
match self.config.mode {
1925-
CompileFail | Incremental => {
1922+
Incremental => {
19261923
// If we are extracting and matching errors in the new
19271924
// fashion, then you want JSON mode. Old-skool error
19281925
// patterns still match the raw compiler output.

0 commit comments

Comments
 (0)