Beispiel #1
0
    def execute(self, page, env, args):
        runner = runners.getRunner(self.engineInfo["platform"],
                                   {"windows_processname": "cmd.exe"})

        # kill browser
        process = runner.start(
            "cmd.exe", ["/C", "taskkill", "/IM", "MicrosoftEdge.exe", "/F"],
            env)
        process.wait()

        # reset tabs
        process = runner.start("cmd.exe", [
            "/C", "del", "/Q",
            "C:\Users\%username%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\Recovery\Active"
        ], env)
        process.wait()

        # reset the result
        self.resetResults()

        # run edge.
        process = runner.start(
            "cmd.exe", ["/C", "start", "microsoft-edge:" + args[0]] + args[1:],
            env)

        # wait for results
        self.waitForResults()

        # kill browser
        runner.start("cmd.exe",
                     ["/C", "taskkill", "/IM", "MicrosoftEdge.exe", "/F"], env)
Beispiel #2
0
    def execute(self, benchmark, env, args, profile):
        runner = runners.getRunner(self.engineInfo["platform"], {
            #"osx_mount_point": "/Volumes/Nightly",
            #"osx_binary": "/Volumes/Nightly/Nightly.app/Contents/MacOS/firefox",
            #"android_processname": "org.mozilla.fennec"
            "linux_processname": "chrome",
            "windows_processname": "chrome.exe"
        })

        # kill all possible running instances.
        runner.killAllInstances()

        # if needed install the executable
        binary = runner.install(self.engineInfo["binary"])

        # Chromium Helper needs to be executable too
        helpers = runner.find(self.engineInfo["folder"], "Chromium Helper")
        for helper in helpers:
            runner.set_exec_bit(helper)

        # reset the result
        self.resetResults()

        # start browser
        process = runner.start(binary, ["--disable-setuid-sandbox"] + args, env)

        # wait for results
        self.waitForResults(benchmark.timeout)

        # kill browser
        runner.kill(process)
        runner.killAllInstances()
Beispiel #3
0
    def execute(self, page, env, args):
        runner = runners.getRunner(
            self.engineInfo["platform"],
            {
                "osx_mount_point": "/Volumes/WebKit",
                "osx_binary":
                "/Volumes/WebKit/WebKit.app/Contents/MacOS/WebKit"
                #"android_processname": "org.mozilla.fennec",
                #"linux_processname": "firefox"
            })

        # kill all possible running instances.
        runner.killAllInstances()

        # remove the saved tabs.
        runner.rm(
            os.path.join(os.environ.get("HOME"), "Library",
                         "Saved Application State",
                         "com.apple.Safari.savedState"))

        # if needed install the executable
        binary = runner.install(self.engineInfo["binary"])

        # reset the result
        self.resetResults()

        # start browser
        process = runner.start("open", ["-F", "-a", binary] + args, env)

        # wait for results
        self.waitForResults()

        # kill browser
        runner.kill(process)
        runner.killAllInstances()
Beispiel #4
0
    def execute(self, page, env, args):
        runner = runners.getRunner(self.engineInfo["platform"], {
            "osx_mount_point": "/Volumes/Nightly",
            "android_processname": "org.mozilla.fennec" 
        })

        # kill all possible running instances. 
        runner.killAllInstances()
        runner.killall("plugin-container")

        # if needed install the executable
        runner.install(self.engineInfo["binary"])

        # delete profile
        runner.rm("profile/")

        # create new profile
        runner.mkdir("profile/")

        # Update profile to disable slow script dialog 
        runner.write("profile/prefs.js", "user_pref(\"dom.max_script_run_time\", 0);")

        # reset the result
        self.resetResults()

        # start browser
        process = runner.start(self.engineInfo["binary"], args + ["--profile", runner.getdir("profile")], env)
        
        # wait for results
        self.waitForResults()

        # kill browser
        runner.kill(process)
