Skip to content

Commit eb68087

Browse files
committed
WL#12231 RUN AUTOTESTS WITH LATEST SCRIPT AND ATRT
Provides an extra option of running autotest tests with a version of atrt which is not build-specific. The autotest tests are currently running with build specific scripts and atrt. This worklog provides an extra option of running autotest with a different atrt binary preferrably the latest one by adding an extra option called custom_atrt to autotest-run.sh. Another option called custom-cpcc is also added to ensure that autotest tests can be run with the recent version of ndb_cpcc.
1 parent fcf74df commit eb68087

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

storage/ndb/test/run-test/autotest-run.sh

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
##############
2727

2828
save_args=$*
29-
VERSION="autotest-run.sh version 1.20"
29+
VERSION="autotest-run.sh version 1.21"
3030

3131
DATE=`date '+%Y-%m-%d'`
3232
if [ `uname -s` != "SunOS" ]
@@ -75,6 +75,8 @@ do
7575
--suite=*) RUN=`echo $1 | sed s/--suite=//`;;
7676
--suite-suffix=*) suite_suffix=`echo $1 | sed s/--suite-suffix=//`;;
7777
--run-dir=*) run_dir=`echo $1 | sed s/--run-dir=//`;;
78+
--custom-atrt=*) custom_atrt=`echo $1 | sed s/--custom-atrt=//`;;
79+
--custom-cpcc=*) custom_cpcc=`echo $1 | sed s/--custom-cpcc=//`;;
7880
--install-dir=*) install_dir=`echo $1 | sed s/--install-dir=//`;;
7981
--install-dir0=*) install_dir0=`echo $1 | sed s/--install-dir0=//`;;
8082
--install-dir1=*) install_dir1=`echo $1 | sed s/--install-dir1=//`;;
@@ -195,13 +197,30 @@ test_dir=$install_dir/mysql-test/ndb
195197
# Check if executables in $install_dir0 is executable at current
196198
# platform, they could be built for another kind of platform
197199
unset NDB_CPCC_HOSTS
198-
if ${install_dir}/bin/ndb_cpcc 2>/dev/null ; then
199-
# Use atrt and ndb_cpcc from test build
200+
201+
if [ -n "$custom_atrt" ];
202+
then
203+
echo "Using custom atrt ${custom_atrt}"
204+
atrt="${custom_atrt}"
205+
elif ${install_dir}/bin/ndb_cpcc 2>/dev/null
206+
then
207+
echo "Using atrt from test build"
200208
atrt="${test_dir}/atrt"
201-
ndb_cpcc="${install_dir}/bin/ndb_cpcc"
202209
else
203-
echo "Note: Cross platform testing, atrt and ndb_cpcc is not used from test build" >&2
210+
echo "Note: Cross platform testing, atrt used from server path" >&2
204211
atrt=`which atrt`
212+
fi
213+
214+
if [ -n "$custom_cpcc" ];
215+
then
216+
echo "Using custom ndb_cpcc ${custom_cpcc}"
217+
ndb_cpcc="${custom_cpcc}"
218+
elif ${install_dir}/bin/ndb_cpcc 2>/dev/null
219+
then
220+
echo "Using ndb_cpcc from test build"
221+
ndb_cpcc="${install_dir}/bin/ndb_cpcc"
222+
else
223+
echo "Note: Cross platform testing, ndb_cpcc used from server path" >&2
205224
ndb_cpcc=`which ndb_cpcc`
206225
fi
207226

0 commit comments

Comments
 (0)