Commit db8c4273 authored by SINDT--BARET Yanis's avatar SINDT--BARET Yanis
Browse files

[New] Change subprocess method

Use the method run instead of Poped.
parent 63404a99
......@@ -36,15 +36,20 @@ if __name__ == '__main__':
create_basic_file("basic.json",i)
for i in range(1,nb_hikes+1) :
a = subprocess.Popen(args=["../../build/bin/module_create", f"basic_{i}.json"])
a.wait()
res_a = subprocess.run(args=["../../build/bin/module_create", f"basic_{i}.json"], stdout=subprocess.DEVNULL)
change_resultjson_seed(i,result_id)
b = subprocess.Popen(args=["../../build/bin/sswm"
,f"result_{result_id}_{i}.json",
res_b = subprocess.run(args=["../../build/bin/sswm",
f"result_{result_id}_{i}.json",
str(inversion_rate),
str(nb_gen),
str(is_neutral_mut),
str(i)])
b.wait()
if res_b.returncode == 0:
print("\n --- \n Le programme s'est exécuté sans erreur")
else:
print("\n --- \n Une erreur est survenue")
print(f"\n{i}")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment