summaryrefslogtreecommitdiffstats
path: root/tools/tryselect/test/test_push.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tryselect/test/test_push.py')
-rw-r--r--tools/tryselect/test/test_push.py30
1 files changed, 30 insertions, 0 deletions
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()