diff options
Diffstat (limited to 'python/mozperftest/mozperftest/system/__init__.py')
-rw-r--r-- | python/mozperftest/mozperftest/system/__init__.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/python/mozperftest/mozperftest/system/__init__.py b/python/mozperftest/mozperftest/system/__init__.py new file mode 100644 index 0000000000..a5ad3df113 --- /dev/null +++ b/python/mozperftest/mozperftest/system/__init__.py @@ -0,0 +1,35 @@ +# 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/. +from mozperftest.layers import Layers +from mozperftest.system.android import AndroidDevice +from mozperftest.system.android_startup import AndroidStartUp +from mozperftest.system.macos import MacosDevice +from mozperftest.system.pingserver import PingServer +from mozperftest.system.profile import Profile +from mozperftest.system.proxy import ProxyRunner + + +def get_layers(): + return PingServer, Profile, ProxyRunner, AndroidDevice, MacosDevice, AndroidStartUp + + +def pick_system(env, flavor, mach_cmd): + if flavor in ("desktop-browser", "xpcshell", "mochitest"): + return Layers( + env, + mach_cmd, + ( + PingServer, # needs to come before Profile + MacosDevice, + Profile, + ProxyRunner, + ), + ) + if flavor == "mobile-browser": + return Layers( + env, mach_cmd, (Profile, ProxyRunner, AndroidDevice, AndroidStartUp) + ) + if flavor == "webpagetest": + return Layers(env, mach_cmd, (Profile,)) + raise NotImplementedError(flavor) |