Add back the old ENV variabe approach to json_process.

Enable using the old envrionment variable passing of settings for json_process
so that the current autoconf test suite scripts can run nicely.

json_process now takes an optional command line parameter --env which
causes it to use the old method of reading the settings from
environment variables instead of directly from the "env" file.

Also added a --strip command line option, this will be used to
run the stripped tests with CMake as well.
This commit is contained in:
Joakim Söderberg
2013-03-13 00:09:08 +01:00
parent 650707fccc
commit b1b4f307d5
6 changed files with 141 additions and 19 deletions

View File

@@ -14,7 +14,7 @@ run_test() {
if [ -f $test_path/env ]; then
. $test_path/env
fi
$json_process <$test_path/input >$test_log/stdout 2>$test_log/stderr
$json_process --env <$test_path/input >$test_log/stdout 2>$test_log/stderr
)
valgrind_check $test_log/stderr || return 1
cmp -s $test_path/output $test_log/stdout

View File

@@ -10,7 +10,7 @@ is_test() {
}
run_test() {
$json_process <$test_path/input >$test_log/stdout 2>$test_log/stderr
$json_process --env <$test_path/input >$test_log/stdout 2>$test_log/stderr
valgrind_check $test_log/stderr || return 1
cmp -s $test_path/error $test_log/stderr
}

View File

@@ -20,7 +20,7 @@ do_run() {
strip=1
fi
STRIP=$strip $json_process \
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

View File

@@ -0,0 +1 @@
JSON_SORT_KEYS=1

View File

@@ -19,7 +19,7 @@ do_run() {
strip=0
[ "$variant" = "strip" ] && strip=1
STRIP=$strip $json_process \
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