summaryrefslogtreecommitdiff
path: root/ThirdParty/tolua_runtime/luajit-2.1/src/x64/test/unit_test.sh
blob: c6633ca2ec9d9fc8b865b450117d9754ef62f642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
DIR=$(cd $(dirname $0); pwd)
cd $DIR

LUAJIT=$DIR/../../luajit
HASERR=0

find $DIR/unit -name "*.lua" -print | while read x; do
    $LUAJIT $x >/dev/null 2>/dev/null
    if [ $? -eq 0 ]; then
        echo "$x ok"
    else
        HASERR=1
        echo "$x failed"
    fi
done

if [ $HASERR -eq 0 ]; then
    exit 0
fi

exit 1