[tbb-commits] [tor-browser/esr24] Bug 981030 - Create platform specific mozharness files for storing test harness options, r=aki, a=test-only

mikeperry at torproject.org mikeperry at torproject.org
Fri Aug 29 05:26:38 UTC 2014


commit 28a5504d154c0dece36db3ca97c21e9b90380d6f
Author: Andrew Halberstadt <ahalberstadt at mozilla.com>
Date:   Fri Mar 21 12:39:07 2014 -0400

    Bug 981030 - Create platform specific mozharness files for storing test harness options, r=aki, a=test-only
---
 testing/config/mozharness/android_arm_config.py   |   37 +++++++++
 testing/config/mozharness/android_panda_config.py |   86 +++++++++++++++++++++
 testing/config/mozharness/android_x86_config.py   |   37 +++++++++
 testing/config/mozharness/b2g_desktop_config.py   |   18 +++++
 testing/config/mozharness/b2g_emulator_config.py  |   48 ++++++++++++
 testing/config/mozharness/linux_config.py         |   34 ++++++++
 testing/config/mozharness/mac_config.py           |   34 ++++++++
 testing/config/mozharness/windows_config.py       |   34 ++++++++
 testing/config/mozharness_config.py               |   28 -------
 9 files changed, 328 insertions(+), 28 deletions(-)

