From 9f4683725f78d6409d03cd0b3fb1c76259326d30 Mon Sep 17 00:00:00 2001 From: AshburnLee Date: Sat, 11 May 2024 07:57:53 +0000 Subject: [PATCH] [UT] add skiplist for PVC w/ rolling driver --- scripts/pass_rate.py | 2 +- scripts/pytest-utils.sh | 4 +++- scripts/skiplist/{default => pvc_rolling}/.gitkeep | 0 scripts/skiplist/{default => pvc_rolling}/language.txt | 0 scripts/skiplist/{default => pvc_rolling}/operators.txt | 0 scripts/skiplist/{default => pvc_rolling}/subprocess.txt | 0 6 files changed, 4 insertions(+), 2 deletions(-) rename scripts/skiplist/{default => pvc_rolling}/.gitkeep (100%) rename scripts/skiplist/{default => pvc_rolling}/language.txt (100%) rename scripts/skiplist/{default => pvc_rolling}/operators.txt (100%) rename scripts/skiplist/{default => pvc_rolling}/subprocess.txt (100%) diff --git a/scripts/pass_rate.py b/scripts/pass_rate.py index 77f1038e1e..4e89a8f336 100644 --- a/scripts/pass_rate.py +++ b/scripts/pass_rate.py @@ -42,7 +42,7 @@ def create_argument_parser() -> argparse.ArgumentParser: def get_deselected(report_path: pathlib.Path) -> int: """Calculates deselected (via skiplist) tests.""" - skiplist_dir = os.getenv('TRITON_TEST_SKIPLIST_DIR', 'scripts/skiplist/default') + skiplist_dir = os.getenv('TRITON_TEST_SKIPLIST_DIR', 'scripts/skiplist/pvc_rolling') skiplist_path = pathlib.Path(skiplist_dir) / f'{report_path.stem}.txt' if not skiplist_path.exists(): return 0 diff --git a/scripts/pytest-utils.sh b/scripts/pytest-utils.sh index 5de8f8374a..18917631b9 100644 --- a/scripts/pytest-utils.sh +++ b/scripts/pytest-utils.sh @@ -3,7 +3,8 @@ TIMESTAMP="$(date '+%Y%m%d%H%M%S')" SCRIPTS_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" TRITON_TEST_REPORTS="${TRITON_TEST_REPORTS:-false}" TRITON_TEST_REPORTS_DIR="${TRITON_TEST_REPORTS_DIR:-$HOME/reports/$TIMESTAMP}" -TRITON_TEST_SKIPLIST_DIR="${TRITON_TEST_SKIPLIST_DIR:-$SCRIPTS_DIR/skiplist/default}" +# The default platform is PVC w/ rolling +TRITON_TEST_SKIPLIST_DIR="${TRITON_TEST_SKIPLIST_DIR:-$SCRIPTS_DIR/skiplist/pvc_rolling}" TRITON_TEST_WARNING_REPORTS="${TRITON_TEST_WARNING_REPORTS:-false}" TRITON_TEST_IGNORE_ERRORS="${TRITON_TEST_IGNORE_ERRORS:-false}" @@ -34,6 +35,7 @@ pytest() { mkdir -p "$CURRENT_SKIPLIST_DIR" # skip comments in the skiplist sed -e '/^#/d' "$TRITON_TEST_SKIPLIST_DIR/$TRITON_TEST_SUITE.txt" > "$CURRENT_SKIPLIST_DIR/$TRITON_TEST_SUITE.txt" + pytest_extra_args+=( "--deselect-from-file=$CURRENT_SKIPLIST_DIR/$TRITON_TEST_SUITE.txt" "--select-fail-on-missing" diff --git a/scripts/skiplist/default/.gitkeep b/scripts/skiplist/pvc_rolling/.gitkeep similarity index 100% rename from scripts/skiplist/default/.gitkeep rename to scripts/skiplist/pvc_rolling/.gitkeep diff --git a/scripts/skiplist/default/language.txt b/scripts/skiplist/pvc_rolling/language.txt similarity index 100% rename from scripts/skiplist/default/language.txt rename to scripts/skiplist/pvc_rolling/language.txt diff --git a/scripts/skiplist/default/operators.txt b/scripts/skiplist/pvc_rolling/operators.txt similarity index 100% rename from scripts/skiplist/default/operators.txt rename to scripts/skiplist/pvc_rolling/operators.txt diff --git a/scripts/skiplist/default/subprocess.txt b/scripts/skiplist/pvc_rolling/subprocess.txt similarity index 100% rename from scripts/skiplist/default/subprocess.txt rename to scripts/skiplist/pvc_rolling/subprocess.txt