summaryrefslogtreecommitdiff
path: root/openembedded/scripts/mauve-test-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'openembedded/scripts/mauve-test-pkg')
-rwxr-xr-xopenembedded/scripts/mauve-test-pkg47
1 files changed, 34 insertions, 13 deletions
diff --git a/openembedded/scripts/mauve-test-pkg b/openembedded/scripts/mauve-test-pkg
index caef9b8..8d7f6a4 100755
--- a/openembedded/scripts/mauve-test-pkg
+++ b/openembedded/scripts/mauve-test-pkg
@@ -26,9 +26,9 @@ function generate_exclude_list() {
local excludes=
while read -r line; do
- [[ "$line" =~ ^#.*$ ]] && continue
- [[ "$line" =~ ^$ ]] && continue
- excludes="${excludes} -exclude ${line}"
+ [[ "$line" =~ ^#.*$ ]] && continue
+ [[ "$line" =~ ^$ ]] && continue
+ excludes="${excludes} -exclude ${line}"
done < "$file"
echo "${excludes}"
@@ -36,9 +36,10 @@ function generate_exclude_list() {
script=$(readlink -f $0)
scriptpath=$(dirname $script)
-java_pkg=$1; shift
-java_pkg=${java_pkg//\//.}
-blacklist_file="$scriptpath/../mauve/blacklist.d/${java_pkg}"
+test_case=$1; shift
+test_case_normalized=${test_case//\//.}
+mauve_home=$1; shift
+blacklist_file="${scriptpath}/../mauve/blacklist.d/${test_case_normalized}"
javavm=$(which java)
if [[ -z "$javavm" ]]; then
@@ -49,12 +50,32 @@ fi
excludes=
if [[ -f ${blacklist_file} ]]; then
- excludes=$(generate_exclude_list $blacklist_file)
- while read -r line; do
- [[ "$line" =~ ^#.*$ ]] && continue
- [[ "$line" =~ ^$ ]] && continue
- echo "SKIP: $line"
- done < "$blacklist_file"
+ excludes=$(generate_exclude_list $blacklist_file)
+else
+ blacklist_file=/dev/null
fi
-$javavm HarnessLinaro -vm $javavm -vmarg -Xmixed $excludes $java_pkg "$@"
+output_dir="/tmp/${test_case_normalized}.$$"
+mkdir -p $output_dir
+pushd $output_dir
+output_file="${test_case_normalized}.txt"
+
+echo $javavm HarnessLinaro $excludes $test_case "$@"
+export CLASSPATH=$mauve_home
+$javavm -client HarnessLinaro $excludes $test_case "$@" 2>&1 | tee $output_file
+
+if [[ -f ${blacklist_file} ]]; then
+ cp ${blacklist_file} ${test_case_normalized}-excluded-tests.txt
+ lava-test-run-attach ${test_case_normalized}-excluded-tests.txt
+fi
+
+sed -n '/TEST RESULTS:/,$p' $output_file > ${test_case_normalized}-summary.txt
+lava-test-run-attach ${test_case_normalized}-summary.txt
+
+grep '^FAIL:' $output_file > ${test_case_normalized}-failed.txt
+lava-test-run-attach ${test_case_normalized}-failed.txt
+
+grep '^PASS:' $output_file > ${test_case_normalized}-success.txt
+lava-test-run-attach ${test_case_normalized}-success.txt
+
+rm -rf $output_dir