Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

Commit 94b6d3a

Browse files
stishkinstas
andauthored
fix 60 tasks test (#164)
Co-authored-by: stas <statis@microsoft.com>
1 parent e48449b commit 94b6d3a

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

cli/samples/restler/running-60-tasks/compile-60.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"outputFolder": "RESTler-compile",
1717

1818
"toolConfiguration": {
19-
"task": "compile" }
19+
"task": "compile"
20+
}
2021
}
2122
]
2223
}

cli/samples/restler/running-60-tasks/run.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,22 @@ def run(compile, test):
1919
}
2020
compile_job_config = RaftJobConfig(file_path=compile, substitutions=substitutions)
2121

22-
compile_task = compile_job_config.config['tasks'][0]
22+
compile_task = compile_job_config.config['testtasks']['tasks'][0]
2323
#use first task as template and create 30 compile task
2424
compile_tasks = []
2525
for t in range(30):
2626
new_task = copy.deepcopy(compile_task)
2727
new_task['outputFolder'] = compile_task['outputFolder'] + f"-{t}"
28+
new_task['toolConfiguration']['compileConfiguration'] = {}
2829
new_task['toolConfiguration']['compileConfiguration']['mutationsSeed'] = random.randint(0, 1000)
2930
compile_tasks.append(new_task)
3031

31-
compile_job_config.config['tasks'] = compile_tasks
32+
compile_job_config.config['testtasks']['tasks'] = compile_tasks
3233

3334
print('Compile')
3435
# create a new job with the Compile config and get new job ID
3536
# in compile_job
37+
compile_json = json.dumps(compile_job_config.config)
3638
compile_job = cli.new_job(compile_job_config)
3739
# wait for a job with ID from compile_job to finish the run
3840
cli.poll(compile_job['jobId'])
@@ -42,8 +44,8 @@ def run(compile, test):
4244
print('Test')
4345
test_job_config = RaftJobConfig(file_path=test, substitutions=substitutions)
4446

45-
task_test_fuzz_lean = test_job_config.config['tasks'][0]
46-
task_test = test_job_config.config['tasks'][1]
47+
task_test_fuzz_lean = test_job_config.config['testtasks']['tasks'][0]
48+
task_test = test_job_config.config['testtasks']['tasks'][1]
4749
test_tasks = []
4850
for t in range(30):
4951
new_task_test = copy.deepcopy(task_test)
@@ -58,11 +60,10 @@ def run(compile, test):
5860
test_tasks.append(new_task_test)
5961
test_tasks.append(new_task_test_fuzz_lean)
6062

61-
test_job_config.config['tasks'] = test_tasks
63+
test_job_config.config['testtasks']['tasks'] = test_tasks
6264
test_job = cli.new_job(test_job_config)
6365
cli.poll(test_job['jobId'])
6466

6567
if __name__ == "__main__":
66-
host = sys.argv[1]
67-
run(os.path.join(cur_dir, "compile-60.json"),
68-
os.path.join(cur_dir, "test-60.json"))
68+
run(os.path.join(cur_dir, "compile-60.json"),
69+
os.path.join(cur_dir, "test-60.json"))

0 commit comments

Comments
 (0)