diff --git a/testing/config/mozharness/android_arm_config.py b/testing/config/mozharness/android_arm_config.py
new file mode 100644
index 0000000..06ec34a
--- /dev/null
+++ b/testing/config/mozharness/android_arm_config.py
@@ -0,0 +1,37 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+config = {
+    "suite_definitions": {
+        "mochitest": {
+            "run_filename": "runtestsremote.py",
+            "options": ["--autorun", "--close-when-done", "--dm_trans=sut",
+                "--console-level=INFO", "--app=%(app)s", "--remote-webserver=%(remote_webserver)s",
+                "--xre-path=%(xre_path)s", "--utility-path=%(utility_path)s",
+                "--deviceIP=%(device_ip)s", "--devicePort=%(device_port)s",
+                "--http-port=%(http_port)s", "--ssl-port=%(ssl_port)s",
+                "--certificate-path=%(certs_path)s", "--symbols-path=%(symbols_path)s"
+            ],
+        },
+        "reftest": {
+            "run_filename": "remotereftest.py",
+            "options": [ "--app=%(app)s", "--ignore-window-size",
+                "--bootstrap", "--enable-privilege",
+                "--remote-webserver=%(remote_webserver)s", "--xre-path=%(xre_path)s",
+                "--utility-path=%(utility_path)s", "--deviceIP=%(device_ip)s",
+                "--devicePort=%(device_port)s", "--http-port=%(http_port)s",
+                "--ssl-port=%(ssl_port)s", "--httpd-path", "reftest/components",
+                "--symbols-path=%(symbols_path)s",
+            ],
+        },
+        "xpcshell": {
+            "run_filename": "remotexpcshelltests.py",
+            "options": ["--deviceIP=%(device_ip)s", "--devicePort=%(device_port)s",
+                "--xre-path=%(xre_path)s", "--testing-modules-dir=%(modules_dir)s",
+                "--apk=%(installer_path)s", "--no-logfiles",
+                "--symbols-path=%(symbols_path)s",
+            ],
+        },
+    }, # end suite_definitions
+}
diff --git a/testing/config/mozharness/android_panda_config.py b/testing/config/mozharness/android_panda_config.py
new file mode 100644
index 0000000..2bafcc7
--- /dev/null
+++ b/testing/config/mozharness/android_panda_config.py
@@ -0,0 +1,86 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+config = {
+    "mochitest_options": [
+        "--deviceIP=%(device_ip)s",
+        "--xre-path=../hostutils/xre",
+        "--utility-path=../hostutils/bin", "--certificate-path=certs",
+        "--app=%(app_name)s", "--console-level=INFO",
+        "--http-port=%(http_port)s", "--ssl-port=%(ssl_port)s",
+        "--run-only-tests=android.json", "--symbols-path=%(symbols_path)s"
+    ],
+    "reftest_options": [
+        "--deviceIP=%(device_ip)s",
+        "--xre-path=../hostutils/xre",
+        "--utility-path=../hostutils/bin",
+        "--app=%(app_name)s",
+        "--ignore-window-size", "--bootstrap",
+        "--http-port=%(http_port)s", "--ssl-port=%(ssl_port)s",
+        "--symbols-path=%(symbols_path)s",
+        "reftest/tests/layout/reftests/reftest.list"
+    ],
+    "crashtest_options": [
+        "--deviceIP=%(device_ip)s",
+        "--xre-path=../hostutils/xre",
+        "--utility-path=../hostutils/bin",
+        "--app=%(app_name)s",
+        "--enable-privilege", "--ignore-window-size", "--bootstrap",
+        "--http-port=%(http_port)s", "--ssl-port=%(ssl_port)s",
+        "--symbols-path=%(symbols_path)s",
+        "reftest/tests/testing/crashtest/crashtests.list"
+    ],
+    "jsreftest_options": [
+        "--deviceIP=%(device_ip)s",
+        "--xre-path=../hostutils/xre",
+        "--utility-path=../hostutils/bin",
+        "--app=%(app_name)s",
+        "--enable-privilege", "--ignore-window-size", "--bootstrap",
+        "--extra-profile-file=jsreftest/tests/user.js", "jsreftest/tests/jstests.list",
+        "--http-port=%(http_port)s", "--ssl-port=%(ssl_port)s",
+        "--symbols-path=%(symbols_path)s"
+    ],
+    "robocop_options": [
+        "--deviceIP=%(device_ip)s",
+        "--xre-path=../hostutils/xre",
+        "--utility-path=../hostutils/bin",
+        "--certificate-path=certs",
+        "--app=%(app_name)s", "--console-level=INFO",
+        "--http-port=%(http_port)s", "--ssl-port=%(ssl_port)s",
+        "--symbols-path=%(symbols_path)s",
+        "--robocop=mochitest/robocop.ini"
+    ],
+    "xpcshell_options": [
+        "--deviceIP=%(device_ip)s",
+        "--xre-path=../hostutils/xre",
+        "--manifest=xpcshell/tests/xpcshell_android.ini",
+        "--build-info-json=xpcshell/mozinfo.json",
+        "--testing-modules-dir=modules",
+        "--local-lib-dir=../fennec",
+        "--apk=../%(apk_name)s",
+        "--no-logfiles",
+        "--symbols-path=%(symbols_path)s"
+    ],
+    "jittest_options": [
+        "bin/js",
+        "--remote",
+        "-j", "1",
+        "--deviceTransport=sut",
+        "--deviceIP=%(device_ip)s",
+        "--localLib=../tests/bin",
+        "--no-slow",
+        "--no-progress",
+        "--tinderbox",
+        "--tbpl"
+     ],
+     "cppunittest_options": [
+        "--symbols-path=%(symbols_path)s",
+        "--xre-path=tests/bin",
+        "--dm_trans=SUT",
+        "--deviceIP=%(device_ip)s",
+        "--localBinDir=../tests/bin",
+        "--apk=%(apk_path)s",
+        "--skip-manifest=../tests/cppunittests/android_cppunittest_manifest.txt"
+     ],
+}
diff --git a/testing/config/mozharness/android_x86_config.py b/testing/config/mozharness/android_x86_config.py
new file mode 100644
index 0000000..06ec34a
--- /dev/null
+++ b/testing/config/mozharness/android_x86_config.py
@@ -0,0 +1,37 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+config = {
+    "suite_definitions": {
+        "mochitest": {
+            "run_filename": "runtestsremote.py",
+            "options": ["--autorun", "--close-when-done", "--dm_trans=sut",
+                "--console-level=INFO", "--app=%(app)s", "--remote-webserver=%(remote_webserver)s",
+                "--xre-path=%(xre_path)s", "--utility-path=%(utility_path)s",
+                "--deviceIP=%(device_ip)s", "--devicePort=%(device_port)s",
+                "--http-port=%(http_port)s", "--ssl-port=%(ssl_port)s",
+                "--certificate-path=%(certs_path)s", "--symbols-path=%(symbols_path)s"
+            ],
+        },
+        "reftest": {
+            "run_filename": "remotereftest.py",
+            "options": [ "--app=%(app)s", "--ignore-window-size",
+                "--bootstrap", "--enable-privilege",
+                "--remote-webserver=%(remote_webserver)s", "--xre-path=%(xre_path)s",
+                "--utility-path=%(utility_path)s", "--deviceIP=%(device_ip)s",
+                "--devicePort=%(device_port)s", "--http-port=%(http_port)s",
+                "--ssl-port=%(ssl_port)s", "--httpd-path", "reftest/components",
+                "--symbols-path=%(symbols_path)s",
+            ],
+        },
+        "xpcshell": {
+            "run_filename": "remotexpcshelltests.py",
+            "options": ["--deviceIP=%(device_ip)s", "--devicePort=%(device_port)s",
+                "--xre-path=%(xre_path)s", "--testing-modules-dir=%(modules_dir)s",
+                "--apk=%(installer_path)s", "--no-logfiles",
+                "--symbols-path=%(symbols_path)s",
+            ],
+        },
+    }, # end suite_definitions
+}
diff --git a/testing/config/mozharness/b2g_desktop_config.py b/testing/config/mozharness/b2g_desktop_config.py
new file mode 100644
index 0000000..772566c
--- /dev/null
+++ b/testing/config/mozharness/b2g_desktop_config.py
@@ -0,0 +1,18 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+config = {
+    "mochitest_options": [
+        "--console-level=INFO", "%(test_manifest)s",
+        "--total-chunks=%(total_chunks)s", "--this-chunk=%(this_chunk)s",
+        "--profile=%(gaia_profile)s", "--app=%(application)s", "--desktop",
+        "--utility-path=%(utility_path)s", "--certificate-path=%(cert_path)s",
+        "--symbols-path=%(symbols_path)s",
+    ],
+
+    "reftest_options": [
+        "--desktop", "--profile=%(gaia_profile)s", "--appname=%(application)s",
+        "--symbols-path=%(symbols_path)s", "%(test_manifest)s",
+    ]
+}
diff --git a/testing/config/mozharness/b2g_emulator_config.py b/testing/config/mozharness/b2g_emulator_config.py
new file mode 100644
index 0000000..d20c5f8
--- /dev/null
+++ b/testing/config/mozharness/b2g_emulator_config.py
@@ -0,0 +1,48 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+config = {
+    "jsreftest_options": [
+        "--adbpath=%(adbpath)s", "--b2gpath=%(b2gpath)s", "--emulator=%(emulator)s",
+        "--emulator-res=800x1000", "--logcat-dir=%(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",
+        "%(test_manifest)s",
+    ],
+
+    "mochitest_options": [
+        "--adbpath=%(adbpath)s", "--b2gpath=%(b2gpath)s", "--console-level=INFO",
+        "--emulator=%(emulator)s", "--logcat-dir=%(logcat_dir)s",
+        "--remote-webserver=%(remote_webserver)s", "%(test_manifest)s",
+        "--xre-path=%(xre_path)s", "--symbols-path=%(symbols_path)s", "--busybox=%(busybox)s",
+        "--total-chunks=%(total_chunks)s", "--this-chunk=%(this_chunk)s",
+    ],
+
+    "reftest_options": [
+        "--adbpath=%(adbpath)s", "--b2gpath=%(b2gpath)s", "--emulator=%(emulator)s",
+        "--emulator-res=800x1000", "--logcat-dir=%(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",
+        "%(test_manifest)s",
+    ],
+
+    "crashtest_options": [
+        "--adbpath=%(adbpath)s", "--b2gpath=%(b2gpath)s", "--emulator=%(emulator)s",
+        "--emulator-res=800x1000", "--logcat-dir=%(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",
+        "%(test_manifest)s",
+    ],
+
+    "xpcshell_options": [
+        "--adbpath=%(adbpath)s", "--b2gpath=%(b2gpath)s", "--emulator=%(emulator)s",
+        "--logcat-dir=%(logcat_dir)s", "--manifest=%(test_manifest)s", "--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",
+    ],
+}
diff --git a/testing/config/mozharness/linux_config.py b/testing/config/mozharness/linux_config.py
new file mode 100644
index 0000000..bba4f61
--- /dev/null
+++ b/testing/config/mozharness/linux_config.py
@@ -0,0 +1,34 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+config = {
+    "reftest_options": [
+        "--appname=%(binary_path)s", "--utility-path=tests/bin",
+        "--extra-profile-file=tests/bin/plugins", "--symbols-path=%(symbols_path)s"
+    ],
+    "mochitest_options": [
+        "--appname=%(binary_path)s", "--utility-path=tests/bin",
+        "--extra-profile-file=tests/bin/plugins", "--symbols-path=%(symbols_path)s",
+        "--certificate-path=tests/certs", "--autorun", "--close-when-done",
+        "--console-level=INFO", "--setpref=webgl.force-enabled=true"
+    ],
+    "xpcshell_options": [
+        "--symbols-path=%(symbols_path)s",
+        "--test-plugin-path=%(test_plugin_path)s"
+    ],
+    "cppunittest_options": [
+        "--symbols-path=%(symbols_path)s",
+        "--xre-path=%(abs_app_dir)s"
+    ],
+    "jittest_options": [
+        "tests/bin/js",
+        "--no-slow",
+        "--no-progress",
+        "--tinderbox",
+        "--tbpl"
+    ],
+    "mozbase_options": [
+        "-b", "%(binary_path)s"
+    ],
+}
diff --git a/testing/config/mozharness/mac_config.py b/testing/config/mozharness/mac_config.py
new file mode 100644
index 0000000..73fa299
--- /dev/null
+++ b/testing/config/mozharness/mac_config.py
@@ -0,0 +1,34 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+config = {
+    "reftest_options": [
+        "--appname=%(binary_path)s", "--utility-path=tests/bin",
+        "--extra-profile-file=tests/bin/plugins", "--symbols-path=%(symbols_path)s"
+    ],
+    "mochitest_options": [
+        "--appname=%(binary_path)s", "--utility-path=tests/bin",
+        "--extra-profile-file=tests/bin/plugins", "--symbols-path=%(symbols_path)s",
+        "--certificate-path=tests/certs", "--autorun", "--close-when-done",
+        "--console-level=INFO"
+    ],
+    "xpcshell_options": [
+        "--symbols-path=%(symbols_path)s",
+        "--test-plugin-path=%(test_plugin_path)s"
+    ],
+    "cppunittest_options": [
+        "--symbols-path=%(symbols_path)s",
+        "--xre-path=%(abs_app_dir)s"
+    ],
+    "jittest_options": [
+        "tests/bin/js",
+        "--no-slow",
+        "--no-progress",
+        "--tinderbox",
+        "--tbpl"
+    ],
+    "mozbase_options": [
+        "-b", "%(binary_path)s"
+    ],
+}
diff --git a/testing/config/mozharness/windows_config.py b/testing/config/mozharness/windows_config.py
new file mode 100644
index 0000000..73fa299
--- /dev/null
+++ b/testing/config/mozharness/windows_config.py
@@ -0,0 +1,34 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+config = {
+    "reftest_options": [
+        "--appname=%(binary_path)s", "--utility-path=tests/bin",
+        "--extra-profile-file=tests/bin/plugins", "--symbols-path=%(symbols_path)s"
+    ],
+    "mochitest_options": [
+        "--appname=%(binary_path)s", "--utility-path=tests/bin",
+        "--extra-profile-file=tests/bin/plugins", "--symbols-path=%(symbols_path)s",
+        "--certificate-path=tests/certs", "--autorun", "--close-when-done",
+        "--console-level=INFO"
+    ],
+    "xpcshell_options": [
+        "--symbols-path=%(symbols_path)s",
+        "--test-plugin-path=%(test_plugin_path)s"
+    ],
+    "cppunittest_options": [
+        "--symbols-path=%(symbols_path)s",
+        "--xre-path=%(abs_app_dir)s"
+    ],
+    "jittest_options": [
+        "tests/bin/js",
+        "--no-slow",
+        "--no-progress",
+        "--tinderbox",
+        "--tbpl"
+    ],
+    "mozbase_options": [
+        "-b", "%(binary_path)s"
+    ],
+}
diff --git a/testing/config/mozharness_config.py b/testing/config/mozharness_config.py
deleted file mode 100644
index 1f8e36a..0000000
--- a/testing/config/mozharness_config.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-"""The config defined in this module is read by mozharness, which is a
-tool used to run many of the tests reporting to TBPL. This file is
-primarily useful for pushing custom test harness configurations to try.
-
-For example you can define a custom mochitest configuration by adding:
-    "mochitest_options": [
-        "--appname=%(binary_path)s", "--utility-path=tests/bin",
-        "--extra-profile-file=tests/bin/plugins", "--symbols-path=%(symbols_path)s",
-        "--certificate-path=tests/certs", "--autorun", "--close-when-done",
-        "--console-level=INFO", "--setpref=webgl.force-enabled=true"
-    ],
-
-Be warned that these values will be picked up by all platforms and changing them
-may result in unexpected behaviour. For example, the above will break B2G
-mochitests.
-
-You must also provide the complete command line to avoid errors. The official
-configuration files containing the default values live in:
-    https://hg.mozilla.org/build/mozharness/configs
-"""
-
-config = {
-    # Add custom mozharness config options here
-}





More information about the tbb-commits mailing list