about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2023-06-23 15:50:20 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2023-06-23 15:50:20 +0200
commit616469aa8aa84585bbaeaee0c9e5b9e06ec15149 (patch)
treec413be363b74270553ceb0ad9adc182b85642d5d
parentfe37f37e4b764bb82fc0eb8c727842746de7c93f (diff)
downloadrust-616469aa8aa84585bbaeaee0c9e5b9e06ec15149.tar.gz
rust-616469aa8aa84585bbaeaee0c9e5b9e06ec15149.zip
Fix rustdoc-gui tester
-rw-r--r--src/tools/rustdoc-gui-test/src/main.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/rustdoc-gui-test/src/main.rs b/src/tools/rustdoc-gui-test/src/main.rs
index dc902f8cb02..ed91763420a 100644
--- a/src/tools/rustdoc-gui-test/src/main.rs
+++ b/src/tools/rustdoc-gui-test/src/main.rs
@@ -67,7 +67,7 @@ fn find_librs<P: AsRef<Path>>(path: P) -> Option<PathBuf> {
     None
 }
 
-fn main() {
+fn main() -> Result<(), ()> {
     let config = Arc::new(Config::from_args(env::args().collect()));
 
     // The goal here is to check if the necessary packages are installed, and if not, we
@@ -128,7 +128,10 @@ If you want to install the `browser-ui-test` dependency, run `npm install browse
                 }
             }
 
-            try_run(&mut cargo, config.verbose);
+            if !try_run(&mut cargo, config.verbose) {
+                eprintln!("failed to document `{}`", entry.path().display());
+                panic!("Cannot run rustdoc-gui tests");
+            }
         }
     }
 
@@ -158,5 +161,5 @@ If you want to install the `browser-ui-test` dependency, run `npm install browse
 
     command.args(&config.test_args);
 
-    try_run(&mut command, config.verbose);
+    if try_run(&mut command, config.verbose) { Ok(()) } else { Err(()) }
 }