diff options
| author | Christopher Faulet <cfaulet@haproxy.com> | 2018-12-18 22:47:23 +0100 |
|---|---|---|
| committer | Christopher Faulet <cfaulet@haproxy.com> | 2018-12-20 10:33:18 +0100 |
| commit | 1ecf0ea70ab721991a0da48efaa752bc4fe0deb0 (patch) | |
| tree | 044fcecea75d7dc53c93d58b67171c655090aa82 /scripts | |
| parent | 8d67cf8187505049c044797aa2b854bca4459bf9 (diff) | |
| download | haproxy-1ecf0ea70ab721991a0da48efaa752bc4fe0deb0.tar.gz | |
REGTEST: script: Evaluate the varnishtest command to allow quoted parameters
Instead of directly executing varnishtest command, we use a variable to build
the command line and we execute it with the 'eval' builtin. This way it is
possible to have quoted parameters. For instance:
> ./scripts/run-regtests.sh --varnishtestparams "-Dmacro='some value' -n 10"
And the variable 'varnishtestparams' is also move at the end of the command
line, just before the list of test files. So it is possible to override all
default varnish options set by the script.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/run-regtests.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/run-regtests.sh b/scripts/run-regtests.sh index 7da746a74..be53e97cf 100755 --- a/scripts/run-regtests.sh +++ b/scripts/run-regtests.sh @@ -369,7 +369,8 @@ if [ -n "$testlist" ]; then if [ -n "$jobcount" ]; then jobcount="-j $jobcount" fi - $VARNISHTEST_PROGRAM $varnishtestparams $verbose $jobcount -l -k -t 10 $testlist + cmd="$VARNISHTEST_PROGRAM -l -k -t 10 $verbose $jobcount $varnishtestparams $testlist" + eval $cmd _vtresult=$? else echo "No tests found that meet the required criteria" |
