summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-02-23 03:18:53 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-02-26 20:24:00 +0300
commitcdbd8c2f2aa69c4b8fe6f004449440e87c4ab87e (patch)
tree3cb1d034cf3a10a3ff41ef80013322ee7358dbf5 /src/tools/compiletest
parentbedbad61195d2eae69b43eca49c6d3e2aee8f208 (diff)
downloadrust-cdbd8c2f2aa69c4b8fe6f004449440e87c4ab87e.tar.gz
rust-cdbd8c2f2aa69c4b8fe6f004449440e87c4ab87e.zip
Support flag `-Z ui-testing` for tweaking diagnostic output for UI tests
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/runtest.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index e5bee56de80..3d751de3dbe 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1627,15 +1627,12 @@ impl<'test> TestCx<'test> {
                     rustc.args(&["--error-format", "json"]);
                 }
             }
-            Ui => if !self.props
-                .compile_flags
-                .iter()
-                .any(|s| s.starts_with("--error-format"))
-            {
+            Ui => {
                 // In case no "--error-format" has been given in the test, we'll compile
                 // a first time to get the compiler's output then compile with
                 // "--error-format json" to check if all expected errors are actually there
                 // and that no new one appeared.
+                rustc.arg("-Zui-testing");
             }
             MirOpt => {
                 rustc.args(&[