File tree Expand file tree Collapse file tree 3 files changed +38
-2
lines changed
Expand file tree Collapse file tree 3 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,16 @@ code change.
135135This can be used for CI/CD purposes since it generates report files in the ` /python/reports `
136136folder.
137137
138+ Options:\
139+ ` -h ` Print help menu.
140+ ```
141+ validatecodeonce -h
142+ ```
143+ ` -k ` Invoke Pytest option ` -k ` to run specific tests based on a substring match to the test name.
144+ ```
145+ validatecodeonce -k test_get_products
146+ ```
147+
138148### ` runtests ` (DEPRECATED)
139149
140150** DEPRECATED** : Use ` validatecodeonce ` instead
Original file line number Diff line number Diff line change @@ -52,10 +52,30 @@ validatecode() {
5252}
5353
5454validatecodeonce () {
55+ help () {
56+ echo
57+ echo " Usage: validatecodeonce [-h|k]"
58+ echo
59+ echo " Trigger a single run of code validation."
60+ echo
61+ echo " Options:"
62+ echo " h Print this help menu."
63+ echo " k Invoke Pytest option -k to run specific tests based on a substring match to the test name."
64+ echo
65+ }
66+
67+ while getopts " :h" option; do
68+ case $option in
69+ h)
70+ help
71+ exit ;;
72+ esac
73+ done
74+
5575 echo -e " \nTriggering single run of code validation."
5676
5777 loadconfig
58- ../test_suite.sh reports
78+ ../test_suite.sh $@ reports
5979}
6080
6181
Original file line number Diff line number Diff line change 33REPORTS_FOLDER=" /python/reports/"
44SECTION_PREFIX=" \n#########"
55
6+ while getopts " :k:" option; do
7+ case $option in
8+ k)
9+ SPECIFIC_TESTS=" -k ${OPTARG} "
10+ esac
11+ done
612
713reportvalidation () {
814 if [ -z " $1 " ]
2632
2733
2834echo -ne " $SECTION_PREFIX RUN TESTS:\n\n"
29- python -m pytest -vv --durations=3 --cov ./ --cov-report term-missing $PYTEST_REPORTS ; STATUS1=$?
35+ python -m pytest -vv --durations=3 --cov ./ --cov-report term-missing $PYTEST_REPORTS $SPECIFIC_TESTS ; STATUS1=$?
3036
3137echo -ne " $SECTION_PREFIX CHECK TYPING: "
3238MYPYOUT=` mypy --no-error-summary . $MYPY_REPORTS `
You can’t perform that action at this time.
0 commit comments