This repository was archived by the owner on Aug 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed
Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -11,24 +11,14 @@ PYTHON=${PYTHON:-"python3.7"}
1111TEMP_DIRS=()
1212
1313function run_plugin_examples() {
14+ if [ ! -d " ${SRC_ROOT} /${PLUGIN} /examples" ]; then
15+ return
16+ fi
1417 cd " ${SRC_ROOT} /${PLUGIN} /examples"
1518 if [ -f " requirements.txt" ]; then
1619 " ${PYTHON} " -m pip install -r requirements.txt
1720 fi
18- # Run example tests in top level examples directory
19- for dir in $( find . -type d) ; do
20- # Skip shouldi if we're in the root package
21- set +e
22- within_shouldi=$( echo " ${dir} " | grep " shouldi" )
23- set -e
24- if [ " x${PLUGIN} " != " x." ] && [ " x${within_shouldi} " != " x" ]; then
25- continue
26- fi
27- # Run example tests in examples subdirectories
28- cd " ${SRC_ROOT} /${PLUGIN} /examples"
29- cd " ${dir} "
30- " ${PYTHON} " -m unittest discover -v
31- done
21+ " ${PYTHON} " -m unittest discover -v
3222 cd " ${SRC_ROOT} /${PLUGIN} "
3323}
3424
@@ -53,7 +43,7 @@ function run_plugin() {
5343 # Run the tests
5444 " ${PYTHON} " setup.py test
5545 # Run examples if they exist and we aren't at the root
56- if [ -d " examples " ] && [ " x${PLUGIN} " != " x." ]; then
46+ if [ " x${PLUGIN} " != " x." ]; then
5747 run_plugin_examples
5848 fi
5949 cd " ${SRC_ROOT} "
You can’t perform that action at this time.
0 commit comments