From 81b8db218006daaee11bb2c61aa7e3d7386b9fa9 Mon Sep 17 00:00:00 2001 From: Tommy Ip Date: Sun, 10 Dec 2017 17:36:08 +0000 Subject: [PATCH] Imply must-compile-successfully in ui-tests when the run-pass flag is present. --- src/tools/compiletest/src/header.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 8d8eb4d5cb8c..1f736e33c8b2 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -359,10 +359,6 @@ impl TestProps { self.forbid_output.push(of); } - if !self.must_compile_successfully { - self.must_compile_successfully = config.parse_must_compile_successfully(ln); - } - if !self.check_test_line_numbers_match { self.check_test_line_numbers_match = config.parse_check_test_line_numbers_match(ln); } @@ -371,6 +367,12 @@ impl TestProps { self.run_pass = config.parse_run_pass(ln); } + if !self.must_compile_successfully { + // run-pass implies must_compile_sucessfully + self.must_compile_successfully = + config.parse_must_compile_successfully(ln) || self.run_pass; + } + if let Some(rule) = config.parse_custom_normalization(ln, "normalize-stdout") { self.normalize_stdout.push(rule); }