summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej enczykowski <maze@google.com>2019-03-24 20:20:56 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-03-24 20:20:56 -0700
commit3037c36ff89c336bce890dd39d41cc8f22f92862 (patch)
treebeb3e474dafa0d02b91bf063bba2915611c8567e
parent495e005433fab16af0983d4a23f6d1ecebe38ab5 (diff)
parent789dcf76b65405714d3b6e306d75edf59348ad6d (diff)
downloadtests-3037c36ff89c336bce890dd39d41cc8f22f92862.tar.gz
net-test: rootfs/net_test.sh - minor stylistic fixes
am: 789dcf76b6 Change-Id: I914180168703df919411ba30c86e694de57afa2b
-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