3 # This file is part of NIT ( http://www.nitlanguage.org ).
5 # Copyright 2014 Alexandre Terrasa <alexandre@moz-code.org>.
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
27 local args
=`cat $test.args`
28 local outdir
=$OUT/$test.files
30 echo $BIN/$args > $OUT/$test.bin
31 chmod +x
$OUT/$test.bin
32 OUTDIR
=$outdir $OUT/$test.bin
> $OUT/$test.res
2> $OUT/$test.err
34 if [ -r
$outdir ]; then
35 ls -aR
$outdir >> $OUT/$test.res
38 diff $OUT/$test.res
$RES/$test.res
> $OUT/$test.
diff 2> /dev
/null
42 # 0 if the sav not exists
43 # 1 if the file does match
44 # 2 if the file does not match
48 if [ ! -r
"$RES/$test.res" ]; then
50 elif [ ! -s
$OUT/$test.
diff ]; then
60 rm -rf
$OUT 2>/dev
/null
61 mkdir
$OUT 2>/dev
/null
68 for file in `ls *.args`; do
78 echo "skip ($test.res not found)"
86 echo "error (diff $OUT/$test.res $RES/$test.res)"
92 echo "==> success $ok/$all ($ko tests failed, $sk skipped)"