+do_run() {
+ variant=$1
+ s=".$1"
+
+ strip=0
+ if [ "$variant" = "strip" ]; then
+ # This test should not be stripped
+ [ -f $test_path/nostrip ] && return
+ strip=1
+ fi
+
+ STRIP=$strip $json_process \
+ <$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
+ return 1
+ fi
+}
+