[gjs: 4/7] tests: Skip exit() test under valgrind



commit 4d3369a1f1c687e6fecd321ce28b788bdce46494
Author: Philip Chimento <philip chimento gmail com>
Date:   Mon Mar 12 16:30:43 2018 -0700

    tests: Skip exit() test under valgrind
    
    This test trips an assertion when used with a debug-mode SpiderMonkey.
    That is a separate bug that should be fixed, but for now, we should skip
    the test when running under valgrind. The abort causes valgrind to think
    that tons of memory are not freed, overrunning the useful output.
    
    See #120.

 installed-tests/scripts/testCommandLine.sh | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/installed-tests/scripts/testCommandLine.sh b/installed-tests/scripts/testCommandLine.sh
index 8dbb2bc..30834c8 100755
--- a/installed-tests/scripts/testCommandLine.sh
+++ b/installed-tests/scripts/testCommandLine.sh
@@ -88,10 +88,16 @@ test $? -eq 42
 report "System.exit(42) should exit with the correct exit code"
 
 # FIXME: should check -eq 42 specifically, but in debug mode we will be
-# hitting an assertion
-$gjs exit.js
-test $? -ne 0
-report "System.exit() should still exit across an FFI boundary"
+# hitting an assertion. For this reason, skip when running under valgrind
+# since nothing will be freed.
+echo "# VALGRIND = $VALGRIND"
+if test -z $VALGRIND; then
+    $gjs exit.js
+    test $? -ne 0
+    report "System.exit() should still exit across an FFI boundary"
+else
+    skip "System.exit() should still exit across an FFI boundary" "running under valgrind"
+fi
 
 # gjs --help prints GJS help
 $gjs --help >/dev/null


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]