summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg <rgrunber@redhat.com>2013-09-03 14:40:12 -0400
committerRoland Grunberg <rgrunber@redhat.com>2013-09-04 09:38:49 -0400
commitcccf5aa46fe9186a05c0c9f0276f036a0d35addf (patch)
tree664222375eed647d8070aee67c18461ac2b9711f
parent37597ae1507a7575b5ad27cdd36b2c62a777bf20 (diff)
downloadtestbundle-to-eclipse-test-cccf5aa46fe9186a05c0c9f0276f036a0d35addf.tar.gz
testbundle-to-eclipse-test-cccf5aa46fe9186a05c0c9f0276f036a0d35addf.tar.xz
testbundle-to-eclipse-test-cccf5aa46fe9186a05c0c9f0276f036a0d35addf.zip
Fix individual test class pattern matching and create a run script.
- Classes of the form '.+TestBar.+\.class' should not be matched. - A run script to perform all preparations, and running of tests.
-rwxr-xr-xprepAllTestBundles.sh4
-rwxr-xr-xprepRuntimeLocation.sh4
-rwxr-xr-xrunAllTestBundles.sh13
3 files changed, 19 insertions, 2 deletions
diff --git a/prepAllTestBundles.sh b/prepAllTestBundles.sh
index aacffee..4c72a37 100755
--- a/prepAllTestBundles.sh
+++ b/prepAllTestBundles.sh
@@ -6,7 +6,7 @@
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
-# Run Eclipse Test Bundles
+# Prepare Eclipse Test Bundles
# The definiton of an Eclipse Test Bundle for our purposes is any packaged
# OSGi bundle containing a pom.xml with a packaging type of
@@ -44,7 +44,7 @@ for jar in `find ${testBundleFolder} -name "*.jar"`; do
testclass=`jar -tf ${jar} | grep '/AllTests.class' | tr '/' '.' | sed 's/\.class//'`
fi
if [ "${testclass}" = '' ]; then
- testclasses=`jar -tf ${jar} | grep -E '/[^/]*Test.*\.class' | grep -vE '/[^/]*Abstract.*\.class' | grep -v '\\$' | tr '/' '.' | sed 's/\.class//'`
+ testclasses=`jar -tf ${jar} | grep -E '/(Test.*\.class|.*Test\.class)' | grep -vE '/(Abstract.*\.class|.*Abstract\.class)' | grep -v '\\$' | tr '/' '.' | sed 's/\.class//'`
else
testclasses="${testclass}"
fi
diff --git a/prepRuntimeLocation.sh b/prepRuntimeLocation.sh
index ce3ee86..6c471bc 100755
--- a/prepRuntimeLocation.sh
+++ b/prepRuntimeLocation.sh
@@ -4,6 +4,10 @@ mkdir target
pushd target
# Prepare testing environment
+if [ ! -e /usr/share/java/eclipse-testing ]; then
+ echo "/usr/share/java/eclipse-testing/ does not exist. Please install the package providing this location."
+ exit 1
+fi
cp -rp /usr/share/java/eclipse-testing/* ./
# Remove eclipse-tests p2 repo and generate for system
diff --git a/runAllTestBundles.sh b/runAllTestBundles.sh
new file mode 100755
index 0000000..0dd9caa
--- /dev/null
+++ b/runAllTestBundles.sh
@@ -0,0 +1,13 @@
+#! /bin/bash
+
+if [ ! $# -eq 1 ]; then
+ echo "USAGE : $0 PATH/TO/BUNDLES/DIRECTORY"
+ exit 1
+fi
+
+./prepRuntimeLocation.sh || exit 1
+./prepAllTestBundles.sh $1 || exit 1
+
+pushd target
+
+./runtests.sh -os linux -ws gtk -arch `arch`