Skip to content

Commit

Permalink
let mutation testing display diff if compilation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
tigercosmos committed Dec 17, 2017
1 parent 8aba41d commit 9b79b76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/servo/mutation/test.py
Expand Up @@ -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:
Expand Down

0 comments on commit 9b79b76

Please sign in to comment.