23 lines
726 B
Python
23 lines
726 B
Python
|
#!/usr/bin/python3
|
||
|
|
||
|
import subprocess
|
||
|
import yaml
|
||
|
|
||
|
from benchmark_repository import BenchmarkRepository
|
||
|
|
||
|
def executeCommand(command, stdin = None, cwd = None):
|
||
|
with subprocess.Popen(command, stdout = subprocess.PIPE, stderr = subprocess.PIPE, stdin = (subprocess.PIPE if stdin != None else None), cwd = cwd) as process:
|
||
|
stdout, stderr = process.communicate(input = (stdin.encode("utf-8") if stdin != None else None))
|
||
|
exitCode = process.returncode
|
||
|
|
||
|
return stdout.decode("utf-8"), stderr.decode("utf-8"), exitCode
|
||
|
|
||
|
def main():
|
||
|
with open("config.yml", "r") as stream:
|
||
|
config = yaml.load(stream, Loader = yaml.CLoader)
|
||
|
|
||
|
benchmarkRepository = BenchmarkRepository(config["repository"])
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
main()
|