summaryrefslogtreecommitdiff
path: root/tests/testClass.sh
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-11-26 19:32:27 +0100
committerParménides GV <parmegv@sdf.org>2013-11-26 19:32:27 +0100
commit35085356f540e181a75784d9dbfcc63ea920f0d5 (patch)
tree0debe5d643856356768e6f2db2d978d64bb07327 /tests/testClass.sh
parent79f7a3e1ea17cfdefc44f9350e092af027a9a26e (diff)
Script to run tests from a test class directly.
It receives the path to the file, and it runs the tests coded in there.
Diffstat (limited to 'tests/testClass.sh')
-rwxr-xr-xtests/testClass.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/testClass.sh b/tests/testClass.sh
new file mode 100755
index 00000000..1889d32d
--- /dev/null
+++ b/tests/testClass.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+classfile=$1
+classline=`grep " class" $classfile`
+next=0
+for word in $classline
+do
+ if [ $word == "class" ]
+ then
+ next=1
+ elif [ $next -eq 1 ]
+ then
+ classname=$word
+ next=0
+ fi
+done
+
+adb shell am instrument -w -e class se.leap.bitmaskclient.test.$classname se.leap.bitmaskclient.test/android.test.InstrumentationTestRunner