Beispiel #5
0
    def execute(self, page, env, args):
        runner = runners.getRunner(
            self.engineInfo["platform"],
            {
                #"osx_mount_point": "/Volumes/Nightly",
                #"osx_binary": "/Volumes/Nightly/Nightly.app/Contents/MacOS/firefox",
                #"android_processname": "org.mozilla.fennec"
                "linux_processname": "chrome"
            })

        # kill all possible running instances.
        runner.killAllInstances()

        # make binary executable
        runner.set_exec_bit(self.engineInfo["binary"])

        # Chromium Helper needs to be executable too
        helpers = runner.find(self.engineInfo["folder"], "Chromium Helper")
        for helper in helpers:
            runner.set_exec_bit(helper)

        # reset the result
        self.resetResults()

        # start browser
        process = runner.start(self.engineInfo["binary"],
                               ["--disable-setuid-sandbox"] + args, env)

        # wait for results
        self.waitForResults()

        # kill browser
        runner.kill(process)
        runner.killAllInstances()
    def execute(self, benchmark, env, args, prefs):
        runner = runners.getRunner(self.engineInfo["platform"],
                                   {"windows_processname": "cmd.exe"})

        # kill browser
        print "Killing Edge (before)..."
        process = runner.start(
            "cmd.exe", ["/C", "taskkill", "/IM", "MicrosoftEdge.exe", "/F"],
            env)
        process.wait()

        # reset tabs
        process = runner.start("cmd.exe", [
            "/C", "del", "/Q",
            "C:\Users\%username%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\Recovery\Active"
        ], env)
        process.wait()

        self.reset_results()

        # run edge.
        process = runner.start(
            "cmd.exe", ["/C", "start", "microsoft-edge:" + args[0]] + args[1:],
            env)

        # wait for results
        self.wait_for_results(benchmark.timeout)

        # kill browser
        print "Killing Edge (after)..."
        runner.start("cmd.exe",
                     ["/C", "taskkill", "/IM", "MicrosoftEdge.exe", "/F"], env)
Beispiel #7
0
    def execute(self, benchmark, env, args, prefs):
        runner = runners.getRunner(self.engineInfo["platform"], {
            "osx_mount_point": "/Volumes/WebKit",
            "osx_binary": "/Volumes/WebKit/WebKit.app/Contents/MacOS/WebKit"
            #"android_processname": "org.mozilla.fennec",
            #"linux_processname": "firefox"
        })

        # kill all possible running instances.
        print "Killing Webkit (before)..."
        runner.killAllInstances()

        # remove the saved tabs.
        runner.rm(os.path.join(os.environ.get("HOME"), "Library","Saved Application State","com.apple.Safari.savedState"))

        # if needed install the executable
        binary = runner.install(self.engineInfo["binary"])

        self.reset_results()

        # start browser
        process = runner.start("open", ["-F", "-a", binary] + args, env)

        # wait for results
        self.wait_for_results(benchmark.timeout)

        # kill browser
        print "Killing Webkit (after)..."
        runner.kill(process)
        runner.killAllInstances()
Beispiel #8
0
    def execute(self, benchmark, env, args, prefs):
        runner = runners.getRunner(self.engineInfo["platform"], {
            "windows_processname": "cmd.exe"
        })

        # kill browser
        print "Killing Edge (before)..."
        process = runner.start("cmd.exe", ["/C", "taskkill", "/IM", "MicrosoftEdge.exe", "/F"], env)
        process.wait()

        # reset tabs
        process = runner.start("cmd.exe", ["/C", "del", "/Q", "C:\Users\%username%\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\MicrosoftEdge\User\Default\Recovery\Active"], env)
        process.wait()

        self.reset_results()

        # run edge.
        process = runner.start("cmd.exe", ["/C", "start", "microsoft-edge:" + args[0]] + args[1:], env)

        # wait for results
        self.wait_for_results(benchmark.timeout)

        # kill browser
        print "Killing Edge (after)..."
        runner.start("cmd.exe", ["/C", "taskkill", "/IM", "MicrosoftEdge.exe", "/F"], env)
    def execute(self, benchmark, env, args, prefs):
        runner = runners.getRunner(
            self.engineInfo["platform"],
            {
                #"osx_mount_point": "/Volumes/Nightly",
                #"osx_binary": "/Volumes/Nightly/Nightly.app/Contents/MacOS/firefox",
                #"android_processname": "org.mozilla.fennec"
                "osx_processname": "Chromium",
                "linux_processname": "chrome",
                "windows_processname": "chrome.exe"
            })

        # kill all possible running instances.
        print "Killing Chrome (before)..."
        runner.killAllInstances()

        # if needed install the executable
        binary = runner.install(self.engineInfo["binary"])

        # Chromium Helper needs to be executable too
        helpers = runner.find(self.engineInfo["folder"], "Chromium Helper")
        for helper in helpers:
            runner.set_exec_bit(helper)
        helpers = runner.find(self.engineInfo["folder"], "Chromium Framework")
        for helper in helpers:
            runner.set_exec_bit(helper)

        self.reset_results()

        # enforce an empty user data directory to clear caches and previous
        # settings
        runner.rm("profile/")
        runner.mkdir("profile/")
        runner.write("profile/First Run", "")

        effective_args = ["--disable-setuid-sandbox"] + \
                         ["--user-data-dir=profile"] + \
                         args

        # start browser
        process = runner.start(binary, effective_args, env)

        # wait for results
        self.wait_for_results(benchmark.timeout)

        # kill browser
        print "Killing Chrome (after)..."
        runner.kill(process)
        runner.killAllInstances()
Beispiel #10
0
    def execute(self, benchmark, env, args, prefs):
        runner = runners.getRunner(self.engineInfo["platform"], {
            #"osx_mount_point": "/Volumes/Nightly",
            #"osx_binary": "/Volumes/Nightly/Nightly.app/Contents/MacOS/firefox",
            #"android_processname": "org.mozilla.fennec"
            "osx_processname": "Chromium",
            "linux_processname": "chrome",
            "windows_processname": "chrome.exe"
        })

        # kill all possible running instances.
        print "Killing Chrome (before)..."
        runner.killAllInstances()

        # if needed install the executable
        binary = runner.install(self.engineInfo["binary"])

        # Chromium Helper needs to be executable too
        helpers = runner.find(self.engineInfo["folder"], "Chromium Helper")
        for helper in helpers:
            runner.set_exec_bit(helper)
        helpers = runner.find(self.engineInfo["folder"], "Chromium Framework")
        for helper in helpers:
            runner.set_exec_bit(helper)

        self.reset_results()

        # enforce an empty user data directory to clear caches and previous
        # settings
        runner.rm("profile/")
        runner.mkdir("profile/")
        runner.write("profile/First Run", "")

        effective_args = ["--disable-setuid-sandbox"] + \
                         ["--user-data-dir=profile"] + \
                         args

        # start browser
        process = runner.start(binary, effective_args, env)

        # wait for results
        self.wait_for_results(benchmark.timeout)

        # kill browser
        print "Killing Chrome (after)..."
        runner.kill(process)
        runner.killAllInstances()
Beispiel #11
0
    def execute(self, benchmark, env, args, profile):
        runner = runners.getRunner(self.engineInfo["platform"], {})

        # kill all possible running instances.
        runner.killall("servo")

        # reset the result
        self.resetResults()

        # start browser
        process = runner.start(self.engineInfo["binary"], args, env)

        # wait for results
        self.waitForResults(benchmark.timeout)

        # kill browser
        runner.kill(process)
Beispiel #12
0
    def execute(self, benchmarkDir, benchmark, args, env, config):
        runner = runners.getRunner(self.engineInfo["platform"])

        # 1. Move all files to the device if needed
        benchmarkDir = runner.put(benchmarkDir)

        # 2. Put the executables.
        path = os.path.dirname(self.engineInfo["binary"])
        path = runner.put(path, recursive = False)
        binary = os.path.join(path, os.path.basename(self.engineInfo["binary"]))

        # 3. Execute
        env["LD_LIBRARY_PATH"] = path
        command = benchmark.getCommand(binary, args)
        output = runner.execute(command, env, benchmarkDir)

        return benchmark.process_results(output)
Beispiel #13
0
    def execute(self, page, env, args):
        runner = runners.getRunner(self.engineInfo["platform"], {})

        # kill all possible running instances.
        runner.killall("servo")

        # reset the result
        self.resetResults()

        # start browser
        process = runner.start(self.engineInfo["binary"], args, env)

        # wait for results
        self.waitForResults()

        # kill browser
        runner.kill(process)
Beispiel #14
0
    def execute(self, benchmark, env, args, prefs):
        runner = runners.getRunner(self.engineInfo["platform"], {})

        # kill all possible running instances.
        print "Killing Servo (before)..."
        runner.killall("servo")

        self.reset_results()

        # start browser
        process = runner.start(self.engineInfo["binary"], args, env)

        # wait for results
        self.wait_for_results(benchmark.timeout)

        # kill browser
        print "Killing Servo (after)..."
        runner.kill(process)
    def execute(self, benchmarkDir, benchmark, args, env, config):
        runner = runners.getRunner(self.engineInfo["platform"])

        # 1. Move all files to the device if needed
        benchmarkDir = runner.put(benchmarkDir)

        # 2. Put the executables.
        path = os.path.dirname(self.engineInfo["binary"])
        path = runner.put(path, recursive=False)
        binary = os.path.join(path,
                              os.path.basename(self.engineInfo["binary"]))

        # 3. Execute
        env["LD_LIBRARY_PATH"] = path
        command = benchmark.getCommand(binary, args)
        output = runner.execute(command, env, benchmarkDir)

        return benchmark.process_results(output)
    def execute(self, benchmark, env, args, prefs):
        runner = runners.getRunner(self.engineInfo["platform"], {})

        # kill all possible running instances.
        print "Killing Servo (before)..."
        runner.killall("servo")

        self.reset_results()

        # start browser
        process = runner.start(self.engineInfo["binary"], args, env)

        # wait for results
        self.wait_for_results(benchmark.timeout)

        # kill browser
        print "Killing Servo (after)..."
        runner.kill(process)
