diff options
author | Andrew McDermott <andrew.mcdermott@linaro.org> | 2013-11-28 13:28:58 +0000 |
---|---|---|
committer | Andrew McDermott <andrew.mcdermott@linaro.org> | 2013-12-02 16:37:46 +0000 |
commit | 916820b68769b13ae88c11b8e204d68c95e932a6 (patch) | |
tree | 5f5016aeb8ce8fe0fb0ed07c87b4180eef9f4282 /openembedded/scripts | |
parent | c2772f26fcbae50363169f141be3dbee74f465f7 (diff) |
jtreg: modify search for test failures and test errors
jtreg test failures are identified by 'Failed' and/or 'Error'. Adjust
the grep search accordingly.
Change-Id: I156c7c94284591b8c85233207be46d42de467f8e
Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
Diffstat (limited to 'openembedded/scripts')
-rwxr-xr-x | openembedded/scripts/jtreg-test | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/openembedded/scripts/jtreg-test b/openembedded/scripts/jtreg-test index 261e1fa..421c076 100755 --- a/openembedded/scripts/jtreg-test +++ b/openembedded/scripts/jtreg-test @@ -74,41 +74,36 @@ shopt -s nullglob # By pushd'ing we make the attached filenames in the LAVA dashboard # much smaller. -mkdir -p $output_dir/JTwork/failed +process_file() { + local filename=$1 + local result=$2 + while read -r line; do + tc=$(echo $line | awk '{print $1}') + y=$(dirname $tc) + z=$(basename $tc .java) + test_result=$output_dir/JTwork/$y/${z}.jtr + 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 + fi + done < $filename +} if [ -d $output_dir/JTreport/text ]; then pushd $output_dir/JTreport/text for i in *.txt; do lava-test-run-attach $i if [ $i = "summary.txt" ]; then - grep 'Failed\.' $i > failed.txt - grep 'Passed\.' $i > success.txt + egrep '[^ ]+[ ]+Not run\.' $i > notrun.txt + egrep '[^ ]+[ ]+(Failed|Error)\.' $i > failed.txt + egrep '[^ ]+[ ]+Passed\.' $i > pass.txt + lava-test-run-attach notrun.txt lava-test-run-attach failed.txt - lava-test-run-attach success.txt - while read -r line; do - tc=$(echo $line | awk '{print $1}') - y=$(dirname $tc) - z=$(basename $tc .java) - lava-test-case $z --result pass - echo "JTREG-SUCCESS $z" - done < success.txt - while read -r line; do - tc=$(echo $line | awk '{print $1}') - y=$(dirname $tc) - z=$(basename $tc .java) - test_result=$output_dir/JTwork/$y/${z}.jtr - if [ -e $test_result ]; then - pushd $output_dir/JTwork - mkdir -p failed-results/$y - cp $test_result failed-results/$y/${z}.jtr - pushd failed-results - lava-test-case $z --result fail - lava-test-case-attach $z $y/${z}.jtr text/plain - popd - echo "JTREG-FAIL $z" - popd - fi - done < failed.txt + lava-test-run-attach pass.txt + process_file pass.txt pass + process_file failed.txt fail fi done popd |