Skip to content

Commit 00a2baf

Browse files
committed
Code review updates.
1 parent d2acd04 commit 00a2baf

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

hammerdb/hammerdb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ curdir=`pwd`
2727
if [[ $0 == "./"* ]]; then
2828
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
2929
if [[ $chars == 1 ]]; then
30-
run_dir=`pwd`
30+
RUN_DIR=`pwd`
3131
else
32-
run_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-`
33-
run_dir="${curdir}${run_dir}"
32+
RUN_DIR=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-`
33+
RUN_DIR="${curdir}${RUN_DIR}"
3434
fi
3535
else
3636
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
37-
run_dir=`echo $0 | cut -d'/' -f 1-${chars}`
37+
RUN_DIR=`echo $0 | cut -d'/' -f 1-${chars}`
3838
fi
39-
39+
export RUN_DIR
4040

4141
if [ ! -f "/tmp/hammerdb.out" ]; then
4242
command="${0} $@"
@@ -274,9 +274,9 @@ if [[ $test == "none" ]]; then
274274
usage $0
275275
fi
276276

277-
${TOOLS_BIN}/package_tool --wrapper_config ${run_dir}/hammerdb_${test}.json --no_packages $to_no_pkg_install
277+
${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb.json --no_packages $to_no_pkg_install
278278
if [[ $? -ne 0 ]]; then
279-
echo Packaging installed failed.
279+
echo Package installation using ${TOOLS_BIN}/package_tool was unsuccessful.
280280
exit 1
281281
fi
282282

@@ -298,7 +298,7 @@ if [[ $to_use_pcp -eq 1 ]]; then
298298
pcp="-p ${pdir}"
299299
cpdir="--copy_dir $pdir"
300300
fi
301-
cd $run_dir
301+
cd $RUN_DIR
302302
echo ./run_hammerdb -m /perf1 -t ${test} ${users_to_run} ${warehouses} ${log_mount} -T ${TOOLS_BIN} $pcp > run_this
303303
chmod 755 run_this
304304
./run_this

hammerdb/install-script

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,18 @@ install_mssql()
7979
./update_temp_mnt.sh -m ${mountpoint} > upd_tmp.out 2>&1
8080
}
8181

82+
install_packages()
83+
{
84+
${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/${1} --no_packages $to_no_pkg_install
85+
if [[ $? -ne 0 ]]; then
86+
echo Package installation of ${1}, using ${TOOLS_BIN}/package_tool was unsuccessful.
87+
exit 1
88+
fi
89+
}
90+
8291
install_mariadb()
8392
{
84-
${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb_mariadb.json --no_packages $to_no_pkg_install
93+
install_packages hammerdb_mariadb.json
8594
#
8695
# Configure things in and mount the appropriate item.
8796
#
@@ -139,7 +148,7 @@ install_postgres()
139148
#
140149
# Installing Postgres Server and tools
141150
#
142-
${TOOLS_BIN}/package_tool --wrapper_config ${RUN_DIR}/hammerdb_postgres.json --no_packages $to_no_pkg_install
151+
install_packages hammerdb_postgres.json
143152

144153
cd /usr/local/HammerDB
145154
cp -R /tmp/hammerdb-tpcc/postgres/* .

0 commit comments

Comments
 (0)