Details
Description
Job wiredtiger-test-check-long started to fail recently since running on the new Jenkins machines (Ubuntu 18.04 LTS). [[ is a valid 'bash' syntax while not recognised by 'dash' - the default 'sh' on Ubuntu OS.
http://build.wiredtiger.com:8080/job/wiredtiger-test-check-long/1103/
+ chmod a+x ../../../bench/wtperf/runners/wtperf_ckpt.sh ../../../bench/wtperf/runners/wtperf_run.sh ../../../bench/wtperf/runners/wtperf_track.sh
|
+ echo 'Run truncate btree job (mongodb oplog)'
|
Run truncate btree job (mongodb oplog)
|
+ ../../../bench/wtperf/runners/wtperf_run.sh ../../../bench/wtperf/runners/mongodb-oplog.wtperf 1
|
../../../bench/wtperf/runners/wtperf_run.sh: 27: ../../../bench/wtperf/runners/wtperf_run.sh: [[: not found
|
../../../bench/wtperf/runners/wtperf_run.sh: 42: ../../../bench/wtperf/runners/wtperf_run.sh: Syntax error: "(" unexpected
|
+ cleanup
|
+ status=2
|
The code segment that had the syntax error:
while [[ $# -gt 0 ]] ; do
|
if test "$1" == "NOCREATE"; then
|
create=0
|
else
|
wtarg+=" $1"
|
fi
|
shift # Consume this arg
|
done
|
We could either fix the while loop line to be compatible with 'dash', or specify 'bash' on the shebang line.