File tree Expand file tree Collapse file tree 2 files changed +62
-4
lines changed
Expand file tree Collapse file tree 2 files changed +62
-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,9 @@ POSITIONAL_ARGS=()
44SAMPLES=" false"
55VERBOSE=" false"
66
7+ stackDirs=' '
8+ stacksPath=' '
9+
710while [[ $# -gt 0 ]]; do
811 case $1 in
912 -s|--samples)
@@ -14,6 +17,16 @@ while [[ $# -gt 0 ]]; do
1417 VERBOSE=" true"
1518 shift # past argument
1619 ;;
20+ --stackDirs)
21+ stackDirs=$2
22+ shift # past argument
23+ shift
24+ ;;
25+ --stacksPath)
26+ stacksPath=$2
27+ shift # past argument
28+ shift
29+ ;;
1730 -* |--* )
1831 echo " Unknown option $1 "
1932 exit 1
2841set -- " ${POSITIONAL_ARGS[@]} " # restore positional parameters
2942set -x
3043
31- stacksDir=${STACKS_DIR:- stacks}
32- stackDirs=${STACKS:- " $( bash " $( pwd) /tests/get_stacks.sh" ) " }
44+ if [ -z " $stacksPath " ]; then
45+ stacksPath=${STACKS_DIR:- stacks}
46+ fi
47+
48+ if [ -z " $stackDirs " ]; then
49+ stackDirs=${STACKS:- " $( bash " $( pwd) /tests/get_stacks.sh" ) " }
50+ fi
51+
52+ stacksDir=" $stacksPath "
3353
3454# Use pwd if relative path
3555if [[ ! ${stacksDir} = /* ]]; then
You can’t perform that action at this time.
0 commit comments