2014-01-02 16:14:19 +00:00
|
|
|
#!/usr/bin/env bash
|
2013-12-29 18:21:02 +00:00
|
|
|
|
2014-04-02 15:31:39 +01:00
|
|
|
CPYTHON3=python3.4
|
2013-12-29 18:21:02 +00:00
|
|
|
MP_CPY=../../unix-cpy/cpy
|
|
|
|
|
|
|
|
RM=/bin/rm
|
|
|
|
|
|
|
|
mkdir -p output
|
|
|
|
|
|
|
|
function run_test_on_dir() {
|
|
|
|
echo ""
|
|
|
|
echo "Testing directory $1..."
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
for file in $1/*.py
|
|
|
|
do
|
|
|
|
basename=$(basename $file .py)
|
|
|
|
|
|
|
|
$CPYTHON3 -B -c "import compileall; compileall.compile_file('$file', quiet=True)"
|
2014-04-02 15:31:39 +01:00
|
|
|
#/usr/lib/python3.4/compileall.py $file
|
|
|
|
$CPYTHON3 -B unpyc.py $1/__pycache__/$basename.cpython-34.pyc > output/$basename.pycout
|
2013-12-29 18:21:02 +00:00
|
|
|
|
|
|
|
$MP_CPY $file | $CPYTHON3 -B check.py output/$basename.pycout
|
|
|
|
done
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
}
|
|
|
|
|
|
|
|
run_test_on_dir mp-tests
|
|
|
|
run_test_on_dir pylib-tests
|