aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/mutation/test.py
diff options
context:
space:
mode:
authortigercosmos <phy.tiger@gmail.com>2017-12-17 14:31:34 +0800
committertigercosmos <phy.tiger@gmail.com>2017-12-17 14:31:34 +0800
commit9b79b76fe5d5568899ba6a7a5c65ceaced319036 (patch)
tree228ab56dcaea91fdfe17b1a1c9d7100e83922488 /python/servo/mutation/test.py
parent8aba41d951d63a09cc6c12cba7ed200ea4396544 (diff)
downloadservo-9b79b76fe5d5568899ba6a7a5c65ceaced319036.tar.gz
servo-9b79b76fe5d5568899ba6a7a5c65ceaced319036.zip
let mutation testing display diff if compilation fails
Diffstat (limited to 'python/servo/mutation/test.py')
-rw-r--r--python/servo/mutation/test.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/servo/mutation/test.py b/python/servo/mutation/test.py
index d209328ac22..6fc77f0c586 100644
--- a/python/servo/mutation/test.py
+++ b/python/servo/mutation/test.py
@@ -42,8 +42,11 @@ def mutation_test(file_name, tests):
if mutated_line != -1:
logging.info("Mutated {0} at line {1}".format(file_name, mutated_line))
logging.info("compiling mutant {0}:{1}".format(file_name, mutated_line))
- if subprocess.call('python mach build --release', shell=True, stdout=DEVNULL):
+ test_command = "python mach build --release"
+ if subprocess.call(test_command, shell=True, stdout=DEVNULL):
logging.error("Compilation Failed: Unexpected error")
+ logging.error("Failed: while running `{0}`".format(test_command))
+ subprocess.call('git --no-pager diff {0}'.format(file_name), shell=True)
status = Status.UNEXPECTED
else:
for test in tests: