changed: use a unique temporary file during test execution
allows for parallel execution
This commit is contained in:
@@ -24,11 +24,12 @@ else
|
||||
test -n "$5" && mysim="mpirun -n $5 $mysim"
|
||||
fi
|
||||
hdf5=""
|
||||
tmplog=`mktemp -t ifemlogXXXXXX`
|
||||
test -n "$4" && hdf5="-hdf5 @CMAKE_BINARY_DIR@/Testing/$3"
|
||||
$mysim $hdf5 $MAPFILE 2>&1 > @CMAKE_BINARY_DIR@/templog
|
||||
$mysim $hdf5 $MAPFILE 2>&1 > $tmplog
|
||||
if test -n "$4"
|
||||
then
|
||||
$mysim $MAPFILE -restart @CMAKE_BINARY_DIR@/Testing/$3_restart.hdf5 $4 2>&1 > @CMAKE_BINARY_DIR@/templog
|
||||
$mysim $MAPFILE -restart @CMAKE_BINARY_DIR@/Testing/$3_restart.hdf5 $4 2>&1 > $tmplog
|
||||
fi
|
||||
appres=$?
|
||||
globres=1
|
||||
@@ -38,11 +39,11 @@ do
|
||||
test -z "$line" && continue
|
||||
echo "$line" | grep -q ".inp" && continue
|
||||
result=0
|
||||
if grep -q "$line" @CMAKE_BINARY_DIR@/templog
|
||||
then result=1
|
||||
if grep -q "$line" $tmplog
|
||||
then result=1
|
||||
fi
|
||||
if test $result -eq 0
|
||||
then
|
||||
if test $result -eq 0
|
||||
then
|
||||
if test $globres -eq 1
|
||||
then
|
||||
echo "-------- $2 --------" >> @CMAKE_BINARY_DIR@/failed.log
|
||||
@@ -55,8 +56,8 @@ done
|
||||
|
||||
if test $globres -eq 0 || test $appres -ne 0
|
||||
then
|
||||
cat @CMAKE_BINARY_DIR@/templog >> @CMAKE_BINARY_DIR@/failed.log
|
||||
rm -f @CMAKE_BINARY_DIR@/templog
|
||||
cat $tmplog >> @CMAKE_BINARY_DIR@/failed.log
|
||||
rm -f $tmplog
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -64,14 +65,14 @@ if [ "@IFEM_TEST_MEMCHECK@" == "1" ] || [ "@IFEM_TEST_MEMCHECK@" == "ON" ]
|
||||
then
|
||||
if ! grep -q "ERROR SUMMARY: 0 errors" @CMAKE_BINARY_DIR@/valgrindlog
|
||||
then
|
||||
cat @CMAKE_BINARY_DIR@/templog >> @CMAKE_BINARY_DIR@/failed.log
|
||||
cat $tmplog >> @CMAKE_BINARY_DIR@/failed.log
|
||||
cat @CMAKE_BINARY_DIR@/valgrindlog >> @CMAKE_BINARY_DIR@/failed.log
|
||||
rm -f @CMAKE_BINARY_DIR@/templog
|
||||
rm -f $tmplog
|
||||
rm -f @CMAKE_BINARY_DIR@/valgrindlog
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f @CMAKE_BINARY_DIR@/templog
|
||||
rm -f $tmplog
|
||||
rm -f @CMAKE_BINARY_DIR@/valgrindlog
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user