diff --git a/mps/code/commpost.nmk b/mps/code/commpost.nmk index 5984a9b4d35..d0d1e3a3d36 100644 --- a/mps/code/commpost.nmk +++ b/mps/code/commpost.nmk @@ -61,6 +61,7 @@ mpsicv.cov: testrun: $(AUTO_TEST_TARGETS) !IFDEF VARIETY + set MPS_TESTLIB_NOABORT=true ..\tool\testrun.bat $(PFM) $(VARIETY) $(AUTO_TEST_TARGETS) !ELSE $(MAKE) /nologo /f $(PFM).nmk VARIETY=hot testrun diff --git a/mps/code/testlib.c b/mps/code/testlib.c index fe81040ae85..bcb0801f3e1 100644 --- a/mps/code/testlib.c +++ b/mps/code/testlib.c @@ -328,7 +328,16 @@ void verror(const char *format, va_list args) vfprintf(stderr, format, args); fprintf(stderr, "\n"); fflush(stderr); /* make sure the message is output */ - abort(); + /* On Windows, the abort signal pops up a dialog box. This suspends + * the test suite until a button is pressed, which is not acceptable + * for offline testing, so if the MPS_TESTLIB_NOABORT environment + * variable is set, then the test case exits instead of aborting. + */ + if (getenv("MPS_TESTLIB_NOABORT")) { + exit(EXIT_FAILURE); + } else { + abort(); + } }