]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
gsl19test does not work properly when /bin/sh is /bin/dash
authorFlorian Krohm <flo2030@eich-krohm.de>
Thu, 31 Oct 2024 23:31:27 +0000 (00:31 +0100)
committerMark Wielaard <mark@klomp.org>
Thu, 31 Oct 2024 23:31:27 +0000 (00:31 +0100)
There were 2 issues:

1) The output redirect operators seem to be bash specific. All output
   went to the terminal.....

2) When invoking valgrind the 'eval' needs to precede
  GSL_TEST_VERBOSE=1. Otherwise that environment variable is not seen
  by valgrind.

Two tweaks:

1) Determine the number of available processors and use that in make
   -j when building gsl-1.9

2) Replace -v with -q in the valgrind invocation. The file out-V is
   already quite large (approx 600 MB). It would be enormous with -v.

https://bugs.kde.org/show_bug.cgi?id=494960

NEWS
auxprogs/gsl19test

diff --git a/NEWS b/NEWS
index 54229dc57c7765336de5f12343c7e532e7b0d4bd..52c66c8f7c9e93d7b9711f2443feecd6fb3f6296 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -83,6 +83,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 493959  s390x: Fix regtest failure for none/tests/s390x/op00
 493970  s390x: Store/restore FPC upon helper call causes slowdown
 494252  s390x: incorrect disassembly for LOCHI and friends
+494960  Fixes and tweaks for gsl19test
 495278  PowerPC instruction dcbf should allow the L field values of 4, 6 on
         ISA 3.0 and earlier, just ignore the value
 495469  aligned_alloc and posix_memalign missing MALLOC_TRACE with returned
index b97738f506294b7a03a17e0023e49b30fc060e9e..d111d379a51bce9e7365d054af2b3abc012d0b0f 100755 (executable)
@@ -38,6 +38,13 @@ then
    exit 1
 fi
 
+# nproc is part of coreutils so it's available on GNU/Linux. Not so on Mac OS X.
+command -v nproc > /dev/null
+if [ $? -eq 0 ]; then
+  num_cpu=`nproc`
+else
+  num_cpu=1
+fi
 
 runcmd () {
    echo -n "   $1  ... "
@@ -95,18 +102,18 @@ runcmd "Configuring                   " \
        "(cd gsl-1.9 && CC=$GSL_CC CFLAGS=\"$GSL_CFLAGS\" ./configure)" && \
 \
 runcmd "Building                      " \
-       "(cd gsl-1.9 && make && make -k check)"
+       "(cd gsl-1.9 && make -j $num_cpu && make -j $num_cpu -k check)"
 
 echo -n "   Collecting reference results  "
 rm -f out-REF
 (cd gsl-1.9 && for f in $ALL_TESTS ; \
-               do GSL_TEST_VERBOSE=1 ./$f ; done) &> out-REF
+               do GSL_TEST_VERBOSE=1 ./$f ; done) > out-REF 2>&1
 echo "  ... done"
 
 echo -n "   Collecting valgrinded results "
 rm -f out-V
 (cd gsl-1.9 && for f in $ALL_TESTS ; \
-               do GSL_TEST_VERBOSE=1 eval $GSL_VV -v --trace-children=yes "$GSL_VFLAGS" ./$f ; done) &> out-V
+               do eval GSL_TEST_VERBOSE=1 $GSL_VV -q --trace-children=yes "$GSL_VFLAGS" ./$f ; done) > out-V 2>&1
 echo "  ... done"
 
 echo -n "   Native fails:    " && (grep FAIL: out-REF | wc -l)