summaryrefslogtreecommitdiff
path: root/test/testit
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2014-05-03 12:09:55 +0000
committerJoerg Sonnenberger <joerg@bec.de>2014-05-03 12:09:55 +0000
commit68d64037c9cd1420b947d2d401ea4bbcc8048564 (patch)
tree6237fdb6ec4feecd17d423e26449cf596a3131f5 /test/testit
parent041b6ba7507d24fdbb045cfd98fdbd1ad0cefdf3 (diff)
Don't use bash features.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@207907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/testit')
-rwxr-xr-xtest/testit32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/testit b/test/testit
index 9fa6d3b..0b032c0 100755
--- a/test/testit
+++ b/test/testit
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# //===--------------------------- testit ---------------------------------===//
# //
# // The LLVM Compiler Infrastructure
@@ -8,7 +8,7 @@
# //
# //===--------------------------------------------------------------------===//
-if [ -z $CC ]
+if [ -z "$CC" ]
then
CC=clang++
fi
@@ -33,25 +33,25 @@ UNIMPLEMENTED=0
IMPLEMENTED_FAIL=0
IMPLEMENTED_PASS=0
-function afunc
+afunc()
{
fail=0
pass=0
- if (ls *.fail.cpp &> /dev/null)
+ if (ls *.fail.cpp > /dev/null 2>&1)
then
for FILE in $(ls *.fail.cpp); do
- if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE &> /dev/null
+ if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE > /dev/null 2>&1
then
rm ./$TEST_EXE
echo "$FILE should not compile"
- let "fail+=1"
+ fail=$(($fail + 1))
else
- let "pass+=1"
+ pass=$(($pass + 1))
fi
done
fi
- if (ls *.cpp &> /dev/null)
+ if (ls *.cpp > /dev/null 2>&1)
then
for FILE in $(ls *.cpp); do
if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE
@@ -59,15 +59,15 @@ function afunc
if ./$TEST_EXE
then
rm ./$TEST_EXE
- let "pass+=1"
+ pass=$(($pass + 1))
else
echo "$FILE failed at run time"
- let "fail+=1"
+ fail=$(($fail + 1))
rm ./$TEST_EXE
fi
else
echo "$FILE failed to compile"
- let "fail+=1"
+ fail=$(($fail + 1))
fi
done
fi
@@ -75,24 +75,24 @@ function afunc
if [ $fail -gt 0 ]
then
echo "failed $fail tests in `pwd`"
- let "IMPLEMENTED_FAIL+=1"
+ IMPLEMENTED_FAIL=$(($IMPLEMENTED_FAIL + 1))
fi
if [ $pass -gt 0 ]
then
echo "passed $pass tests in `pwd`"
if [ $fail -eq 0 ]
then
- let "IMPLEMENTED_PASS+=1"
+ IMPLEMENTED_PASS=$(($IMPLEMENTED_PASS + 1))
fi
fi
if [ $fail -eq 0 -a $pass -eq 0 ]
then
echo "not implemented: `pwd`"
- let "UNIMPLEMENTED+=1"
+ UNIMPLEMENTED=$(($UNIMPLEMENTED + 1))
fi
- let "FAIL+=$fail"
- let "PASS+=$pass"
+ FAIL=$(($FAIL + $fail))
+ PASS=$(($PASS + $pass))
for FILE in *
do