diff options
author | Jussi Räsänen <jussi@skyred.fi> | 2016-03-28 17:19:04 +0300 |
---|---|---|
committer | Jussi Räsänen <jussi@skyred.fi> | 2016-03-28 17:19:04 +0300 |
commit | 5098ad7d9308f6b3e43d4cc933e2dcbc004fb55d (patch) | |
tree | 7ff9d3da2eb8b6424e33942ecab72e85aa277c63 /python/servo/testing_commands.py | |
parent | 8e2af4cf056109426bed9c3eb6a8622947a28084 (diff) | |
download | servo-5098ad7d9308f6b3e43d4cc933e2dcbc004fb55d.tar.gz servo-5098ad7d9308f6b3e43d4cc933e2dcbc004fb55d.zip |
Changed mach test to use generated json file of properties
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index b99dd147b9a..95bace157d5 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -163,10 +163,17 @@ class MachCommands(CommandBase): @CommandArgument('test_name', nargs=argparse.REMAINDER, help="Only run tests that match this pattern or file path") def test_unit(self, test_name=None, package=None): - properties = json.loads(subprocess.check_output([ + subprocess.check_output([ sys.executable, path.join(self.context.topdir, "components", "style", "list_properties.py") - ])) + ]) + + this_file = style = os.path.dirname(__file__) + servo_doc_path = os.path.abspath(os.path.join(this_file, '../', '../', 'target', 'doc', 'servo')) + + with open(os.path.join(servo_doc_path, 'css-properties.json'), 'r') as property_file: + properties = json.loads(property_file.read()) + assert len(properties) >= 100 assert "margin-top" in properties assert "margin" in properties |