Bug 1238469 - Part 1: Refactor b2g emulator tests to remove the usage of custom mozharness configs; r=ahal draft
authorEdgar Chen <echen@mozilla.com>
Wed, 20 Jan 2016 19:32:35 +0800
changeset 324284 bba3ef39c5fae573ad407a602eccc272550c2b41
parent 324283 98c3139acc00e24fcfb432edcbdc1624d13ee898
child 324285 e9ef9f2ed642b5d01c51db8aecbd6127937388f3
push id9874
push userechen@mozilla.com
push dateFri, 22 Jan 2016 09:22:52 +0000
reviewersahal
bugs1238469
milestone46.0a1
Bug 1238469 - Part 1: Refactor b2g emulator tests to remove the usage of custom mozharness configs; r=ahal
testing/mozharness/configs/b2g/emulator_automation_config.py
testing/mozharness/configs/b2g/emulator_test_config.py
testing/mozharness/configs/b2g/taskcluster_emulator_automation.py
testing/taskcluster/tasks/tests/b2g_emulator_cpp_unit.yml
testing/taskcluster/tasks/tests/b2g_emulator_crashtest.yml
testing/taskcluster/tasks/tests/b2g_emulator_js_reftest.yml
testing/taskcluster/tasks/tests/b2g_emulator_mochitest.yml
testing/taskcluster/tasks/tests/b2g_emulator_mochitest_media.yml
testing/taskcluster/tasks/tests/b2g_emulator_reftest.yml
testing/taskcluster/tasks/tests/b2g_emulator_xpcshell_chunked.yml
--- a/testing/mozharness/configs/b2g/emulator_automation_config.py
+++ b/testing/mozharness/configs/b2g/emulator_automation_config.py
@@ -1,9 +1,11 @@
 # This is a template config file for b2g emulator unittest production.
+# TODO: This could be removed after B2G ICS emulator buildbot builds is turned
+#       off, Bug 1209180.
 import os
 
 config = {
     # mozharness options
     "application": "b2g",
     "busybox_url": "https://api.pub.build.mozilla.org/tooltool/sha512/0748e900821820f1a42e2f1f3fa4d9002ef257c351b9e6b78e7de0ddd0202eace351f440372fbb1ae0b7e69e8361b036f6bd3362df99e67fc585082a311fc0df",
     "xre_url": "https://api.pub.build.mozilla.org/tooltool/sha512/dc9503b21c87b5a469118746f99e4f41d73888972ce735fa10a80f6d218086da0e3da525d9a4cd8e4ea497ec199fef720e4a525873d77a1af304ac505e076462",
     "tooltool_cache": "/builds/tooltool_cache",
deleted file mode 100644
--- a/testing/mozharness/configs/b2g/emulator_test_config.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# This is a template config file for b2g emulator unittest testing
-
-config = {
-    # mozharness script options
-    "application": "b2g",
-    "test_suite": "xpcshell",                               # reftest, mochitest or xpcshell
-
-    "emulator_url": "http://127.0.1.1/b2g/emulator.zip",    # url to emulator zip file
-    "installer_url": "http://127.0.1.1/b2g/b2g.tar.gz",     # url to gecko build
-    "xre_url": "http://127.0.1.1/b2g/xpcshell.zip",         # url to xpcshell zip file
-    "test_url": "http://127.0.1.1/b2g/tests.zip",           # url to tests.zip
-    "busybox_url": "http://127.0.1.1/b2g/busybox",          # url to busybox binary
-
-    # testsuite options
-    #"adb_path": "path/to/adb",           # defaults - os.environ['ADB_PATH']
-    #"test_manifest": "path/to/manifest", # defaults - mochitest: "b2g.json"
-                                          #              reftest: "tests/layout/reftests/reftest.list"
-                                          #             xpcshell: "tests/xpcshell.ini"
-    "total_chunks": 1,
-    "this_chunk": 1,
-}
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/b2g/taskcluster_emulator_automation.py
@@ -0,0 +1,181 @@
+#!/usr/bin/env python
+import os.path
+config = {
+    # mozharness options
+    "application": "b2g",
+    "tooltool_cache": "/builds/tooltool_cache",
+
+    "find_links": [
+        "http://pypi.pvt.build.mozilla.org/pub",
+        "http://pypi.pub.build.mozilla.org/pub",
+    ],
+    "pip_index": False,
+
+    "default_actions": [
+        'clobber',
+        'download-and-extract',
+        'create-virtualenv',
+        'install',
+        'run-tests',
+    ],
+    "download_symbols": "ondemand",
+    # We bake this directly into the tester image now.
+    "download_minidump_stackwalk": False,
+    "default_blob_upload_servers": [
+        "https://blobupload.elasticbeanstalk.com",
+    ],
+    "blob_uploader_auth_file": os.path.join(os.getcwd(), "oauth.txt"),
+
+    "run_file_names": {
+        "jsreftest": "runreftestb2g.py",
+        "mochitest": "runtestsb2g.py",
+        "mochitest-chrome": "runtestsb2g.py",
+        "reftest": "runreftestb2g.py",
+        "crashtest": "runreftestb2g.py",
+        "xpcshell": "runtestsb2g.py",
+        "cppunittest": "remotecppunittests.py"
+    },
+    "suite_definitions": {
+        "cppunittest": {
+            "options": [
+                "--dm_trans=adb",
+                "--symbols-path=%(symbols_path)s",
+                "--xre-path=%(xre_path)s",
+                "--addEnv",
+                "LD_LIBRARY_PATH=/vendor/lib:/system/lib:/system/b2g",
+                "--with-b2g-emulator=%(b2gpath)s",
+                 "--emulator=%(emulator)s",
+                "."
+            ],
+            "run_filename": "remotecppunittests.py",
+            "testsdir": "cppunittest"
+        },
+        "crashtest": {
+            "options": [
+                "--adbpath=%(adbpath)s",
+                "--b2gpath=%(b2gpath)s",
+                "--emulator=%(emulator)s",
+                "--emulator-res=800x1000",
+                "--logdir=%(logcat_dir)s",
+                "--remote-webserver=%(remote_webserver)s",
+                "--ignore-window-size",
+                "--xre-path=%(xre_path)s",
+                "--symbols-path=%(symbols_path)s",
+                "--busybox=%(busybox)s",
+                "--total-chunks=%(total_chunks)s",
+                "--this-chunk=%(this_chunk)s",
+                "--suite=crashtest",
+            ],
+            "tests": ["tests/testing/crashtest/crashtests.list",],
+            "run_filename": "runreftestb2g.py",
+            "testsdir": "reftest"
+        },
+        "jsreftest": {
+            "options": [
+                "--adbpath=%(adbpath)s",
+                "--b2gpath=%(b2gpath)s",
+                "--emulator=%(emulator)s",
+                "--emulator-res=800x1000",
+                "--logdir=%(logcat_dir)s",
+                "--remote-webserver=%(remote_webserver)s",
+                "--ignore-window-size",
+                "--xre-path=%(xre_path)s",
+                "--symbols-path=%(symbols_path)s",
+                "--busybox=%(busybox)s",
+                "--total-chunks=%(total_chunks)s",
+                "--this-chunk=%(this_chunk)s",
+                "--extra-profile-file=jsreftest/tests/user.js",
+            ],
+            "tests": ["jsreftest/tests/jstests.list",],
+            "run_filename": "remotereftest.py",
+            "testsdir": "reftest"
+        },
+        "mochitest": {
+            "options": [
+                "--adbpath=%(adbpath)s",
+                "--b2gpath=%(b2gpath)s",
+                "--emulator=%(emulator)s",
+                "--logdir=%(logcat_dir)s",
+                "--remote-webserver=%(remote_webserver)s",
+                "--xre-path=%(xre_path)s",
+                "--utility-path=%(utility_path)s",
+                "--symbols-path=%(symbols_path)s",
+                "--busybox=%(busybox)s",
+                "--total-chunks=%(total_chunks)s",
+                "--this-chunk=%(this_chunk)s",
+                "--quiet",
+                "--log-raw=%(raw_log_file)s",
+                "--log-errorsummary=%(error_summary_file)s",
+                "--certificate-path=%(certificate_path)s",
+                "--screenshot-on-fail",
+            ],
+            "tests": ["%(test_path)s"],
+            "run_filename": "runtestsb2g.py",
+            "testsdir": "mochitest"
+        },
+        "mochitest-chrome": {
+            "options": [
+                "--adbpath=%(adbpath)s",
+                "--b2gpath=%(b2gpath)s",
+                "--emulator=%(emulator)s",
+                "--logdir=%(logcat_dir)s",
+                "--remote-webserver=%(remote_webserver)s",
+                "--xre-path=%(xre_path)s",
+                "--utility-path=%(utility_path)s",
+                "--symbols-path=%(symbols_path)s",
+                "--busybox=%(busybox)s",
+                "--total-chunks=%(total_chunks)s",
+                "--this-chunk=%(this_chunk)s",
+                "--quiet",
+                "--chrome",
+                "--log-raw=%(raw_log_file)s",
+                "--log-errorsummary=%(error_summary_file)s",
+                "--certificate-path=%(certificate_path)s",
+                "--screenshot-on-fail",
+            ],
+            "tests": ["%(test_path)s"],
+            "run_filename": "runtestsb2g.py",
+            "testsdir": "mochitest"
+        },
+        "reftest": {
+            "options": [
+                "--adbpath=%(adbpath)s",
+                "--b2gpath=%(b2gpath)s",
+                "--emulator=%(emulator)s",
+                "--emulator-res=800x1000",
+                "--logdir=%(logcat_dir)s",
+                "--remote-webserver=%(remote_webserver)s",
+                "--ignore-window-size",
+                "--xre-path=%(xre_path)s",
+                "--symbols-path=%(symbols_path)s",
+                "--busybox=%(busybox)s",
+                "--total-chunks=%(total_chunks)s",
+                "--this-chunk=%(this_chunk)s",
+                "--enable-oop",
+            ],
+            "tests": ["tests/layout/reftests/reftest.list",],
+            "run_filename": "runreftestsb2g.py",
+            "testsdir": "reftest"
+        },
+        "xpcshell": {
+            "options": [
+                "--adbpath=%(adbpath)s",
+                "--b2gpath=%(b2gpath)s",
+                "--emulator=%(emulator)s",
+                "--logdir=%(logcat_dir)s",
+                "--manifest=tests/xpcshell.ini",
+                "--use-device-libs",
+                "--testing-modules-dir=%(modules_dir)s",
+                "--symbols-path=%(symbols_path)s",
+                "--busybox=%(busybox)s",
+                "--total-chunks=%(total_chunks)s",
+                "--this-chunk=%(this_chunk)s",
+                "--log-raw=%(raw_log_file)s",
+                "--log-errorsummary=%(error_summary_file)s",
+            ],
+            "run_filename": "runtestsb2g.py",
+            "testsdir": "xpcshell"
+        }
+    },
+    "vcs_output_timeout": 1760,
+}
\ No newline at end of file
--- a/testing/taskcluster/tasks/tests/b2g_emulator_cpp_unit.yml
+++ b/testing/taskcluster/tasks/tests/b2g_emulator_cpp_unit.yml
@@ -7,20 +7,17 @@ task:
     description: CPP Unit Tests test run
 
   workerType: b2gtest-emulator
   payload:
     command:
       - entrypoint
       - >
         python ./mozharness/scripts/b2g_emulator_unittest.py
-        --config-file ./mozharness/configs/b2g/emulator_automation_config.py
-        --config-file ./mozharness_configs/emulator_override.py
-        --config-file ./mozharness_configs/remove_executables.py
-        --download-symbols ondemand
+        --config-file ./mozharness/configs/b2g/taskcluster_emulator_automation.py
         --test-suite cppunittest
         --installer-url {{build_url}}
         --test-packages-url {{test_packages_url}}
         --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
         --symbols-url {{symbols_url}}
     artifacts:
       'public/build':
         type: directory
--- a/testing/taskcluster/tasks/tests/b2g_emulator_crashtest.yml
+++ b/testing/taskcluster/tasks/tests/b2g_emulator_crashtest.yml
@@ -8,20 +8,17 @@ task:
 
   workerType: b2gtest-emulator
   payload:
     maxRunTime: 3600
     command:
       - entrypoint
       - >
         python ./mozharness/scripts/b2g_emulator_unittest.py
-        --config-file ./mozharness/configs/b2g/emulator_automation_config.py
-        --config-file ./mozharness_configs/emulator_override.py
-        --config-file ./mozharness_configs/remove_executables.py
-        --download-symbols ondemand
+        --config-file ./mozharness/configs/b2g/taskcluster_emulator_automation.py
         --test-suite crashtest
         --installer-url {{build_url}}
         --test-packages-url {{test_packages_url}}
         --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
         --symbols-url {{symbols_url}}
         --this-chunk {{chunk}}
         --total-chunk {{total_chunks}}
     artifacts:
--- a/testing/taskcluster/tasks/tests/b2g_emulator_js_reftest.yml
+++ b/testing/taskcluster/tasks/tests/b2g_emulator_js_reftest.yml
@@ -7,20 +7,17 @@ task:
     description: JSReftest test run {{chunk}}
 
   workerType: b2gtest-emulator
   payload:
     command:
       - entrypoint
       - >
         python ./mozharness/scripts/b2g_emulator_unittest.py
-        --config-file ./mozharness/configs/b2g/emulator_automation_config.py
-        --config-file ./mozharness_configs/emulator_override.py
-        --config-file ./mozharness_configs/remove_executables.py
-        --download-symbols ondemand
+        --config-file ./mozharness/configs/b2g/taskcluster_emulator_automation.py
         --test-suite jsreftest
         --installer-url {{build_url}}
         --test-packages-url {{test_packages_url}}
         --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
         --this-chunk {{chunk}}
         --total-chunk {{total_chunks}}
     artifacts:
       'public/build':
--- a/testing/taskcluster/tasks/tests/b2g_emulator_mochitest.yml
+++ b/testing/taskcluster/tasks/tests/b2g_emulator_mochitest.yml
@@ -8,22 +8,17 @@ task:
 
   workerType: b2gtest-emulator
   payload:
     maxRunTime: 7200
     command:
       - entrypoint
       - >
         python ./mozharness/scripts/b2g_emulator_unittest.py
-        --no-read-buildbot-config
-        --config-file ./mozharness/configs/b2g/emulator_automation_config.py
-        --config-file ./mozharness_configs/gaia_integration_override.py
-        --config-file ./mozharness_configs/emulator_override.py
-        --config-file ./mozharness_configs/remove_executables.py
-        --download-symbols ondemand
+        --config-file ./mozharness/configs/b2g/taskcluster_emulator_automation.py
         --test-suite mochitest
         --installer-url {{build_url}}
         --test-packages-url {{test_packages_url}}
         --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
         --symbols-url {{symbols_url}}
         --this-chunk {{chunk}}
         --total-chunk {{total_chunks}}
     artifacts:
--- a/testing/taskcluster/tasks/tests/b2g_emulator_mochitest_media.yml
+++ b/testing/taskcluster/tasks/tests/b2g_emulator_mochitest_media.yml
@@ -7,22 +7,17 @@ task:
     description: Mochitest Media test run
 
   workerType: b2gtest-emulator
   payload:
     command:
       - entrypoint
       - >
         python ./mozharness/scripts/b2g_emulator_unittest.py
-        --no-read-buildbot-config
-        --config-file ./mozharness/configs/b2g/emulator_automation_config.py
-        --config-file ./mozharness_configs/gaia_integration_override.py
-        --config-file ./mozharness_configs/emulator_override.py
-        --config-file ./mozharness_configs/remove_executables.py
-        --download-symbols ondemand
+        --config-file ./mozharness/configs/b2g/taskcluster_emulator_automation.py
         --test-suite mochitest
         --installer-url {{build_url}}
         --test-packages-url {{test_packages_url}}
         --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
         dom/media/tests
     artifacts:
       'public/build':
         type: directory
--- a/testing/taskcluster/tasks/tests/b2g_emulator_reftest.yml
+++ b/testing/taskcluster/tasks/tests/b2g_emulator_reftest.yml
@@ -7,20 +7,17 @@ task:
     description: Reftest test run {{chunk}}
 
   workerType: b2gtest-emulator
   payload:
     command:
       - entrypoint
       - >
         python ./mozharness/scripts/b2g_emulator_unittest.py
-        --config-file ./mozharness/configs/b2g/emulator_automation_config.py
-        --config-file ./mozharness_configs/emulator_override.py
-        --config-file ./mozharness_configs/remove_executables.py
-        --download-symbols ondemand
+        --config-file ./mozharness/configs/b2g/taskcluster_emulator_automation.py
         --test-suite reftest
         --installer-url {{build_url}}
         --test-packages-url {{test_packages_url}}
         --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
         --symbols-url {{symbols_url}}
         --this-chunk {{chunk}}
         --total-chunk {{total_chunks}}
     artifacts:
--- a/testing/taskcluster/tasks/tests/b2g_emulator_xpcshell_chunked.yml
+++ b/testing/taskcluster/tasks/tests/b2g_emulator_xpcshell_chunked.yml
@@ -8,19 +8,17 @@ task:
 
   workerType: b2gtest-emulator
   payload:
     maxRunTime: 6000
     command:
       - entrypoint
       - >
         python ./mozharness/scripts/b2g_emulator_unittest.py
-        --config-file ./mozharness/configs/b2g/emulator_automation_config.py
-        --config-file ./mozharness_configs/remove_executables.py
-        --download-symbols ondemand
+        --config-file ./mozharness/configs/b2g/taskcluster_emulator_automation.py
         --test-suite xpcshell
         --installer-url {{build_url}}
         --test-packages-url {{test_packages_url}}
         --xre-url https://api.pub.build.mozilla.org/tooltool/sha512/cefa8c00db04969d3a50e2a5509bd4ea1dc17d256a651a9518cb28dad72e87a1dbbcd3c88ef770be0edf0ab73d2d73925140df93618ffb7fab81b789d312f547
         --busybox-url {{busybox_url}}
         --symbols-url {{symbols_url}}
         --this-chunk {{chunk}}
         --total-chunk {{total_chunks}}