From 4d6c928d38012453cb1919d249eb148869a58597 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 9 Sep 2024 16:38:36 -0400 Subject: [PATCH] if no pass or fail test results found. error when running tests. Ex: complete install failure --- R/test-in-local.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/test-in-local.R b/R/test-in-local.R index a6a23f6006..29b269f835 100644 --- a/R/test-in-local.R +++ b/R/test-in-local.R @@ -255,6 +255,11 @@ assert_test_output <- function(output) { display_message("App test failures", ci_status$fail, include_result = TRUE) display_message("Apps which could NOT be tested", ci_status$no_install, include_result = TRUE) + # Cover case of complete install failure for all apps + if (!any(test_dt$status %in% c(ci_status$pass, ci_status$fail))) { + stop("No test results found!") + } + if (any(test_dt$status %in% ci_status$fail)) { stop( concat_info("Failures detected in:", c(ci_status$fail), include_result = FALSE)