21dfb55dad
tests/bytecode/run-tests already uses puthon3.3, so let's just use it here too. Fore reference, errors with python 3.2.3: File "tests/generator1.py", line 12 return None SyntaxError: 'return' with argument inside generator File "tests/list_clear.py", line 3, in <module> x.clear() AttributeError: 'list' object has no attribute 'clear' etc.
44 lines
803 B
Bash
Executable File
44 lines
803 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
RM="/bin/rm -f"
|
|
CPYTHON3=python3.3
|
|
MP_PY=../../unix/py
|
|
|
|
numtests=0
|
|
numpassed=0
|
|
numfailed=0
|
|
namefailed=
|
|
|
|
for infile in tests/*.py
|
|
do
|
|
basename=`basename $infile .py`
|
|
outfile=${basename}.out
|
|
expfile=${basename}.exp
|
|
|
|
$CPYTHON3 -B $infile > $expfile
|
|
$MP_PY $infile > $outfile
|
|
|
|
diff --brief $expfile $outfile > /dev/null
|
|
|
|
if [ $? -eq 0 ]
|
|
then
|
|
echo "pass $infile"
|
|
$RM $outfile
|
|
$RM $expfile
|
|
((numpassed=numpassed + 1))
|
|
else
|
|
echo "FAIL $infile"
|
|
((numfailed=numfailed + 1))
|
|
namefailed="$namefailed $basename"
|
|
fi
|
|
|
|
((numtests=numtests + 1))
|
|
done
|
|
|
|
echo "$numtests tests performed"
|
|
echo "$numpassed tests passed"
|
|
if [[ $numfailed != 0 ]]
|
|
then
|
|
echo "$numfailed tests failed -$namefailed"
|
|
fi
|