aboutsummaryrefslogtreecommitdiff
path: root/test/suites/invalid/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/suites/invalid/run')
-rwxr-xr-xtest/suites/invalid/run25
1 files changed, 6 insertions, 19 deletions
diff --git a/test/suites/invalid/run b/test/suites/invalid/run
index d1d490c..ee1ee1a 100755
--- a/test/suites/invalid/run
+++ b/test/suites/invalid/run
@@ -13,24 +13,18 @@ do_run() {
variant=$1
s=".$1"
- strip=0
+ strip=""
if [ "$variant" = "strip" ]; then
# This test should not be stripped
[ -f $test_path/nostrip ] && return
- strip=1
+ strip="--strip"
fi
- STRIP=$strip $json_process --env \
- <$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s
- valgrind_check $test_log/stderr$s || return 1
-
- ref=error
- [ -f $test_path/error$s ] && ref=error$s
-
- if ! cmp -s $test_path/$ref $test_log/stderr$s; then
- echo $variant > $test_log/variant
+ if ! $json_process $strip $test_path >$test_log/stdout$s 2>$test_log/stderr$s; then
+ echo $variant >$test_log/variant
return 1
fi
+ valgrind_check $test_log/stderr$s || return 1
}
run_test() {
@@ -44,14 +38,7 @@ show_error() {
s=".$variant"
echo "VARIANT: $variant"
-
- echo "EXPECTED ERROR:"
- ref=error
- [ -f $test_path/error$s ] && ref=error$s
- nl -bn $test_path/$ref
-
- echo "ACTUAL ERROR:"
- nl -bn $test_log/stderr$s
+ cat $test_log/stderr$s
}
. $top_srcdir/test/scripts/run-tests.sh