From a685f3ef89b3222eab9aa317f1ee8f1138f683ce Mon Sep 17 00:00:00 2001
From: Anders Roxell <anders.roxell@linaro.org>
Date: Fri, 1 Nov 2024 14:08:19 +0100
Subject: [PATCH 2/3] android: noninteractive-tradefed: INTERNET_ACCESS prefix
 with NO_

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 automated/android/noninteractive-tradefed/tradefed.sh   | 6 +++---
 automated/android/noninteractive-tradefed/tradefed.yaml | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/automated/android/noninteractive-tradefed/tradefed.sh b/automated/android/noninteractive-tradefed/tradefed.sh
index 410cebdc679f..fd23d3451cb7 100755
--- a/automated/android/noninteractive-tradefed/tradefed.sh
+++ b/automated/android/noninteractive-tradefed/tradefed.sh
@@ -25,7 +25,7 @@ AP_SSID=""
 AP_KEY=""
 # default to set the wifi(when required) and check the internet when not specified or set to true
 # which means it needs to specify explicitly to false to not check the internet access
-INTERNET_ACCESS="true"
+NO_INTERNET_ACCESS="false"
 
 
 usage() {
@@ -94,7 +94,7 @@ while getopts ':o:n:c:t:p:r:f:a:k:i:' opt; do
         f) FAILURES_PRINTED="${OPTARG}" ;;
         a) AP_SSID="${OPTARG}" ;;
         k) AP_KEY="${OPTARG}" ;;
-        i) INTERNET_ACCESS="${OPTARG}" ;; # if check the internet access
+        i) NO_INTERNET_ACCESS="${OPTARG}" ;; # if check the internet access
         *) usage ;;
     esac
 done
@@ -137,7 +137,7 @@ if [ -e "${TEST_PATH}/testcases/vts/testcases/kernel/linux_kselftest/kselftest_c
     sed -i "/suspend/d" "${TEST_PATH}"/testcases/vts/testcases/kernel/linux_kselftest/kselftest_config.py
 fi
 
-if [ "X${INTERNET_ACCESS}" = "Xtrue" ] || [ "${INTERNET_ACCESS}" = "XTrue" ]; then
+if [ "X${NO_INTERNET_ACCESS}" = "Xfalse" ] || [ "${NO_INTERNET_ACCESS}" = "XFalse" ]; then
     check_internet_access
 fi
 
diff --git a/automated/android/noninteractive-tradefed/tradefed.yaml b/automated/android/noninteractive-tradefed/tradefed.yaml
index 76cae77f5b36..2ec108f01bf0 100644
--- a/automated/android/noninteractive-tradefed/tradefed.yaml
+++ b/automated/android/noninteractive-tradefed/tradefed.yaml
@@ -46,9 +46,9 @@ params:
     # when we need to set the DUT to be run in the powersave governor policy
     # to avoid shutting down by high temperature when run the cts vts test
     SET_GOVERNOR_POWERSAVE: "false"
-    # By default, WiFi setup and internet access checks are enabled (INTERNET_ACCESS="true").
-    # To disable internet access checks, set INTERNET_ACCESS="false".
-    INTERNET_ACCESS: "true"
+    # By default, WiFi setup and internet access checks are enabled (NO_INTERNET_ACCESS="true").
+    # To disable internet access checks, set NO_INTERNET_ACCESS="false".
+    NO_INTERNET_ACCESS: "false"
 
 run:
     steps:
@@ -64,7 +64,7 @@ run:
         - chown testuser:testuser .
         - if echo "${TEST_REBOOT_EXPECTED}" |grep -i "true" ; then ./monitor_fastboot.sh & fi
         - ./monitor_adb.sh &
-        - sudo -u testuser ./tradefed.sh  -o "${TIMEOUT}" -c "${TEST_URL}" -t "${TEST_PARAMS}" -p "${TEST_PATH}" -r "${RESULTS_FORMAT}" -n "${ANDROID_SERIAL}" -f "${FAILURES_PRINTED}" -a "${AP_SSID}" -k "${AP_KEY}" -i "${INTERNET_ACCESS}" || if [ $? -eq 100 ]; then error_fatal "The network seems not available, as the ping command failed"; else true; fi
+        - sudo -u testuser ./tradefed.sh  -o "${TIMEOUT}" -c "${TEST_URL}" -t "${TEST_PARAMS}" -p "${TEST_PATH}" -r "${RESULTS_FORMAT}" -n "${ANDROID_SERIAL}" -f "${FAILURES_PRINTED}" -a "${AP_SSID}" -k "${AP_KEY}" -i "${NO_INTERNET_ACCESS}" || if [ $? -eq 100 ]; then error_fatal "The network seems not available, as the ping command failed"; else true; fi
         # Upload test log and result files to artifactorial.
         - cp -r ./${TEST_PATH}/results ./output/ || true
         - cp -r ./${TEST_PATH}/logs ./output/ || true
-- 
2.45.2

