The hardcoded "gawk" seems like a bad idea.
Signed-off-by: Karel Zak <kzak@redhat.com>
TOPDIR=@top_srcdir@
TS_TOPDIR=$TOPDIR/tests
+AWK=@AWK@
+
# Misc settings
TS_TESTUSER=${TS_TESTUSER:-"test"}
function ts_has_option {
NAME="$1"
ALL="$2"
- echo -n $ALL | sed 's/ //g' | gawk 'BEGIN { FS="="; RS="--" } /('$NAME'$|'$NAME'=)/ { print "yes" }'
+ echo -n $ALL | sed 's/ //g' | $AWK 'BEGIN { FS="="; RS="--" } /('$NAME'$|'$NAME'=)/ { print "yes" }'
}
function ts_init {
dd if=/dev/zero of="$IMAGE" bs=1M count=5 &> /dev/null
$TS_CMD_LOSETUP -f "$IMAGE" 2>&1 >> $TS_OUTPUT
- DEV=$( $TS_CMD_LOSETUP -a | gawk 'BEGIN {FS=":"} /'$IMAGE_RE'/ { print $1 }' )
+ DEV=$( $TS_CMD_LOSETUP -a | $AWK 'BEGIN {FS=":"} /'$IMAGE_RE'/ { print $1 }' )
if [ -z "$DEV" ]; then
ts_device_deinit $DEV
# data from the ipcs command
IPCS_CMD=(
- "$TS_CMD_IPCS -m -l | gawk '/max number of segments/ { print \$6 }'"
- "$TS_CMD_IPCS -m -l | gawk '/max total shared memory/ { print \$7 }'"
- "$TS_CMD_IPCS -m -l | gawk '/max seg size/ { print \$6 }'"
+ "$TS_CMD_IPCS -m -l | $AWK '/max number of segments/ { print \$6 }'"
+ "$TS_CMD_IPCS -m -l | $AWK '/max total shared memory/ { print \$7 }'"
+ "$TS_CMD_IPCS -m -l | $AWK '/max seg size/ { print \$6 }'"
)