diff options
author | Andrew McDermott <andrew.mcdermott@linaro.org> | 2013-07-03 11:35:05 +0100 |
---|---|---|
committer | Andrew McDermott <andrew.mcdermott@linaro.org> | 2013-07-03 16:02:13 +0100 |
commit | 134eeb73d914f433cba1bbaaadeeaa804ed9246a (patch) | |
tree | cbc4601436fefe78a1a9ab640a6126dbda9e924a /openembedded/scripts/mauve-test-pkg | |
parent | 29a147fddc1908d76f3ee2518ae09cd3abcaf81b (diff) |
Added Mauve tests for Java LEG
Note: a lot of the tests are commented out until the core Java classes
pass without issue.
Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
Diffstat (limited to 'openembedded/scripts/mauve-test-pkg')
-rwxr-xr-x | openembedded/scripts/mauve-test-pkg | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/openembedded/scripts/mauve-test-pkg b/openembedded/scripts/mauve-test-pkg new file mode 100755 index 0000000..16bf996 --- /dev/null +++ b/openembedded/scripts/mauve-test-pkg @@ -0,0 +1,58 @@ +#!/bin/bash + +# Lava Mauve test harness. +# +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Andrew McDermott <andrew.mcdermott@linaro.org> +# + +function generate_exclude_list() { + local file="$1" + local excludes= + + while read -r line; do + [[ "$line" =~ ^#.*$ ]] && continue + [[ "$line" =~ ^$ ]] && continue + excludes="${excludes} -exclude ${line}" + done < "$file" + + echo "${excludes}" +} + +basedir=$(dirname $0) +java_pkg=$1; shift +blacklist_file="$basedir/../mauve/blacklist.d/${java_pkg}" +javavm=$(which java) + +if [[ -z "$javavm" ]]; then + echo "No Java virtual machine found" + exit 1 +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" +fi + +$javavm Harness -vm $javavm $excludes $java_pkg "$@" |