summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/test/format/format.sh
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2019-12-19 03:46:45 +0000
committerevergreen <evergreen@mongodb.com>2019-12-19 03:46:45 +0000
commit114ee790aaed1357f1d99dee1d610c26ae12858e (patch)
tree545a23afda994a5920a62bcf9ee4dfd7d52367a7 /src/third_party/wiredtiger/test/format/format.sh
parent6adf8ad187352b0b253d4fbb282c8af9d1e89f18 (diff)
downloadmongo-114ee790aaed1357f1d99dee1d610c26ae12858e.tar.gz
Import wiredtiger: 77f9aebf23bb7fcb3911345741f20d67128f8da6 from branch mongodb-4.4
ref: 81a6cd2196..77f9aebf23 for: 4.3.3 WT-4969 Remove lsm_merge configuration option WT-5006 Migrate Jenkins “wiredtiger-test-split-stress” job to Evergreen WT-5037 Move Application Developer Resources documentation in github to WT documentation WT-5077 Handle ENOENT without failure when copying the directory WT-5139 WiredTiger incremental backup API WT-5221 Bypass test_wt2853_perf in Evergreen make-check-msan-test WT-5257 Coverity analysis bug: 113971 Dereference after null check WT-5263 Prepared updates written to the lookaside file are not always read as needed WT-5309 Update format.sh script to add prefix command argument WT-5314 Avoid loading extensions that have blank name for Python tests WT-5319 Avoid clearing the saved last-key when no instantiated key
Diffstat (limited to 'src/third_party/wiredtiger/test/format/format.sh')
-rwxr-xr-xsrc/third_party/wiredtiger/test/format/format.sh24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/third_party/wiredtiger/test/format/format.sh b/src/third_party/wiredtiger/test/format/format.sh
index 9bdc55a4d69..3a140bcfc05 100755
--- a/src/third_party/wiredtiger/test/format/format.sh
+++ b/src/third_party/wiredtiger/test/format/format.sh
@@ -18,9 +18,10 @@ trap 'onintr' 2
usage() {
echo "usage: $0 [-aFSv] [-c config] "
- echo " [-h home] [-j parallel-jobs] [-n total-jobs] [-t minutes] [format-configuration]"
+ echo " [-b format-binary] [-h home] [-j parallel-jobs] [-n total-jobs] [-t minutes] [format-configuration]"
echo
echo " -a abort/recovery testing (defaults to off)"
+ echo " -b binary format binary (defaults to "./t")"
echo " -c config format configuration file (defaults to CONFIG.stress)"
echo " -F quit on first failure (defaults to off)"
echo " -h home run directory (defaults to .)"
@@ -74,12 +75,16 @@ parallel_jobs=8
smoke_test=0
total_jobs=0
verbose=0
+format_binary="./t"
while :; do
case "$1" in
-a)
abort_test=1
shift ;;
+ -b)
+ format_binary="$2"
+ shift ; shift ;;
-c)
config="$2"
shift ; shift ;;
@@ -155,16 +160,17 @@ cd $(dirname $0) || exit 1
# local.
[[ $config_found -eq 0 ]] && [[ -f "$config" ]] && config="$PWD/$config"
-# Find the format binary. Builds are normally in the WiredTiger source tree, in which case it's
-# in the same directory as format.sh, else it's in the build_posix tree. If the build is in the
-# build_posix tree, move there, we have to run in the directory where the format binary lives
-# because the format binary "knows" the wt utility is two directory levels above it.
-format_binary="./t"
-[[ -x $format_binary ]] || {
+# Find the last part of format_binary, which is format binary file. Builds are normally in the
+# WiredTiger source tree, in which case it's in the same directory as format.sh, else it's in
+# the build_posix tree. If the build is in the build_posix tree, move there, we have to run in
+# the directory where the format binary lives because the format binary "knows" the wt utility
+# is two directory levels above it.
+
+[[ -x ${format_binary##* } ]] || {
build_posix_directory="../../build_posix/test/format"
[[ ! -d $build_posix_directory ]] || cd $build_posix_directory || exit 1
- [[ -x $format_binary ]] || {
- echo "$name: format program \"$format_binary\" not found"
+ [[ -x ${format_binary##* } ]] || {
+ echo "$name: format program \"${format_binary##* }\" not found"
exit 1
}
}