fix argument name
This commit is contained in:
parent
2764bcfe3a
commit
f6cceffa33
@ -32,26 +32,32 @@ def main():
|
|||||||
print "is provided, defaults to last test defined."
|
print "is provided, defaults to last test defined."
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Intelligently reduce test case")
|
parser = argparse.ArgumentParser(description="Intelligently reduce test case")
|
||||||
if parser:
|
|
||||||
pass
|
|
||||||
|
|
||||||
args = sys.argv
|
|
||||||
|
|
||||||
try:
|
parser.add_argument(
|
||||||
which = args.index("--which")
|
"binary", type=str, help="Path to the test binary to run.")
|
||||||
whichTest = args[which+1]
|
|
||||||
args = args[:which] + args[which + 2:]
|
|
||||||
except:
|
|
||||||
whichTest = None
|
|
||||||
|
|
||||||
deepstate = args[1]
|
parser.add_argument(
|
||||||
test = args[2]
|
"input_test", type=str, help="Path to test to reduce.")
|
||||||
out = args[3]
|
|
||||||
if len(args) > 4:
|
parser.add_argument(
|
||||||
checkString = args[4]
|
"output_test", type=str, help="Path for reduced test.")
|
||||||
else:
|
|
||||||
checkString = None
|
parser.add_argument(
|
||||||
|
"--which_test", type=str, help="Which test run run.", default=None)
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
"--criteria", type=str, help="String to search for in valid reduction outputs.",
|
||||||
|
default=None)
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
deepstate = args.binary
|
||||||
|
test = args.input_test
|
||||||
|
out = args.output_test
|
||||||
|
checkString = args.criteria
|
||||||
|
whichTest = args.which_test
|
||||||
|
|
||||||
def runCandidate(candidate):
|
def runCandidate(candidate):
|
||||||
with open(".reducer.out", 'w') as outf:
|
with open(".reducer.out", 'w') as outf:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user