mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Integrate dromaeo with mach.
This commit is contained in:
parent
ff217106d3
commit
c602af2050
2 changed files with 37 additions and 1 deletions
|
@ -271,6 +271,16 @@ class MachCommands(CommandBase):
|
||||||
def test_jquery(self, release, dev):
|
def test_jquery(self, release, dev):
|
||||||
return self.jquery_test_runner("test", release, dev)
|
return self.jquery_test_runner("test", release, dev)
|
||||||
|
|
||||||
|
@Command('test-dromaeo',
|
||||||
|
description='Run the Dromaeo test suite',
|
||||||
|
category='testing')
|
||||||
|
@CommandArgument('--release', '-r', action='store_true',
|
||||||
|
help='Run the release build')
|
||||||
|
@CommandArgument('--dev', '-d', action='store_true',
|
||||||
|
help='Run the dev build')
|
||||||
|
def test_dromaeo(self, release, dev):
|
||||||
|
return self.dromaeo_test_runner("test", release, dev)
|
||||||
|
|
||||||
@Command('update-jquery',
|
@Command('update-jquery',
|
||||||
description='Update the jQuery test suite expected results',
|
description='Update the jQuery test suite expected results',
|
||||||
category='testing')
|
category='testing')
|
||||||
|
@ -367,3 +377,29 @@ class MachCommands(CommandBase):
|
||||||
|
|
||||||
return subprocess.check_call(
|
return subprocess.check_call(
|
||||||
[run_file, cmd, bin_path, base_dir])
|
[run_file, cmd, bin_path, base_dir])
|
||||||
|
|
||||||
|
def dromaeo_test_runner(self, cmd, release, dev):
|
||||||
|
self.ensure_bootstrapped()
|
||||||
|
base_dir = path.abspath(path.join("tests", "dromaeo"))
|
||||||
|
dromaeo_dir = path.join(base_dir, "dromaeo")
|
||||||
|
run_file = path.join(base_dir, "run_dromaeo.py")
|
||||||
|
|
||||||
|
# Clone the Dromaeo repository if it doesn't exist
|
||||||
|
if not os.path.isdir(dromaeo_dir):
|
||||||
|
subprocess.check_call(
|
||||||
|
["git", "clone", "-b", "servo", "--depth", "1", "https://github.com/notriddle/dromaeo", dromaeo_dir])
|
||||||
|
|
||||||
|
# Run pull in case the Dromaeo repo was updated since last test run
|
||||||
|
subprocess.check_call(
|
||||||
|
["git", "-C", dromaeo_dir, "pull"])
|
||||||
|
|
||||||
|
# Compile test suite
|
||||||
|
subprocess.check_call(
|
||||||
|
["make", "-C", dromaeo_dir, "web"])
|
||||||
|
|
||||||
|
# Check that a release servo build exists
|
||||||
|
bin_path = path.abspath(self.get_binary_path(release, dev))
|
||||||
|
|
||||||
|
return subprocess.check_call(
|
||||||
|
[run_file, cmd, bin_path, base_dir])
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ TEST_SERVER_PORT = 8192
|
||||||
|
|
||||||
# Run servo and print / parse the results for a specific jQuery test module.
|
# Run servo and print / parse the results for a specific jQuery test module.
|
||||||
def run_servo(servo_exe):
|
def run_servo(servo_exe):
|
||||||
url = "http://localhost:{0}/?recommended&automated&post_json".format(TEST_SERVER_PORT)
|
url = "http://localhost:{0}/dromaeo/web/?recommended&automated&post_json".format(TEST_SERVER_PORT)
|
||||||
#args = [servo_exe, url, "-z", "-f"]
|
#args = [servo_exe, url, "-z", "-f"]
|
||||||
args = [servo_exe, url, "-z"]
|
args = [servo_exe, url, "-z"]
|
||||||
return subprocess.Popen(args)
|
return subprocess.Popen(args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue