diff options
author | Andrew McDermott <andrew.mcdermott@linaro.org> | 2014-03-25 13:09:24 +0000 |
---|---|---|
committer | Andrew McDermott <andrew.mcdermott@linaro.org> | 2014-03-28 14:34:51 +0000 |
commit | 5edc737c41bc40597fd2eb2185b221ca0e9fafcf (patch) | |
tree | 9c6deff0a6461f2a9e30f66871ede2fd4bb12e68 /openembedded/scripts | |
parent | ab9f15489b242a2bf8201d11d36919dd450ed119 (diff) |
jtreg: delay lava-test-case execution
Works around: https://bugs.launchpad.net/lava-server/+bug/1297956
Change-Id: I43094a8aea014320cc93b5d935a52023c8a11995
Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
Diffstat (limited to 'openembedded/scripts')
-rwxr-xr-x | openembedded/scripts/jtreg-test | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/openembedded/scripts/jtreg-test b/openembedded/scripts/jtreg-test index 421c076..9503702 100755 --- a/openembedded/scripts/jtreg-test +++ b/openembedded/scripts/jtreg-test @@ -77,18 +77,22 @@ shopt -s nullglob process_file() { local filename=$1 local result=$2 - while read -r line; do - tc=$(echo $line | awk '{print $1}') + local ofile=/tmp/jtreg-test-process-file.$$ + echo "#!/bin/bash" > $ofile + while IFS=' ' read -r tc rem; do y=$(dirname $tc) z=$(basename $tc .java) test_result=$output_dir/JTwork/$y/${z}.jtr + echo "lava-test-case $z --result $result" >> $ofile if [ -e $test_result ]; then - pushd $output_dir/JTwork - lava-test-case $z --result $result - lava-test-case-attach $z $y/${z}.jtr text/plain - popd + echo "pushd $output_dir/JTwork >/dev/null" >> $ofile + echo "lava-test-case-attach $z $y/${z}.jtr text/plain" >> $ofile + echo "popd > /dev/null" >> $ofile fi done < $filename + [ -e $ofile ] && chmod 755 $ofile + [ -e $ofile ] && $ofile + rm -f $ofile } if [ -d $output_dir/JTreport/text ]; then |