diff options
Diffstat (limited to 'tools/tryselect')
-rw-r--r-- | tools/tryselect/push.py | 22 | ||||
-rw-r--r-- | tools/tryselect/selectors/chooser/app.py | 17 | ||||
-rw-r--r-- | tools/tryselect/selectors/chooser/static/filter.js | 6 | ||||
-rw-r--r-- | tools/tryselect/selectors/chooser/static/select.js | 2 | ||||
-rw-r--r-- | tools/tryselect/selectors/perf.py | 13 | ||||
-rw-r--r-- | tools/tryselect/selectors/perfselector/classification.py | 48 | ||||
-rw-r--r-- | tools/tryselect/selectors/release.py | 1 | ||||
-rw-r--r-- | tools/tryselect/test/test_auto.t | 6 | ||||
-rw-r--r-- | tools/tryselect/test/test_empty.t | 6 | ||||
-rw-r--r-- | tools/tryselect/test/test_fuzzy.t | 20 | ||||
-rw-r--r-- | tools/tryselect/test/test_message.t | 8 | ||||
-rw-r--r-- | tools/tryselect/test/test_perf.py | 55 | ||||
-rw-r--r-- | tools/tryselect/test/test_preset.t | 20 | ||||
-rw-r--r-- | tools/tryselect/test/test_push.py | 30 | ||||
-rw-r--r-- | tools/tryselect/test/test_release.py | 12 | ||||
-rw-r--r-- | tools/tryselect/try_presets.yml | 31 |
16 files changed, 207 insertions, 90 deletions
diff --git a/tools/tryselect/push.py b/tools/tryselect/push.py index cf5e646c8c..a4811682bc 100644 --- a/tools/tryselect/push.py +++ b/tools/tryselect/push.py @@ -121,7 +121,7 @@ def task_labels_from_try_config(try_task_config): if try_task_config["version"] == 2: parameters = try_task_config.get("parameters", {}) if "try_task_config" in parameters: - return parameters["try_task_config"]["tasks"] + return parameters["try_task_config"].get("tasks") else: return None elif try_task_config["version"] == 1: @@ -183,6 +183,21 @@ def display_push_estimates(try_task_config): ) +# improves on `" ".join(sys.argv[:])` by requoting argv items containing spaces or single quotes +def get_sys_argv(injected_argv=None): + argv_to_use = injected_argv or sys.argv[:] + + formatted_argv = [] + for item in argv_to_use: + if " " in item or "'" in item: + formatted_item = f'"{item}"' + else: + formatted_item = item + formatted_argv.append(formatted_item) + + return " ".join(formatted_argv) + + def push_to_try( method, msg, @@ -206,9 +221,12 @@ def push_to_try( # Format the commit message closed_tree_string = " ON A CLOSED TREE" if closed_tree else "" - commit_message = "{}{}\n\nPushed via `mach try {}`".format( + the_cmdline = get_sys_argv() + full_commandline_entry = f"mach try command: `{the_cmdline}`" + commit_message = "{}{}\n\n{}\n\nPushed via `mach try {}`".format( msg, closed_tree_string, + full_commandline_entry, method, ) diff --git a/tools/tryselect/selectors/chooser/app.py b/tools/tryselect/selectors/chooser/app.py index 99d63cd37f..2e9e2d5ab0 100644 --- a/tools/tryselect/selectors/chooser/app.py +++ b/tools/tryselect/selectors/chooser/app.py @@ -107,6 +107,23 @@ class Test(Section): @register_section +class Android(Section): + name = "android" + kind = ( + "build-apk,build-bundle,build-components,test-apk,test-components,ui-test-apk" + ) + title = "Firefox for Android" + attrs = ["kind", "build-type", "component", "shipping-product"] + + def labelfn(self, task): + if task["kind"] in ("build-components", "test-components"): + label = "{}-{}".format(task["kind"], task.get("component")) + else: + label = "{}-{}".format(task["kind"], task.get("build-type")) + return label + + +@register_section class Perf(Section): name = "perf" kind = "test" diff --git a/tools/tryselect/selectors/chooser/static/filter.js b/tools/tryselect/selectors/chooser/static/filter.js index 2d8731e61f..683ced8953 100644 --- a/tools/tryselect/selectors/chooser/static/filter.js +++ b/tools/tryselect/selectors/chooser/static/filter.js @@ -10,7 +10,7 @@ const pluralize = (count, noun, suffix = "s") => var selected = []; var updateLabels = () => { - $(".tab-pane.active > .filter-label").each(function (index) { + $(".tab-pane.active > .filter-label").each(function () { let box = $("#" + this.htmlFor)[0]; let method = box.checked ? "add" : "remove"; $(this)[method + "Class"]("is-checked"); @@ -21,7 +21,7 @@ var apply = () => { let filters = {}; let kinds = []; - $(".filter:checked").each(function (index) { + $(".filter:checked").each(function () { for (let kind of this.name.split(",")) { if (!kinds.includes(kind)) { kinds.push(kind); @@ -76,7 +76,7 @@ var apply = () => { var applyChunks = () => { // For tasks that have a chunk filter applied, we handle that here. let filters = {}; - $(".filter:text").each(function (index) { + $(".filter:text").each(function () { let value = $(this).val(); if (value === "") { return; diff --git a/tools/tryselect/selectors/chooser/static/select.js b/tools/tryselect/selectors/chooser/static/select.js index 8a315c0a52..e90744a09a 100644 --- a/tools/tryselect/selectors/chooser/static/select.js +++ b/tools/tryselect/selectors/chooser/static/select.js @@ -39,7 +39,7 @@ labels.click(function (e) { function selectAll(btn) { let checked = !!btn.value; - $("div.active label.filter-label").each(function (index) { + $("div.active label.filter-label").each(function () { $(this).find("input:checkbox")[0].checked = checked; }); apply(); diff --git a/tools/tryselect/selectors/perf.py b/tools/tryselect/selectors/perf.py index 261905d5a3..e8a6e6f9cc 100644 --- a/tools/tryselect/selectors/perf.py +++ b/tools/tryselect/selectors/perf.py @@ -127,19 +127,6 @@ class PerfParser(CompareParser): }, ], [ - # Bug 1866047 - Remove once monorepo changes are complete - ["--fenix"], - { - "action": "store_true", - "default": False, - "help": "Include Fenix in tasks to run (disabled by default). Must " - "be used in conjunction with --android. Fenix isn't built on mozilla-central " - "so we pull the APK being tested from the firefox-android project. This " - "means that the fenix APK being tested in the two pushes is the same, and " - "any local changes made won't impact it.", - }, - ], - [ ["--chrome"], { "action": "store_true", diff --git a/tools/tryselect/selectors/perfselector/classification.py b/tools/tryselect/selectors/perfselector/classification.py index cabf2a323e..a8e2adc034 100644 --- a/tools/tryselect/selectors/perfselector/classification.py +++ b/tools/tryselect/selectors/perfselector/classification.py @@ -31,13 +31,12 @@ class Platforms(ClassificationEnum): class Apps(ClassificationEnum): FIREFOX = {"value": "firefox", "index": 0} CHROME = {"value": "chrome", "index": 1} - CHROMIUM = {"value": "chromium", "index": 2} - GECKOVIEW = {"value": "geckoview", "index": 3} - FENIX = {"value": "fenix", "index": 4} - CHROME_M = {"value": "chrome-m", "index": 5} - SAFARI = {"value": "safari", "index": 6} - CHROMIUM_RELEASE = {"value": "custom-car", "index": 7} - CHROMIUM_RELEASE_M = {"value": "cstm-car-m", "index": 8} + GECKOVIEW = {"value": "geckoview", "index": 2} + FENIX = {"value": "fenix", "index": 3} + CHROME_M = {"value": "chrome-m", "index": 4} + SAFARI = {"value": "safari", "index": 5} + CHROMIUM_RELEASE = {"value": "custom-car", "index": 6} + CHROMIUM_RELEASE_M = {"value": "cstm-car-m", "index": 7} class Suites(ClassificationEnum): @@ -66,10 +65,6 @@ def check_for_android(android=False, **kwargs): return android -def check_for_fenix(fenix=False, **kwargs): - return fenix or ("fenix" in kwargs.get("requested_apps", [])) - - def check_for_chrome(chrome=False, **kwargs): return chrome @@ -137,12 +132,6 @@ class ClassificationProvider: "restriction": check_for_chrome, "platforms": [Platforms.DESKTOP.value], }, - Apps.CHROMIUM.value: { - "query": "'chromium", - "negation": "!chrom", - "restriction": check_for_chrome, - "platforms": [Platforms.DESKTOP.value], - }, Apps.GECKOVIEW.value: { "query": "'geckoview", "negation": "!geckoview", @@ -151,7 +140,6 @@ class ClassificationProvider: Apps.FENIX.value: { "query": "'fenix", "negation": "!fenix", - "restriction": check_for_fenix, "platforms": [Platforms.ANDROID.value], }, Apps.CHROME_M.value: { @@ -207,7 +195,6 @@ class ClassificationProvider: "apps": [ # XXX No live CaR tests Apps.FIREFOX.value, Apps.CHROME.value, - Apps.CHROMIUM.value, Apps.FENIX.value, Apps.GECKOVIEW.value, Apps.SAFARI.value, @@ -304,7 +291,6 @@ class ClassificationProvider: Suites.RAPTOR.value: [ Apps.FIREFOX.value, Apps.CHROME.value, - Apps.CHROMIUM.value, Apps.FENIX.value, Apps.GECKOVIEW.value, ], @@ -376,7 +362,6 @@ class ClassificationProvider: Suites.RAPTOR.value: [ Apps.FIREFOX.value, Apps.CHROME.value, - Apps.CHROMIUM.value, Apps.FENIX.value, Apps.GECKOVIEW.value, ], @@ -384,4 +369,25 @@ class ClassificationProvider: "tasks": [], "description": "A group of tests that monitor key graphics and media metrics to keep the browser fast", }, + "Pageload Lite": { + "query": { + Suites.RAPTOR.value: ["'browsertime 'tp6-bench"], + }, + "suites": [Suites.RAPTOR.value], + "platform-restrictions": [ + Platforms.DESKTOP.value, + Platforms.LINUX.value, + Platforms.MACOSX.value, + Platforms.WINDOWS.value, + ], + "variant-restrictions": {Suites.RAPTOR.value: [Variants.FISSION.value]}, + "app-restrictions": { + Suites.RAPTOR.value: [Apps.FIREFOX.value], + }, + "tasks": [], + "description": ( + "Similar to the Pageload category, but it provides a minimum set " + "of pageload tests to run for performance testing." + ), + }, } diff --git a/tools/tryselect/selectors/release.py b/tools/tryselect/selectors/release.py index 994bbe644d..fae85469ba 100644 --- a/tools/tryselect/selectors/release.py +++ b/tools/tryselect/selectors/release.py @@ -94,6 +94,7 @@ def run( "browser/config/version.txt": "{}\n".format(app_version), "browser/config/version_display.txt": "{}\n".format(version), "config/milestone.txt": "{}\n".format(app_version), + "mobile/android/version.txt": "{}\n".format(version), } with open("browser/config/version.txt") as f: current_version = FirefoxVersion.parse(f.read()) diff --git a/tools/tryselect/test/test_auto.t b/tools/tryselect/test/test_auto.t index c3fe797949..398eb1a431 100644 --- a/tools/tryselect/test/test_auto.t +++ b/tools/tryselect/test/test_auto.t @@ -8,6 +8,8 @@ Test auto selector Commit message: Tasks automatically selected. + mach try command: `./mach try auto --no-push --no-artifact` + Pushed via `mach try auto` Calculated try_task_config.json: { @@ -27,6 +29,8 @@ Test auto selector Commit message: Tasks automatically selected. ON A CLOSED TREE + mach try command: `./mach try auto --no-push --no-artifact --closed-tree` + Pushed via `mach try auto` Calculated try_task_config.json: { @@ -45,6 +49,8 @@ Test auto selector Commit message: foo Tasks automatically selected. bar ON A CLOSED TREE + mach try command: `./mach try auto --no-push --no-artifact --closed-tree -m "foo {msg} bar"` + Pushed via `mach try auto` Calculated try_task_config.json: { diff --git a/tools/tryselect/test/test_empty.t b/tools/tryselect/test/test_empty.t index d7e9c22618..9e330f8dab 100644 --- a/tools/tryselect/test/test_empty.t +++ b/tools/tryselect/test/test_empty.t @@ -7,6 +7,8 @@ Test empty selector Commit message: No try selector specified, use "Add New Jobs" to select tasks. + mach try command: `./mach try empty --no-push` + Pushed via `mach try empty` Calculated try_task_config.json: { @@ -26,6 +28,8 @@ Test empty selector Commit message: No try selector specified, use "Add New Jobs" to select tasks. ON A CLOSED TREE + mach try command: `./mach try empty --no-push --closed-tree` + Pushed via `mach try empty` Calculated try_task_config.json: { @@ -45,6 +49,8 @@ Test empty selector Commit message: foo No try selector specified, use "Add New Jobs" to select tasks. bar ON A CLOSED TREE + mach try command: `./mach try empty --no-push --closed-tree -m "foo {msg} bar"` + Pushed via `mach try empty` Calculated try_task_config.json: { diff --git a/tools/tryselect/test/test_fuzzy.t b/tools/tryselect/test/test_fuzzy.t index 843b053e08..347e49ce72 100644 --- a/tools/tryselect/test/test_fuzzy.t +++ b/tools/tryselect/test/test_fuzzy.t @@ -7,6 +7,8 @@ Test fuzzy selector Commit message: Fuzzy query='foo + mach try command: `./mach try fuzzy --no-push --no-artifact -q "'foo"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -33,6 +35,8 @@ Test fuzzy selector Commit message: Fuzzy query='bar + mach try command: `./mach try fuzzy --no-push --no-artifact --full -q "'bar"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -58,6 +62,8 @@ Test multiple selectors Commit message: Fuzzy query='foo&query='bar + mach try command: `./mach try fuzzy --no-push --no-artifact --full -q "'foo" -q "'bar"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -85,6 +91,8 @@ Test query intersection Commit message: Fuzzy query='foo&query='opt + mach try command: `./mach try fuzzy --no-push --no-artifact --and -q "'foo" -q "'opt"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -112,6 +120,8 @@ Test intersection with preset containing multiple queries Commit message: Fuzzy query='test&query='opt&query='test + mach try command: `./mach try fuzzy --no-push --no-artifact --preset foo -xq "'test"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -134,6 +144,8 @@ Test intersection with preset containing multiple queries Commit message: Fuzzy query='test&query='opt&query='test + mach try command: `./mach try --no-push --no-artifact --preset foo -xq "'test"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -159,6 +171,8 @@ Test exact match Commit message: Fuzzy query=testfoo | 'testbar + mach try command: `./mach try fuzzy --no-push --no-artifact --full -q "testfoo | 'testbar"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -181,6 +195,8 @@ Test exact match Commit message: Fuzzy query=testfoo | 'testbar + mach try command: `./mach try fuzzy --no-push --no-artifact --full --exact -q "testfoo | 'testbar"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -206,6 +222,8 @@ Test task config Commit message: Fuzzy query='foo + mach try command: `./mach try fuzzy --no-push --artifact -q "'foo"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -230,6 +248,8 @@ Test task config Commit message: Fuzzy query='foo + mach try command: `./mach try fuzzy --no-push --no-artifact --env FOO=1 --env BAR=baz -q "'foo"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { diff --git a/tools/tryselect/test/test_message.t b/tools/tryselect/test/test_message.t index a707e410fb..45adc2dc5a 100644 --- a/tools/tryselect/test/test_message.t +++ b/tools/tryselect/test/test_message.t @@ -9,6 +9,8 @@ Test custom commit messages with fuzzy selector Fuzzy query=foo + mach try command: `./mach try fuzzy --no-push --no-artifact -q foo --message Foobar` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -31,6 +33,8 @@ Test custom commit messages with fuzzy selector Commit message: Foobar: Fuzzy query=foo + mach try command: `./mach try fuzzy --no-push --no-artifact -q foo -m "Foobar: {msg}"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -62,11 +66,15 @@ Test custom commit messages with syntax selector try: -b do -p linux -u mochitests + mach try command: `./mach try syntax --no-push --no-artifact -p linux -u mochitests --message Foobar` + Pushed via `mach try syntax` $ ./mach try syntax $testargs -p linux -u mochitests -m "Foobar: {msg}" Commit message: Foobar: try: -b do -p linux -u mochitests + mach try command: `./mach try syntax --no-push --no-artifact -p linux -u mochitests -m "Foobar: {msg}"` + Pushed via `mach try syntax` $ unset EDITOR $ ./mach try syntax $testargs -p linux -u mochitests -m > /dev/null 2>&1 diff --git a/tools/tryselect/test/test_perf.py b/tools/tryselect/test/test_perf.py index c4e3b6b5fa..73aa3c4d71 100644 --- a/tools/tryselect/test/test_perf.py +++ b/tools/tryselect/test/test_perf.py @@ -193,7 +193,6 @@ TEST_CATEGORIES = { "!live", "!profil", "!chrom", - "!fenix", "!safari", "!m-car", ] @@ -206,7 +205,6 @@ TEST_CATEGORIES = { "!live", "!profil", "!chrom", - "!fenix", "!safari", "!m-car", ] @@ -220,7 +218,6 @@ TEST_CATEGORIES = { "!live", "!profil", "!chrom", - "!fenix", "!safari", "!m-car", ], @@ -234,7 +231,6 @@ TEST_CATEGORIES = { }, [ "Responsiveness android-p2 geckoview", - "Benchmarks desktop chromium", ], ), # Default settings ( @@ -248,7 +244,6 @@ TEST_CATEGORIES = { "!bytecode", "!profil", "!chrom", - "!fenix", "!safari", "!m-car", ] @@ -260,7 +255,6 @@ TEST_CATEGORIES = { "!bytecode", "!profil", "!chrom", - "!fenix", "!safari", "!m-car", ] @@ -273,7 +267,6 @@ TEST_CATEGORIES = { "!bytecode", "!profil", "!chrom", - "!fenix", "!safari", "!m-car", ], @@ -281,7 +274,6 @@ TEST_CATEGORIES = { }, [ "Responsiveness android-p2 geckoview", - "Benchmarks desktop chromium", "Benchmarks desktop firefox profiling", "Talos desktop live-sites", "Talos desktop profiling+swr", @@ -300,7 +292,6 @@ TEST_CATEGORIES = { "!bytecode", "!profil", "!chrom", - "!fenix", "!m-car", ] }, @@ -331,7 +322,7 @@ TEST_CATEGORIES = { ), ( {"live_sites": True, "chrome": True}, - 114, + 90, { "Benchmarks desktop": { "raptor": [ @@ -339,7 +330,6 @@ TEST_CATEGORIES = { "!android 'shippable !-32 !clang", "!bytecode", "!profil", - "!fenix", "!safari", "!m-car", ] @@ -351,20 +341,10 @@ TEST_CATEGORIES = { "'live", "!bytecode", "!profil", - "!fenix", "!safari", "!m-car", ], }, - "Benchmarks desktop chromium": { - "raptor": [ - "'browsertime 'benchmark", - "!android 'shippable !-32 !clang", - "'chromium", - "!bytecode", - "!profil", - ], - }, }, [ "Responsiveness android-p2 geckoview", @@ -374,7 +354,7 @@ TEST_CATEGORIES = { ), ( {"android": True}, - 78, + 88, { "Benchmarks desktop": { "raptor": [ @@ -384,7 +364,6 @@ TEST_CATEGORIES = { "!live", "!profil", "!chrom", - "!fenix", "!safari", "!m-car", ], @@ -403,12 +382,11 @@ TEST_CATEGORIES = { [ "Responsiveness android-a51 chrome-m", "Firefox Pageload android", - "Pageload android-a51 fenix", ], ), ( {"android": True, "chrome": True}, - 128, + 118, { "Benchmarks desktop": { "raptor": [ @@ -417,7 +395,6 @@ TEST_CATEGORIES = { "!bytecode", "!live", "!profil", - "!fenix", "!safari", "!m-car", ], @@ -437,7 +414,7 @@ TEST_CATEGORIES = { ), ( {"android": True, "chrome": True, "profile": True}, - 164, + 156, { "Benchmarks desktop": { "raptor": [ @@ -445,7 +422,6 @@ TEST_CATEGORIES = { "!android 'shippable !-32 !clang", "!bytecode", "!live", - "!fenix", "!safari", "!m-car", ] @@ -463,7 +439,6 @@ TEST_CATEGORIES = { "Resource Usage desktop profiling", "DAMP (Devtools) desktop chrome", "Resource Usage android", - "Resource Usage windows chromium", ], ), ( @@ -497,7 +472,6 @@ TEST_CATEGORIES = { "Resource Usage desktop profiling", "DAMP (Devtools) desktop chrome", "Resource Usage android", - "Resource Usage windows chromium", ], ), # Show all available windows tests, no other platform should exist @@ -755,7 +729,6 @@ TEST_CATEGORIES = { "!bytecode", "!profil", "!chrom", - "!fenix", "!safari", "!m-car", ], @@ -767,7 +740,6 @@ TEST_CATEGORIES = { "!bytecode", "!profil", "!chrom", - "!fenix", "!safari", "!m-car", ], @@ -847,7 +819,7 @@ def test_category_expansion_with_non_pgo_flag(category_options, call_counts): [ ( {}, - [10, 2, 2, 10, 2, 1], + [9, 2, 2, 10, 2, 1], 2, ( "\n!!!NOTE!!!\n You'll be able to find a performance comparison " @@ -858,7 +830,7 @@ def test_category_expansion_with_non_pgo_flag(category_options, call_counts): ), ( {"query": "'Pageload 'linux 'firefox"}, - [10, 2, 2, 10, 2, 1], + [9, 2, 2, 10, 2, 1], 2, ( "\n!!!NOTE!!!\n You'll be able to find a performance comparison " @@ -869,7 +841,7 @@ def test_category_expansion_with_non_pgo_flag(category_options, call_counts): ), ( {"cached_revision": "cached_base_revision"}, - [10, 1, 1, 10, 2, 0], + [9, 1, 1, 10, 2, 0], 2, ( "\n!!!NOTE!!!\n You'll be able to find a performance comparison " @@ -880,7 +852,7 @@ def test_category_expansion_with_non_pgo_flag(category_options, call_counts): ), ( {"dry_run": True}, - [10, 1, 1, 10, 2, 0], + [9, 1, 1, 10, 2, 0], 2, ( "\n!!!NOTE!!!\n You'll be able to find a performance comparison " @@ -913,7 +885,7 @@ def test_category_expansion_with_non_pgo_flag(category_options, call_counts): ), ( {"single_run": True}, - [10, 1, 1, 4, 2, 0], + [9, 1, 1, 4, 2, 0], 2, ( "If you need any help, you can find us in the #perf-help Matrix channel:\n" @@ -922,7 +894,7 @@ def test_category_expansion_with_non_pgo_flag(category_options, call_counts): ), ( {"detect_changes": True}, - [11, 2, 2, 10, 2, 1], + [10, 2, 2, 10, 2, 1], 2, ( "\n!!!NOTE!!!\n You'll be able to find a performance comparison " @@ -933,7 +905,7 @@ def test_category_expansion_with_non_pgo_flag(category_options, call_counts): ), ( {"perfcompare_beta": True}, - [10, 2, 2, 10, 2, 1], + [9, 2, 2, 10, 2, 1], 2, ( "\n!!!NOTE!!!\n You'll be able to find a performance comparison " @@ -971,7 +943,6 @@ def test_full_run(options, call_counts, log_ind, expected_log_message): ["", TASKS], ["", TASKS], ["", TASKS], - ["", TASKS], ["", ["Perftest Change Detector"]], ] # Number of side effects for fzf should always be greater than @@ -997,11 +968,11 @@ def test_full_run(options, call_counts, log_ind, expected_log_message): [ ( {"detect_changes": True}, - [11, 0, 0, 2, 1], + [10, 0, 0, 2, 1], 1, ( "Executing raptor queries: 'browsertime 'benchmark, !clang 'linux " - "'shippable, !bytecode, !live, !profil, !chrom, !fenix, !safari, !m-car" + "'shippable, !bytecode, !live, !profil, !chrom, !safari, !m-car" ), InvalidRegressionDetectorQuery, ), diff --git a/tools/tryselect/test/test_preset.t b/tools/tryselect/test/test_preset.t index 13e6946d32..07b4fb1bf4 100644 --- a/tools/tryselect/test/test_preset.t +++ b/tools/tryselect/test/test_preset.t @@ -10,12 +10,16 @@ Test preset with no subcommand Commit message: try: -b do -p linux -u mochitests -t none --tag foo + mach try command: `./mach try --no-push --no-artifact --preset foo` + Pushed via `mach try syntax` $ ./mach try syntax $testargs --preset foo Commit message: try: -b do -p linux -u mochitests -t none --tag foo + mach try command: `./mach try syntax --no-push --no-artifact --preset foo` + Pushed via `mach try syntax` $ ./mach try $testargs --list-presets @@ -59,12 +63,16 @@ Test preset with syntax subcommand Commit message: try: -b do -p win32 -u none -t all --tag bar + mach try command: `./mach try syntax --no-push --no-artifact --preset bar` + Pushed via `mach try syntax` $ ./mach try $testargs --preset bar Commit message: try: -b do -p win32 -u none -t all --tag bar + mach try command: `./mach try --no-push --no-artifact --preset bar` + Pushed via `mach try syntax` $ ./mach try syntax $testargs --list-presets @@ -128,6 +136,8 @@ Test preset with fuzzy subcommand Commit message: Fuzzy query='foo + mach try command: `./mach try fuzzy --no-push --no-artifact --preset baz` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -152,6 +162,8 @@ Test preset with fuzzy subcommand Commit message: Fuzzy query='foo + mach try command: `./mach try --no-push --no-artifact --preset baz` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -178,6 +190,8 @@ Queries can be appended to presets Commit message: Fuzzy query='foo&query='build + mach try command: `./mach try fuzzy --no-push --no-artifact --preset baz -q "'build"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -203,6 +217,8 @@ Queries can be appended to presets Commit message: Fuzzy query='foo&query='opt + mach try command: `./mach try --no-push --no-artifact --preset baz -xq "'opt"` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -294,6 +310,8 @@ Test gecko-profile argument handling. Add in profiling to a preset. Commit message: Fuzzy query='foo + mach try command: `./mach try fuzzy --no-push --no-artifact --preset baz --gecko-profile-features=nostacksampling,cpu` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { @@ -326,6 +344,8 @@ settings; everything else uses dashes.) Commit message: Fuzzy query='foo + mach try command: `./mach try fuzzy --no-push --no-artifact --preset profile` + Pushed via `mach try fuzzy` Calculated try_task_config.json: { diff --git a/tools/tryselect/test/test_push.py b/tools/tryselect/test/test_push.py index 97f2e047d7..c8dbbe4184 100644 --- a/tools/tryselect/test/test_push.py +++ b/tools/tryselect/test/test_push.py @@ -50,5 +50,35 @@ def test_generate_try_task_config(method, labels, params, routes, expected): ) +def test_get_sys_argv(): + input_argv = [ + "./mach", + "try", + "fuzzy", + "--full", + "--artifact", + "--push-to-lando", + "--query", + "'android-hw !shippable !nofis", + "--no-push", + ] + expected_string = './mach try fuzzy --full --artifact --push-to-lando --query "\'android-hw !shippable !nofis" --no-push' + assert push.get_sys_argv(input_argv) == expected_string + + +def test_get_sys_argv_2(): + input_argv = [ + "./mach", + "try", + "fuzzy", + "--query", + "'test-linux1804-64-qr/opt-mochitest-plain-", + "--worker-override=t-linux-large=gecko-t/t-linux-2204-wayland-experimental", + "--no-push", + ] + expected_string = './mach try fuzzy --query "\'test-linux1804-64-qr/opt-mochitest-plain-" --worker-override=t-linux-large=gecko-t/t-linux-2204-wayland-experimental --no-push' + assert push.get_sys_argv(input_argv) == expected_string + + if __name__ == "__main__": mozunit.main() diff --git a/tools/tryselect/test/test_release.py b/tools/tryselect/test/test_release.py index a1a0d348b2..00eeb0c6c6 100644 --- a/tools/tryselect/test/test_release.py +++ b/tools/tryselect/test/test_release.py @@ -18,11 +18,18 @@ def test_release(run_mach, capfd): output = capfd.readouterr().out print(output) - expected = dedent( + expected_part1 = dedent( """ Commit message: staging release: 97.0 + """ + ).lstrip() + # The output now features a display of the `mach try` command run here + # that will vary based on the user and invocation, so ignore that part. + + expected_part2 = dedent( + """ Pushed via `mach try release` Calculated try_task_config.json: { @@ -36,7 +43,8 @@ def test_release(run_mach, capfd): """ ).lstrip() - assert expected in output + assert expected_part1 in output + assert expected_part2 in output if __name__ == "__main__": diff --git a/tools/tryselect/try_presets.yml b/tools/tryselect/try_presets.yml index 680d318dc6..b0d258bb0d 100644 --- a/tools/tryselect/try_presets.yml +++ b/tools/tryselect/try_presets.yml @@ -17,12 +17,31 @@ android-components: - "'build-components" - "'test-components" +android-geckoview: + selector: fuzzy + # Show chunk numbers so we can query with -1$ / -2$ etc. + show_chunk_numbers: true + # disable_target_task_filter: true + # Run taskgraph full so all tasks are available + full: true + description: >- + Run android-geckoview builds and tests. + query: + # Lint + - "^source-test-mozlint android-lints$ | eslint$ | rejected-words$ | file-perm$ | file-whitespace$" + # Tests + - "^test-android-em-7.0-x86_64-qr/debug-isolated-process-geckoview- 'test-verify | cppunittest-1proc$ | gtest-1proc$ | junit$ | junit-fis$ | junit-nofis$ | junit-nofis-ship$ | xpcshell-1$ | xpcshell-2$" + - "^test-android-em-7.0-x86_64-qr/debug-isolated-process-geckoview-mochitest- media-1$ | media-2$ | plain-1$ | plain-2$ | plain-3$ | plain-4$ | plain-5$ | plain-gpu$" + - "^test-android-em-7.0-x86_64-qr/opt-geckoview- xpcshell-1$ | xpcshell-2$ | cppunittest-1proc$ | gtest-1proc$ | junit-fis$ | junit-nofis-ship$ | junit-nofis$ | junit$ | mochitest-media$" + - "^test-android-em-7.0-x86_64-qr/opt-geckoview-mochitest- media$ | plain-1$ | plain-2$ | plain-3$ | plain-4$ | plain-5$ | plain-gpu$" + - "^test-android-em-7.0-x86_64-qr/opt-geckoview-test-verify" + builds: selector: fuzzy description: >- Run builds without any of the extras. query: - - "^build- !fuzzing !notarization !reproduced !rusttests !signing !upload-symbols" + - "^build- !fuzzing !notarization !reproduced !rusttests !signing !upload-symbols !components !apk !bundle" builds-debug: selector: fuzzy @@ -30,7 +49,7 @@ builds-debug: Run the bare minimum of debug build jobs to ensure builds work on all tier-1 platforms. query: - - "^build- 'debug !fuzzing !rusttests !signing !plain !asan !tsan !noopt !toolchain !upload-symbols" + - "^build- 'debug !fuzzing !rusttests !signing !plain !asan !tsan !noopt !toolchain !upload-symbols !apk !bundle" builds-debugopt: selector: fuzzy @@ -38,7 +57,7 @@ builds-debugopt: Run the bare minimum of debug and opt build jobs to ensure builds work on all tier-1 platforms. query: - - "^build- !fuzzing !rusttests !signing !plain !asan !tsan !noopt !toolchain !upload-symbols" + - "^build- !fuzzing !rusttests !signing !plain !asan !tsan !noopt !toolchain !upload-symbols !components !apk !bundle" desktop-frontend: description: >- @@ -150,7 +169,7 @@ fpush-linux-android: query: - "'test-linux1804 'debug- !-shippable !-asan" - "'test-android-em 'debug" - - "^build !-shippable !-signing !-asan !-fuzzing !-rusttests !-base-toolchain !-aar-" + - "^build !-shippable !-signing !-asan !-fuzzing !-rusttests !-base-toolchain !-aar- !components !apk !bundle" geckodriver: selector: fuzzy @@ -254,7 +273,7 @@ sample-suites: query: - ^test- -1$ # Only run a single talos + raptor suite per platform - - ^test- !1$ !2$ !3$ !4$ !5$ !6$ !7$ !8$ !9$ !0$ !raptor !talos + - ^test- !1$ !2$ !3$ !4$ !5$ !6$ !7$ !8$ !9$ !0$ !raptor !talos !components !apk - ^test- 'raptor-speedometer | 'talos-g1 sm-shell-all: @@ -320,7 +339,7 @@ webrender: description: >- Runs the conformance tests relevant to WebRender. query: - - "!talos !raptor !shippable !asan '-qr" + - "!talos !raptor !shippable !asan '-qr !components" - "^webrender-" webrender-reftests: |