From 33386624e01e460de7c69ca91e05a8c237f653d4 Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Fri, 7 Jul 2017 18:48:43 +0000 Subject: run-test-prepare: fix device environment overrides Machines can override the default environment settings in their hwtest.short.environment files. However, the grep/sed procesing done does not ignore lines that are commented out, causing an extra '#' to be part of the variable name. To fix, ensure the grep for the variable name matches the beginning of the line, so commented lines will be ignored. Change-Id: Ibf4281c3126c95670346bee74043d670e6d58654 Signed-off-by: Kevin Hilman --- jjb/common/include-agl-run-test-prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jjb/common/include-agl-run-test-prepare.sh') diff --git a/jjb/common/include-agl-run-test-prepare.sh b/jjb/common/include-agl-run-test-prepare.sh index 06a833c4..b861a360 100644 --- a/jjb/common/include-agl-run-test-prepare.sh +++ b/jjb/common/include-agl-run-test-prepare.sh @@ -63,7 +63,7 @@ export DEVICE_URL_PREFIX='https://download.automotivelinux.org/AGL/upload/ci/' # import device defaults. Format 'a=b' for i in DEVICE_TYPE DEVICE_NAME DEVICE_DTB DEVICE_KERNEL DEVICE_INITRAMFS DEVICE_NBDROOT DEVICE_NBDROOT_COMPRESSION DEVICE_BOOT_METHOD DEVICE_BOOT_TYPE DEVICE_URL_PREFIX; do - if grep -q $i $ENVFILE ; then + if grep -q ^$i $ENVFILE ; then X=$(grep $i $ENVFILE | sed -e "s#${i}=##g" -e "s#;.*##g") eval export ${i}=${X} fi -- cgit 1.2.3-korg