Fix test framework: job tracking on Mac OS X

Caused by difference in basic regular expressions supported by sed(1) on Mac
and on Linux: Mac does not support the \+ repeater, have to use \{1,\} instead.
This commit is contained in:
Andrew Bettison 2012-08-24 16:02:21 +09:30
parent 3f1e0dd763
commit 3a6b424c2d

View File

@ -256,7 +256,7 @@ runTests() {
} >"$_tfw_logdir/$testNumber.$testName.$result"
exit 0
) </dev/null &
local job=$(jobs %% | sed -n -e '1s/^\[\([0-9]\+\)\].*/\1/p')
local job=$(jobs %% | sed -n -e '1s/^\[\([0-9]\{1,\}\)\].*/\1/p')
_tfw_running_jobs+=($job)
_tfw_job_pgids[$job]=$(jobs -p %%)
ln -f -s "$_tfw_results_dir/$testName" "$_tfw_results_dir/job-$job"