diff --git a/test/Jamfile b/test/Jamfile index cbb40f3..0b58ce3 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -111,10 +111,12 @@ for local handling in on off webcpp.lane cobalt : $(.cobalt) : native emscripten ; webcpp.lane cobalt_asyncify : $(.cobalt-emscripten) : emscripten ; +# Cobalt's suspensions leave half of Asyncify's stack in each build a +# program can get, whatever variant the lane builds: debug, compiled and +# linked at -O0, the deepest, and release, at -O3. .asyncify-stack-debug = debug ; .asyncify-stack-release = release ; -.asyncify-stack-optimized_link = release -O3 ; -for local build in debug release optimized_link +for local build in debug release { for local handling in on off { diff --git a/test/no_exceptions/driver.py b/test/no_exceptions/driver.py index c3974be..f261ca1 100644 --- a/test/no_exceptions/driver.py +++ b/test/no_exceptions/driver.py @@ -37,12 +37,19 @@ if expected_abort: assert result.returncode != 0, result.stdout + result.stderr assert 'after move\n' not in result.stderr, result.stderr - # Emscripten's release libc++ omits the native verbose-abort text. - # The direct exception-ptr control identifies the same runtime path. - diagnostic = ('RuntimeError: Aborted(native code called abort())' if - program.endswith('.js') else - 'make_exception_ptr was called in -fno-exceptions mode') - assert diagnostic in result.stderr, result.stderr + if program.endswith('.js'): + # Emscripten's abort prints the line Aborted() before it + # throws. A link with ASSERTIONS (debug, at -O0) gives native + # code's abort() its reason; a link without them (release, at + # -O3) gives it none, and omits libc++'s verbose-abort text. No + # other abort of Emscripten's runtime has an empty reason, and a + # trap, or an abort for another reason, prints another line. + native_abort = {'Aborted(native code called abort())', 'Aborted()'} + assert native_abort & set(result.stderr.splitlines()), result.stderr + else: + # The direct exception-ptr control identifies the same runtime path. + assert ('make_exception_ptr was called in -fno-exceptions mode' + in result.stderr), result.stderr verdict = 'known-libc++-abort' else: assert result.returncode == 0, result.stdout + result.stderr