File tree Expand file tree Collapse file tree 2 files changed +60
-4
lines changed
Expand file tree Collapse file tree 2 files changed +60
-4
lines changed Original file line number Diff line number Diff line change 22set -o nounset
33set -o errexit
44
5- DEVFILES_DIR=" $( pwd) /stacks"
5+ POSITIONAL_ARGS=()
6+
7+ stackDirs=' '
8+ stacksPath=' '
9+
10+ while [[ $# -gt 0 ]]; do
11+ case $1 in
12+ --stackDirs)
13+ stackDirs=$2
14+ shift # past argument
15+ shift
16+ ;;
17+ --stacksPath)
18+ stacksPath=$2
19+ shift # past argument
20+ shift
21+ ;;
22+ -* |--* )
23+ echo " Unknown option $1 "
24+ exit 1
25+ ;;
26+ * )
27+ POSITIONAL_ARGS+=(" $1 " ) # save positional arg
28+ shift # past argument
29+ ;;
30+ esac
31+ done
32+
33+ set -- " ${POSITIONAL_ARGS[@]} " # restore positional parameters
34+
35+ if [ -z " $stackDirs " ]; then
36+ stackDirs=$( bash " $( pwd) /tests/get_stacks.sh" )
37+ fi
38+
39+ if [ -z " $stacksPath " ]; then
40+ stacksPath=" $( pwd) /stacks"
41+ fi
42+
43+ DEVFILES_DIR=" $stacksPath "
644
745# The stacks to test as a string separated by spaces
8- STACKS=$( bash " $( pwd ) /tests/get_stacks.sh " )
46+ STACKS=" $stackDirs "
947
1048# Path to the check_non_terminating go package
1149BIN_NAME=${BIN_NAME:- " flatten-parent" }
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ POSITIONAL_ARGS=()
44SAMPLES=" false"
55VERBOSE=" false"
66
7+
78while [[ $# -gt 0 ]]; do
89 case $1 in
910 -s|--samples)
@@ -14,6 +15,16 @@ while [[ $# -gt 0 ]]; do
1415 VERBOSE=" true"
1516 shift # past argument
1617 ;;
18+ --stackDirs)
19+ stackDirs=$2
20+ shift # past argument
21+ shift
22+ ;;
23+ --stacksPath)
24+ stacksPath=$2
25+ shift # past argument
26+ shift
27+ ;;
1728 -* |--* )
1829 echo " Unknown option $1 "
1930 exit 1
2839set -- " ${POSITIONAL_ARGS[@]} " # restore positional parameters
2940set -x
3041
31- stacksDir=${STACKS_DIR:- stacks}
32- stackDirs=${STACKS:- " $( bash " $( pwd) /tests/get_stacks.sh" ) " }
42+ if [ -z " $stacksPath " ]; then
43+ stacksPath=${STACKS_DIR:- stacks}
44+ fi
45+
46+ if [ -z " $stackDirs " ]; then
47+ stackDirs=${STACKS:- " $( bash " $( pwd) /tests/get_stacks.sh" ) " }
48+ fi
49+
50+ stacksDir=" $stacksPath "
3351
3452# Use pwd if relative path
3553if [[ ! ${stacksDir} = /* ]]; then
You can’t perform that action at this time.
0 commit comments