tests: do not execute while in a sub-processus
authorJean Privat <jean@pryen.org>
Mon, 3 Aug 2009 14:14:48 +0000 (10:14 -0400)
committerJean Privat <jean@pryen.org>
Mon, 3 Aug 2009 17:15:33 +0000 (13:15 -0400)
In a sub-processus, shell variable assignment are lost.

Signed-off-by: Jean Privat <jean@pryen.org>

tests/tests.sh

index b208c71..19b278c 100755 (executable)
@@ -206,7 +206,6 @@ for ii in "$@"; do
                        if [ -f "$f.args" ]; then
                                fargs=$f.args
                                cptr=0
-                               cat $fargs |
                                while read line; do
                                        ((cptr=cptr+1))
                                        args=$line
@@ -234,7 +233,7 @@ for ii in "$@"; do
                                                cat "$fff.err" >> "$fff.res"
                                        fi
                                        process_result $fff
-                               done
+                               done < $fargs
                        fi
                else
                        echo -n "! "