-
-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·31 lines (28 loc) · 681 Bytes
/
test.sh
File metadata and controls
executable file
·31 lines (28 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#/bin/bash
SCRIPT_PATH="`readlink -f "$0"`"
export PYTHONPATH="`dirname "$SCRIPT_PATH"`"
set -x
rm -rf /tmp/ctypeslib
mkdir -p /tmp/ctypeslib
CFLAGS="-Wall -Wextra -Werror -std=c99 -pedantic -fpic"
LDFLAGS="-shared"
gcc $CFLAGS $LDFLAGS -o test/data/test-callbacks.so test/data/test-callbacks.c
set +x
error_count=0
for f in test/*.py; do
if [ "$f" = "test/__init__.py" ] || [ "$f" = "test/util.py" ]; then
continue
fi
echo "$f (python2)"
python2 $f
error_count=$(($error_count + $?))
echo "$f (python3)"
python3 $f
error_count=$(($error_count + $?))
done
if [ "$error_count" -eq "0" ]; then
echo "TEST OK"
else
echo "TEST **KO**: $error_count"
fi
exit $error_count