Skip to content

Commit

Permalink
Issue #295: add -W option to upgradeStone that enables TOPAZWAITFORDE…
Browse files Browse the repository at this point in the history
…BUG during upgrade to allow remote debugging with DEBUGGEM ... add hooks into tests for this option (env var TOPAZWAITFORDEBUG) for use when running tests interactively
  • Loading branch information
dalehenrich committed Oct 21, 2020
1 parent b172e6b commit f07c9fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions bin/upgradeStone
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ start_banner
usage() {
cat <<HELP
usage: $0 [-c] [-f] [-u] [-s <source-stone-extent-file-path>] [-l <post-load-tode-script>]
[-m <tempObjCacheSize>] [-U <gemstone-user-id>] [-P <gemstone-password>]
[-m <tempObjCacheSize>] [-U <gemstone-user-id>] [-P <gemstone-password>] [-W]
<source-stone-name> <target-stone-name> <gemstone-version>
OPTIONS
Expand Down Expand Up @@ -42,6 +42,8 @@ OPTIONS
-P <gemstone-password>
Use <gemstone-password> as the password for the user specified in -U option. Default
password is swordfish. If -U not specified the -P option has no effect.
-W
enable TOPAZWAITFORDEBUG, to allow remote debugging via DEBUGGEM (3.6.x upgrades only)
EXAMPLES
$(basename $0) -h
Expand Down Expand Up @@ -72,7 +74,8 @@ hasSnapshotFile="false"
tempObjCacheSize="100000"
gemstoneUserId="DataCurator"
gemstonePassword="swordfish"
while getopts "cfhl:s:um:U:P:" OPT ; do
topazWaitForDebug=""
while getopts "cfhl:s:um:U:P:W" OPT ; do
case "$OPT" in
h) usage; exit 0;;
c) runUpgrade="false";;
Expand All @@ -86,6 +89,7 @@ while getopts "cfhl:s:um:U:P:" OPT ; do
u) createStone="false";;
U) gemstoneUserId="${OPTARG}";;
P) gemstonePassword="${OPTARG}";;
W) topazWaitForDebug=" -W ";;
*) usage; exit_1_banner "Uknown option";;
esac
done
Expand Down Expand Up @@ -228,9 +232,13 @@ EOF
echo "Seaside Upgrade completed. No errors detected."
;;
3.5.*|3.6.*)
case "$gsvers" in
3.5.*) remoteDebugFlag="";; # remote debugging flag is not available in 3.5.x
*) remoteDebugFlag="$topazWaitForDebug" ;;
esac
set +e
upgradeScript=$GEMSTONE/upgrade/createGsDevKit_upgrade.topaz
"$GEMSTONE/seaside/bin/upgradeSeasideImage" -c $tempObjCacheSize -s $targetStoneName -u $gemstoneUserId -p $gemstonePassword -P $upgradeScript >> $upgradeLogDir/topaz.out 2>&1 << EOF
"$GEMSTONE/seaside/bin/upgradeSeasideImage" -c $tempObjCacheSize -s $targetStoneName -u $gemstoneUserId -p $gemstonePassword -P $upgradeScript $remoteDebugFlag >> $upgradeLogDir/topaz.out 2>&1 << EOF
EOF
status=$?
Expand Down
2 changes: 1 addition & 1 deletion tests/testTravisCI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ case $TEST in
createStone $opt ${STONENAME1}_${UPGRADE_FROM} ${UPGRADE_FROM}
upgradeStoneName="${STONENAME1}_${GS_VERSION}"
set +e
upgradeStone -f ${STONENAME1}_${UPGRADE_FROM} ${STONENAME1}_${GS_VERSION} $GS_VERSION << EOF
upgradeStone -f ${TOPAZWAITFORDEBUG} ${STONENAME1}_${UPGRADE_FROM} ${STONENAME1}_${GS_VERSION} $GS_VERSION << EOF
EOF
status=$?
Expand Down

0 comments on commit f07c9fd

Please sign in to comment.