From f513795c8772ec4fbb77996061f9be2e0daef8ab Mon Sep 17 00:00:00 2001 From: Trong Nhan Mai Date: Thu, 4 Jul 2024 09:45:13 +1000 Subject: [PATCH] chore: add exclude and include tag options to update command and add logging of each test case to update command Signed-off-by: Trong Nhan Mai --- tests/integration/run.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/integration/run.py b/tests/integration/run.py index 54d52ae62..7e5c42676 100644 --- a/tests/integration/run.py +++ b/tests/integration/run.py @@ -573,6 +573,8 @@ def run(self, macaron_cmd: str, interactive: bool, dry: bool) -> int: def update(self, macaron_cmd: str) -> int: """Run the test case in update mode.""" + logger.info("-" * 60) + logger.info("Case started: '%s'.", self.case_dir) for step in self.steps: if isinstance(step, CompareStep): ret = step.update_result(cwd=self.case_dir) @@ -962,6 +964,24 @@ def main(argv: Sequence[str] | None = None) -> int: help="The command to run Macaron. Note: can be path to the run_macaron.sh script.", default="macaron", ) + update_parser.add_argument( + *("-t", "--include-tag"), + help=( + "Select only test cases having the tag. " + "This can be specified multiple times, which will select only cases that have all include tags." + ), + action="append", + default=[], + ) + update_parser.add_argument( + *("-e", "--exclude-tag"), + help=( + "Select only test cases not having the tag. " + "This can be specified multiple times, which will select only cases that do not have any exclude tags." + ), + action="append", + default=[], + ) args = arg_parser.parse_args(argv) configure_logging(args.verbose)