summaryrefslogtreecommitdiff
path: root/automated/android/apk-automation/main.py
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-03-30 18:54:46 +0100
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-04-28 09:50:02 +0000
commitab48dcadc4eb74a126a8d76bece720ab000b1452 (patch)
tree4cf508236cf2cf8d44ff2552bf7b2d7a6fdee58b /automated/android/apk-automation/main.py
parentd92cc5a7e7461e7fe493a3a1be0bbdc7a94f9892 (diff)
downloadtest-definitions-pipe-ab48dcadc4eb74a126a8d76bece720ab000b1452.tar.gz
automated: android: add refactored apk-automation
Change-Id: I5a81b3c4317dc56f90df37c5a8f83d2547542fab Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
Diffstat (limited to 'automated/android/apk-automation/main.py')
-rwxr-xr-xautomated/android/apk-automation/main.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/automated/android/apk-automation/main.py b/automated/android/apk-automation/main.py
new file mode 100755
index 0000000..1b06c80
--- /dev/null
+++ b/automated/android/apk-automation/main.py
@@ -0,0 +1,21 @@
+from argparse import ArgumentParser
+import importlib
+
+parser = ArgumentParser()
+parser.add_argument('-d', '--apk_dir', dest='apk_dir', default='./apks',
+ help="Specify APK's directory.")
+parser.add_argument('-u', '--base_url', dest='base_url', default='http://testdata.validation.linaro.org/apks/',
+ help="Specify APK's base url.")
+parser.add_argument('-n', '--name', dest='name', default='linpack',
+ help='Specify test name.')
+parser.add_argument('-l', '--loops', type=int, dest='loops', default=1,
+ help='Set the number of test loops.')
+parser.add_argument('-v', '--verbose', action='store_true', dest='verbose',
+ default=False, help='Set the number of test loops.')
+args = parser.parse_args()
+print('Test job arguments: %s' % args)
+
+config = vars(args)
+mod = importlib.import_module(config['name'])
+a = mod.ApkRunnerImpl(config)
+a.run()