potiuk commented on a change in pull request #19737: URL: https://github.com/apache/airflow/pull/19737#discussion_r754960593
########## File path: scripts/ci/images/ci_run_docker_tests.py ########## @@ -0,0 +1,98 @@ +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +import argparse +import shlex +import subprocess +import sys +from pathlib import Path +from typing import List + +AIRFLOW_SOURCE = Path(__file__).resolve().parents[3] +BUILD_CACHE_DIR = AIRFLOW_SOURCE / ".build" + + +def get_parser(): + parser = argparse.ArgumentParser( + prog="ci_run_docker_tests", + description="Running Docker tests using pytest", + epilog="Unknown arguments are passed unchanged to Pytest.", + ) + parser.add_argument( + "--interactive", + "-i", + action='store_true', + help="Activates virtual environment ready to run tests and drops you in", + ) + parser.add_argument("--initialize", action="store_true", help="Initialize virtual environment and exit") + parser.add_argument("pytestopts", nargs=argparse.REMAINDER, help="Tests to run") + return parser + + +def run_verbose(cmd: List[str], **kwargs): + print(f"$ {' '.join(shlex.quote(c) for c in cmd)}") Review comment: Let's add a term color here (blue?) - this will make the command stands out among other logs (better visibility in CI output). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
