1
0
Fork 0

using own Remove command

Shutil failed on windows
This commit is contained in:
Christian Kühnel 2020-03-25 09:41:19 +00:00
parent cc3a1ffb57
commit ad685d68d5

View file

@ -23,7 +23,6 @@ import csv
import datetime import datetime
import os import os
import platform import platform
import shutil
import subprocess import subprocess
import sys import sys
from typing import Optional, Dict, List from typing import Optional, Dict, List
@ -76,13 +75,13 @@ def run_benchmark(commit: str, name: str, result_file_path: str, workdir: str, p
"""Tun the benchmark, write the results to a file.""" """Tun the benchmark, write the results to a file."""
print('Usingn workdir {}'.format(workdir)) print('Usingn workdir {}'.format(workdir))
print('Using scripts from {}'.format(pmt_root_path)) print('Using scripts from {}'.format(pmt_root_path))
if os.path.exists(workdir):
shutil.rmtree(workdir)
os.makedirs(workdir)
cmd_parameters = { cmd_parameters = {
'pmt_root_path': pmt_root_path, 'pmt_root_path': pmt_root_path,
'commit': commit, 'commit': commit,
} }
if os.path.exists(workdir):
run_cmd(Remove(workdir), cmd_parameters, '.')
os.makedirs(workdir)
for command in COMMANDS: for command in COMMANDS:
run_cmd(command, cmd_parameters, workdir) run_cmd(command, cmd_parameters, workdir)
write_results(COMMANDS, result_file_path, name) write_results(COMMANDS, result_file_path, name)