Parcourir la source

[trac614] Remove bashisms

Michal 'vorner' Vaner il y a 14 ans
Parent
commit
5d246e92ae
1 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 5 5
      tools/tests_in_valgrind.sh

+ 5 - 5
tools/tests_in_valgrind.sh

@@ -1,5 +1,4 @@
-#!/bin/bash
-# Yes, really bash, there are some bashisms
+#!/bin/sh
 
 ###########################################
 # This script runs all tests in valgrind. Configure and compile bind the way
@@ -44,14 +43,15 @@ eval $(find . -type f -name run_unittests -print | grep -v '\.libs/run_unittests
     chmod +x "$testname.valgrind"
     echo "$testname" >>"$LOGFILE"
     echo "===============" >>"$LOGFILE"
-    pushd $(dirname "$testname") >/dev/null
-    "./run_unittests.valgrind" >&2 &
+    OLDDIR="`pwd`"
+    cd $(dirname "$testname")
+    ./run_unittests.valgrind >&2 &
     PID="$!"
     set +e
     wait "$PID"
     CODE="$?"
     set -e
-    popd >/dev/null
+    cd "$OLDDIR"
     if [ "$CODE" != 0 ] ; then
         echo 'FAILED="$FAILED
 '"$testname"'"'