GitLab will be upgraded to the 12.10.14-ce.0 on 28 Sept 2020 at 2.00pm (AEDT) to 2.30pm (AEDT). During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to us at N110 (b) CSIT building.

Commit 18413d4f authored by Zixian Cai's avatar Zixian Cai

Support running multiple config files

parent bb5dc64c
......@@ -16,6 +16,7 @@
import logging
import click
import json
import sys
from mubench.frontend.utils import go_through_pipelines, platform_info
from mubench.models.revision import LocalRevision
......@@ -25,7 +26,7 @@ logger = logging.getLogger(__name__)
@click.command()
@click.argument('file', type=click.Path(exists=True))
@click.argument('file', nargs=-1, type=click.Path(exists=True))
@click.option("--pipeline", default="box,bar",
help="Combination of [{}], separated by comma".format(
",".join(pipelines.keys())
......@@ -38,6 +39,9 @@ logger = logging.getLogger(__name__)
@click.option("--dump", default=None,
help="Dump log file to path")
def local(file, pipeline, skip_compile, dump):
if len(file) == 0:
logger.fatal("Too few files")
sys.exit(1)
logger.info("Constructing a LocalRevision")
revision = LocalRevision(file)
logger.info("Running tasks specified in file")
......
......@@ -301,6 +301,9 @@ def load_yaml(yaml_s, run_dir):
return tasksets
def load_file(config_file):
with open(config_file) as fp:
return load_yaml(fp.read(), Path(config_file).parent)
def load_file(config_files):
tasksets = []
for config_file in config_files:
with open(config_file) as fp:
tasksets.extend(load_yaml(fp.read(), Path(config_file).parent))
return tasksets
Markdown is supported
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