summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej enczykowski <maze@google.com>2019-03-24 20:28:29 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-03-24 20:28:29 -0700
commit9a9bdc5af9acbfbe333bb3c6d95d36501339fd79 (patch)
treebeb3e474dafa0d02b91bf063bba2915611c8567e
parente62bd37f3665fa78475774cbac69bfa265b81c51 (diff)
parent9dc5d59b92303b64562e10cc44ade4186cf28033 (diff)
downloadtests-9a9bdc5af9acbfbe333bb3c6d95d36501339fd79.tar.gz
net-test: rootfs/net_test.sh - minor stylistic fixes am: 789dcf76b6 am: 3037c36ff8
am: 9dc5d59b92 Change-Id: Id68aafabd39d54ab319af992b726a716f4a9b8d6
-rwxr-xr-xnet/test/rootfs/net_test.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/test/rootfs/net_test.sh b/net/test/rootfs/net_test.sh
index b4f1f4d..34f4a01 100755
--- a/net/test/rootfs/net_test.sh
+++ b/net/test/rootfs/net_test.sh
@@ -25,13 +25,13 @@ mount -t tmpfs tmpfs /run
# If this system was booted under UML, it will always have a /proc/exitcode
# file. If it was booted natively or under QEMU, it will not have this file.
-if [ -e /proc/exitcode ]; then
+if [[ -e /proc/exitcode ]]; then
mount -t hostfs hostfs /host
else
mount -t 9p -o trans=virtio,version=9p2000.L host /host
fi
-test=$(cat /proc/cmdline | sed -re 's/.*net_test=([^ ]*).*/\1/g')
-cd $(dirname $test)
+test="$(sed -r 's/.*net_test=([^ ]*).*/\1/g' < /proc/cmdline)"
+cd "$(dirname "${test}")"
./net_test.sh
poweroff -f