Skip to content

Commit

Permalink
[WFLY-8309] build.sh and integration-tests.sh scripts doesn't work on…
Browse files Browse the repository at this point in the history
… Solaris 10 (Sparc)

Turns out previous fix did not solve the core issue - the bash interpreter used for testing has a bug, that cannot be workaround in a predictable fashion. To workaround the issue, the best approach is to provided a way to use an other interpreter. As the build.sh scripts has '/bin/sh' hardcoded in it, this commit provides a mechanism to override the path to the interpreter if needed.
  • Loading branch information
rpelisse committed May 21, 2017
1 parent 2201c47 commit 3867b1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
## feel free to use ./mvnw directly ##
## ##
### ====================================================================== ###
BASH_INTERPRETER=${BASH_INTERPRETER:-${SHELL}}

PROGNAME=`basename $0`
DIRNAME=`dirname "${BASH_SOURCE[0]}"`
Expand Down Expand Up @@ -149,9 +150,9 @@ main() {

# Execute in debug mode, or simply execute.
if [ "x$MVN_DEBUG" != "x" ]; then
eval /bin/sh -x $MVN $MVN_ARGS $MVN_GOAL $ADDIT_PARAMS
eval "${BASH_INTERPRETER}" -x $MVN $MVN_ARGS $MVN_GOAL $ADDIT_PARAMS
else
eval exec $MVN $MVN_ARGS $MVN_GOAL $ADDIT_PARAMS
eval exec ${BASH_INTERPRETER} $MVN $MVN_ARGS $MVN_GOAL $ADDIT_PARAMS
fi
}

Expand Down
5 changes: 3 additions & 2 deletions integration-tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

# Shell script to run the integration tests
BASH_INTERPRETER=${BASH_INTERPRETER:-${SHELL}}

PROGNAME=`basename $0`
DIRNAME=`dirname "${BASH_SOURCE[0]}"`
Expand Down Expand Up @@ -172,9 +173,9 @@ main() {

# Execute in debug mode, or simply execute.
if [ "x$MVN_DEBUG" != "x" ]; then
/bin/sh -x $MVN $MVN_ARGS $MVN_GOAL
"${BASH_INTERPRETER}" -x $MVN $MVN_ARGS $MVN_GOAL
else
exec $MVN $MVN_ARGS $MVN_GOAL
exec "${BASH_INTERPRETER}" $MVN $MVN_ARGS $MVN_GOAL
fi

cd $DIRNAME
Expand Down

0 comments on commit 3867b1a

Please sign in to comment.