Skip to content

Commit

Permalink
Remove the parse-fail test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov committed Oct 21, 2018
1 parent 73e1f89 commit 52ede63
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/bootstrap/builder.rs
Expand Up @@ -379,7 +379,6 @@ impl<'a> Builder<'a> {
test::Ui,
test::RunPass,
test::CompileFail,
test::ParseFail,
test::RunFail,
test::RunPassValgrind,
test::MirOpt,
Expand Down
6 changes: 0 additions & 6 deletions src/bootstrap/test.rs
Expand Up @@ -773,12 +773,6 @@ default_test!(CompileFail {
suite: "compile-fail"
});

default_test!(ParseFail {
path: "src/test/parse-fail",
mode: "parse-fail",
suite: "parse-fail"
});

default_test!(RunFail {
path: "src/test/run-fail",
mode: "run-fail",
Expand Down
1 change: 0 additions & 1 deletion src/ci/docker/wasm32-unknown/Dockerfile
Expand Up @@ -36,7 +36,6 @@ ENV SCRIPT python2.7 /checkout/x.py test --target $TARGETS \
src/test/ui \
src/test/run-pass \
src/test/compile-fail \
src/test/parse-fail \
src/test/mir-opt \
src/test/codegen-units \
src/libcore \
2 changes: 1 addition & 1 deletion src/etc/generate-keyword-tests.py
Expand Up @@ -44,7 +44,7 @@
"""

test_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '../test/parse-fail')
os.path.join(os.path.dirname(__file__), '../test/ui/parser')
)

for kw in sys.argv[1:]:
Expand Down
3 changes: 0 additions & 3 deletions src/tools/compiletest/src/common.rs
Expand Up @@ -19,7 +19,6 @@ use util::PathBufExt;
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum Mode {
CompileFail,
ParseFail,
RunFail,
/// This now behaves like a `ui` test that has an implict `// run-pass`.
RunPass,
Expand Down Expand Up @@ -56,7 +55,6 @@ impl FromStr for Mode {
fn from_str(s: &str) -> Result<Mode, ()> {
match s {
"compile-fail" => Ok(CompileFail),
"parse-fail" => Ok(ParseFail),
"run-fail" => Ok(RunFail),
"run-pass" => Ok(RunPass),
"run-pass-valgrind" => Ok(RunPassValgrind),
Expand All @@ -80,7 +78,6 @@ impl fmt::Display for Mode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let s = match *self {
CompileFail => "compile-fail",
ParseFail => "parse-fail",
RunFail => "run-fail",
RunPass => "run-pass",
RunPassValgrind => "run-pass-valgrind",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/main.rs
Expand Up @@ -139,7 +139,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
"",
"mode",
"which sort of compile tests to run",
"(compile-fail|parse-fail|run-fail|run-pass|\
"(compile-fail|run-fail|run-pass|\
run-pass-valgrind|pretty|debug-info|incremental|mir-opt)",
)
.optflag("", "ignored", "run tests marked as ignored")
Expand Down
8 changes: 4 additions & 4 deletions src/tools/compiletest/src/runtest.rs
Expand Up @@ -12,7 +12,7 @@ use common::CompareMode;
use common::{expected_output_path, UI_EXTENSIONS, UI_FIXED, UI_STDERR, UI_STDOUT};
use common::{output_base_dir, output_base_name, output_testname_unique};
use common::{Codegen, CodegenUnits, DebugInfoBoth, DebugInfoGdb, DebugInfoLldb, Rustdoc};
use common::{CompileFail, ParseFail, Pretty, RunFail, RunPass, RunPassValgrind};
use common::{CompileFail, Pretty, RunFail, RunPass, RunPassValgrind};
use common::{Config, TestPaths};
use common::{Incremental, MirOpt, RunMake, Ui};
use diff;
Expand Down Expand Up @@ -265,7 +265,7 @@ impl<'test> TestCx<'test> {
/// revisions, exactly once, with revision == None).
fn run_revision(&self) {
match self.config.mode {
CompileFail | ParseFail => self.run_cfail_test(),
CompileFail => self.run_cfail_test(),
RunFail => self.run_rfail_test(),
RunPassValgrind => self.run_valgrind_test(),
Pretty => self.run_pretty_test(),
Expand Down Expand Up @@ -296,7 +296,7 @@ impl<'test> TestCx<'test> {

fn should_compile_successfully(&self) -> bool {
match self.config.mode {
ParseFail | CompileFail => self.props.compile_pass,
CompileFail => self.props.compile_pass,
RunPass => true,
Ui => self.props.compile_pass,
Incremental => {
Expand Down Expand Up @@ -1741,7 +1741,7 @@ impl<'test> TestCx<'test> {
}

match self.config.mode {
CompileFail | ParseFail | Incremental => {
CompileFail | Incremental => {
// If we are extracting and matching errors in the new
// fashion, then you want JSON mode. Old-skool error
// patterns still match the raw compiler output.
Expand Down

0 comments on commit 52ede63

Please sign in to comment.