aboutsummaryrefslogtreecommitdiff
path: root/create-jobs-juno.py
diff options
context:
space:
mode:
Diffstat (limited to 'create-jobs-juno.py')
-rw-r--r--create-jobs-juno.py215
1 files changed, 215 insertions, 0 deletions
diff --git a/create-jobs-juno.py b/create-jobs-juno.py
new file mode 100644
index 0000000..56079a2
--- /dev/null
+++ b/create-jobs-juno.py
@@ -0,0 +1,215 @@
+import json
+from copy import deepcopy
+from pprint import pprint
+
+SIGNAL_PREFIX = "SIGNAL_PREFIX"
+MODE = "MODE"
+JOB_NAME = "JOB_NAME"
+AGENDA = "AGENDA"
+PARAMETERS = "parameters"
+TESTDEF_REPOS = "testdef_repos"
+ACTIONS = "actions"
+
+HOST_SHELL = {
+ "command": "lava_test_shell",
+ "parameters": {
+ "testdef_repos": [
+ {
+ "git-repo": "git://git.linaro.org/qa/wa2-lava.git",
+ "testdef": "wa2host.yaml",
+ "parameters": {
+ "AGENDA": "$WA2_AGENDA",
+ "JOB_NAME": "$WA2_JOB_NAME",
+ "MODE": "$WA2_MODE",
+ "SIGNAL_PREFIX": "$WA2_PREFIX"
+ }
+ }
+ ],
+ "timeout": 4200,
+ "role": "host"
+ }
+ }
+
+TARGET_SHELL = {
+ "command": "lava_test_shell",
+ "parameters": {
+ "testdef_repos": [
+ {
+ "git-repo": "git://git.linaro.org/qa/wa2-lava.git",
+ "testdef": "wa2target.yaml",
+ "parameters": {
+ "SIGNAL_PREFIX": "$WA2_PREFIX"
+ }
+
+ }
+ ],
+ "timeout": 2400,
+ "role": "target"
+ }
+ }
+
+JSON_TEMPLATE = {
+ "logging_level": "INFO",
+ "timeout": 1800,
+ "job_name": "$JOB_NAME",
+ "device_group": [
+ {
+ "role": "host",
+ "count": 1,
+ "device_type": "dummy-ssh"
+ },
+ {
+ "role": "target",
+ "count": 1,
+ "device_type": "$DUT_TYPE"
+ }
+ ],
+ "actions": [
+ {
+ "command": "dummy_deploy",
+ "parameters": {
+ "target_type": "ubuntu"
+ }
+ },
+ {
+ "command": "deploy_linaro_android_image",
+ "metadata": {
+ "android.build": "$ANDROID_META_BUILD",
+ "android.name": "$ANDROID_META_NAME",
+ "android.url": "$ANDROID_META_URL"
+ },
+ "parameters": {
+ "boot": "$ANDROID_BOOT",
+ "data": "$ANDROID_DATA",
+ "system": "$ANDROID_SYSTEM",
+ "role": "target"
+ }
+ }
+ ]
+}
+
+SUBMIT_RESULTS = {
+ "command": "submit_results_on_host",
+ "parameters": {
+ "stream": "$BUNDLE_STREAM",
+ "server": "http://validation.linaro.org/RPC2/"
+ }
+ }
+
+POSTPROCESSING = {
+ "command": "lava_test_shell",
+ "parameters": {
+ "testdef_repos": [
+ {
+ "git-repo": "git://git.linaro.org/qa/wa2-lava.git",
+ "testdef": "wa2host_postprocessing.yaml",
+ "parameters": {
+ "JOB_NAME": "$JOB_NAME"
+ }
+ }
+ ],
+ "timeout": 4200,
+ "role": "host"
+ }
+ }
+
+modes = [
+ "hmp",
+ "a57only",
+ "a53only",
+]
+
+agenda_hmp_workloads = [
+ "hmp_only_audio.yaml",
+ "hmp_only_bbench_audio.yaml",
+]
+
+agenda_hmp_benchmarks = [
+ "hmp_juno_andbench_t1.yaml",
+ "hmp_juno_andbench_t5.yaml",
+ "hmp_juno_antutu_4.0.3.yaml",
+ "hmp_juno_benchmarkpi.yaml",
+ "hmp_juno_caffeinemark.yaml",
+ "hmp_juno_cfbench.yaml",
+ "hmp_juno_geekbench3.yaml",
+ "hmp_juno_linpack.yaml",
+ "hmp_juno_quadrant.yaml",
+ "hmp_juno_smartbench.yaml",
+ "hmp_juno_sqlite.yaml",
+ "hmp_juno_vellamo.yaml",
+]
+
+agenda_a57only_workloads = [
+ "a57only_audio.yaml",
+ "a57only_bbench_audio.yaml",
+]
+
+agenda_a53only_workloads = [
+ "a53only_audio.yaml",
+ "a53only_bbench_audio.yaml",
+]
+
+agenda_a53only_benchmarks = [
+ "a53only_andbench_t1.yaml",
+ "a53only_andbench_t5.yaml",
+ "a53only_antutu_4.0.3.yaml",
+ "a53only_benchmarkpi.yaml",
+ "a53only_caffeinemark.yaml",
+ "a53only_cfbench.yaml",
+ "a53only_geekbench3.yaml",
+ "a53only_linpack.yaml",
+ "a53only_quadrant.yaml",
+ "a53only_smartbench.yaml",
+ "a53only_sqlite.yaml",
+ "a53only_vellamo.yaml",
+]
+
+agenda_a57only_benchmarks = [
+ "a57only_andbench_t1.yaml",
+ "a57only_andbench_t5.yaml",
+ "a57only_antutu_4.0.3.yaml",
+ "a57only_benchmarkpi.yaml",
+ "a57only_caffeinemark.yaml",
+ "a57only_cfbench.yaml",
+ "a57only_geekbench3.yaml",
+ "a57only_linpack.yaml",
+ "a57only_quadrant.yaml",
+ "a57only_smartbench.yaml",
+ "a57only_sqlite.yaml",
+ "a57only_vellamo.yaml",
+]
+
+for mode in modes:
+ if mode.split("_")[1] == "workloads":
+ for benchmark in globals()["agenda_" + mode]:
+ test_case = deepcopy(JSON_TEMPLATE)
+ for iteration in range(1,6):
+ hostshell = deepcopy(HOST_SHELL)
+ hostshell[PARAMETERS][TESTDEF_REPOS][0][PARAMETERS][AGENDA] = benchmark
+ hostshell[PARAMETERS][TESTDEF_REPOS][0][PARAMETERS][MODE] = mode.split("_")[0]
+ hostshell[PARAMETERS][TESTDEF_REPOS][0][PARAMETERS][SIGNAL_PREFIX] = benchmark.split(".")[0] + "-iter" + str(iteration)
+ targetshell = deepcopy(TARGET_SHELL)
+ targetshell[PARAMETERS][TESTDEF_REPOS][0][PARAMETERS][SIGNAL_PREFIX] = benchmark.split(".")[0] + "-iter" + str(iteration)
+ test_case[ACTIONS].append(hostshell)
+ test_case[ACTIONS].append(targetshell)
+ #pprint(test_case)
+ test_case[ACTIONS].append(deepcopy(SUBMIT_RESULTS))
+ f = open("wa2_%s.json" % benchmark.split(".")[0], "w")
+ f.write(json.dumps(test_case, sort_keys=True, indent=4))
+ f.close()
+ else:
+ for benchmark in globals()["agenda_" + mode]:
+ test_case = deepcopy(JSON_TEMPLATE)
+ hostshell = deepcopy(HOST_SHELL)
+ hostshell[PARAMETERS][TESTDEF_REPOS][0][PARAMETERS][AGENDA] = benchmark
+ hostshell[PARAMETERS][TESTDEF_REPOS][0][PARAMETERS][MODE] = mode.split("_")[0]
+ hostshell[PARAMETERS][TESTDEF_REPOS][0][PARAMETERS][SIGNAL_PREFIX] = benchmark.split(".")[0]
+ targetshell = deepcopy(TARGET_SHELL)
+ targetshell[PARAMETERS][TESTDEF_REPOS][0][PARAMETERS][SIGNAL_PREFIX] = benchmark.split(".")[0]
+ test_case[ACTIONS].append(hostshell)
+ test_case[ACTIONS].append(targetshell)
+ test_case[ACTIONS].append(deepcopy(SUBMIT_RESULTS))
+ #pprint(test_case)
+ f = open("wa2_%s.json" % benchmark.split(".")[0], "w")
+ f.write(json.dumps(test_case, sort_keys=True, indent=4))
+ f.close()