Beispiel #17
0
    def execute(self, page, env, args):
        runner = runners.getRunner(
            self.engineInfo["platform"], {
                "osx_mount_point": "/Volumes/Nightly",
                "osx_binary":
                "/Volumes/Nightly/Nightly.app/Contents/MacOS/firefox",
                "android_processname": "org.mozilla.fennec",
                "linux_processname": "firefox",
                "windows_processname": "firefox.exe"
            })

        # kill all possible running instances.
        runner.killAllInstances()
        runner.killall("plugin-container")

        # if needed install the executable
        binary = runner.install(self.engineInfo["binary"])

        # delete profile
        runner.rm("profile/")

        # create new profile
        runner.mkdir("profile/")

        # Update profile to disable slow script dialog
        runner.write("profile/prefs.js",
                     "user_pref(\"dom.max_script_run_time\", 0);")

        # reset the result
        self.resetResults()

        # start browser
        process = runner.start(
            binary, args + ["--profile", runner.getdir("profile")], env)

        # wait for results
        self.waitForResults()

        # kill browser
        runner.kill(process)
        runner.killAllInstances()
        runner.killall("plugin-container")
    def execute(self, benchmark, env, args, prefs):
        runner = runners.getRunner(
            self.engineInfo["platform"], {
                "osx_mount_point": "/Volumes/Nightly",
                "osx_binary":
                "/Volumes/Nightly/Nightly.app/Contents/MacOS/firefox",
                "android_processname": "org.mozilla.fennec",
                "linux_processname": "firefox",
                "windows_processname": "firefox.exe"
            })

        # kill all possible running instances.
        print "Killing Firefox (before)..."
        runner.killAllInstances()
        runner.killall("plugin-container")

        # if needed install the executable
        binary = runner.install(self.engineInfo["binary"])

        # delete profile
        runner.rm("profile/")

        # create new profile
        profile = FirefoxProfile(profile="profile/", preferences=prefs)

        self.reset_results()

        # start browser
        process = runner.start(
            binary,
            args + ["--no-remote", "--profile",
                    runner.getdir("profile")], env)

        # wait for results
        self.wait_for_results(benchmark.timeout)

        # kill browser
        print "Killing Firefox (after)..."
        runner.kill(process)
        runner.killAllInstances()
        runner.killall("plugin-container")
Beispiel #19
0
    def execute(self, benchmark, env, args, profile):
        runner = runners.getRunner(self.engineInfo["platform"], {
            "osx_mount_point": "/Volumes/Nightly",
            "osx_binary": "/Volumes/Nightly/Nightly.app/Contents/MacOS/firefox",
            "android_processname": "org.mozilla.fennec",
            "linux_processname": "firefox",
            "windows_processname": "firefox.exe"
        })

        # kill all possible running instances.
        runner.killAllInstances()
        runner.killall("plugin-container")

        # if needed install the executable
        binary = runner.install(self.engineInfo["binary"])

        # delete profile
        runner.rm("profile/")

        # create new profile
        runner.mkdir("profile/")

        # Update profile to disable slow script dialog
        runner.write("profile/prefs.js", profile)

        # reset the result
        self.resetResults()

        # start browser
        process = runner.start(binary, args + ["--profile", runner.getdir("profile")], env)

        # wait for results
        self.waitForResults(benchmark.timeout)

        # kill browser
        runner.kill(process)
        runner.killAllInstances()
        runner.killall("plugin-container")
Beispiel #20
0
    def execute(self, benchmark, env, args, prefs):
        runner = runners.getRunner(self.engineInfo["platform"], {
            "osx_mount_point": "/Volumes/Nightly",
            "osx_binary": "/Volumes/Nightly/Nightly.app/Contents/MacOS/firefox",
            "android_processname": "org.mozilla.fennec",
            "linux_processname": "firefox",
            "windows_processname": "firefox.exe"
        })

        # kill all possible running instances.
        print "Killing Firefox (before)..."
        runner.killAllInstances()
        runner.killall("plugin-container")

        # if needed install the executable
        binary = runner.install(self.engineInfo["binary"])

        # delete profile
        runner.rm("profile/")

        # create new profile
        profile = FirefoxProfile(profile="profile/", preferences=prefs)

        self.reset_results()

        # start browser
        process = runner.start(binary, args + ["--no-remote", "--profile", runner.getdir("profile")], env)

        # wait for results
        self.wait_for_results(benchmark.timeout)

        # kill browser
        print "Killing Firefox (after)..."
        runner.kill(process)
        runner.killAllInstances()
        runner.killall("plugin-container")