mirror of
https://github.com/servo/servo.git
synced 2025-06-15 11:54:28 +00:00
Skipping mutation test for file with local changes
This commit is contained in:
parent
ffbabf4a4c
commit
d24d6ac8ef
1 changed files with 28 additions and 24 deletions
|
@ -33,6 +33,10 @@ def mutate_random_line(file_name):
|
||||||
|
|
||||||
|
|
||||||
def mutation_test(file_name, tests):
|
def mutation_test(file_name, tests):
|
||||||
|
local_changes_present = subprocess.call('git diff --quiet {0}'.format(file_name), shell=True)
|
||||||
|
if local_changes_present == 1:
|
||||||
|
print "{0} has local changes, please commit/remove changes before running the test".format(file_name)
|
||||||
|
else:
|
||||||
mutated_line = mutate_random_line(file_name)
|
mutated_line = mutate_random_line(file_name)
|
||||||
if mutated_line != -1:
|
if mutated_line != -1:
|
||||||
print "Mutating {0} at line {1}".format(file_name, mutated_line)
|
print "Mutating {0} at line {1}".format(file_name, mutated_line)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue