summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2007-07-20 15:08:54 +0200
committerKarel Zak <kzak@redhat.com>2007-07-23 15:07:13 +0200
commita2c6354ff7c2f8787d6a3b55631eda661b310026 (patch)
tree6e7264de4e45ab608f4a2a6f73d1619d2f46bf7b /tests
parent93a024e4dbfa3dce2d6392c01dff151b2cefb765 (diff)
downloadutil-linux-old-a2c6354ff7c2f8787d6a3b55631eda661b310026.tar.gz
tests: use $AWK based on configure results
The hardcoded "gawk" seems like a bad idea. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/commands.sh.in2
-rw-r--r--tests/functions.sh4
-rw-r--r--tests/ts-ipcs.sh6
3 files changed, 7 insertions, 5 deletions
diff --git a/tests/commands.sh.in b/tests/commands.sh.in
index f8128bb8..a9572e06 100644
--- a/tests/commands.sh.in
+++ b/tests/commands.sh.in
@@ -1,6 +1,8 @@
TOPDIR=@top_srcdir@
TS_TOPDIR=$TOPDIR/tests
+AWK=@AWK@
+
# Misc settings
TS_TESTUSER=${TS_TESTUSER:-"test"}
diff --git a/tests/functions.sh b/tests/functions.sh
index 3b10e1af..fffd7946 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -60,7 +60,7 @@ function ts_log {
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 {
@@ -167,7 +167,7 @@ function ts_device_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
diff --git a/tests/ts-ipcs.sh b/tests/ts-ipcs.sh
index 09790a4e..ff35e75e 100644
--- a/tests/ts-ipcs.sh
+++ b/tests/ts-ipcs.sh
@@ -38,9 +38,9 @@ IPCS_KERNEL_CMD=(
# 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 }'"
)