Update precondition check for Host tests.

TODO: move prcondition check to base class.

Bug:68023937
Test: make vts
      vts-tradefed run vts-host -m VtsHalVibratorV1_1Host

Change-Id: I6fb3a38426ffdb8b3452aaed2ac56e4e06eb34c0
diff --git a/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest.py b/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest.py
index 07df66c..b5872ed 100644
--- a/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest.py
+++ b/automotive/vehicle/V2_0/host/VtsHalAutomotiveVehicleV2_0HostTest.py
@@ -37,7 +37,8 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
+                self, self.dut, self.dut.shell.one,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return
 
diff --git a/contexthub/V1_0/host/VtsHalContexthubV1_0HostTest.py b/contexthub/V1_0/host/VtsHalContexthubV1_0HostTest.py
index 27838cd..4f9d049 100644
--- a/contexthub/V1_0/host/VtsHalContexthubV1_0HostTest.py
+++ b/contexthub/V1_0/host/VtsHalContexthubV1_0HostTest.py
@@ -74,7 +74,8 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
+                self, self.dut, self.dut.shell.one,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return
 
diff --git a/gnss/V1_0/host/VtsHalGnssV1_0HostTest.py b/gnss/V1_0/host/VtsHalGnssV1_0HostTest.py
index cd4794a..c443b58 100644
--- a/gnss/V1_0/host/VtsHalGnssV1_0HostTest.py
+++ b/gnss/V1_0/host/VtsHalGnssV1_0HostTest.py
@@ -37,7 +37,8 @@
 
         self.dut.shell.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.default):
+                self, self.dut, self.dut.shell.default,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return
 
diff --git a/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py b/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
index 8350289..c791a54 100644
--- a/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
+++ b/nfc/V1_0/host/VtsHalNfcV1_0HostTest.py
@@ -39,7 +39,8 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
+                self, self.dut, self.dut.shell.one,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return
 
diff --git a/radio/V1_0/host/VtsHalRadioV1_0HostTest.py b/radio/V1_0/host/VtsHalRadioV1_0HostTest.py
index 2e6c540..7e2c76e 100644
--- a/radio/V1_0/host/VtsHalRadioV1_0HostTest.py
+++ b/radio/V1_0/host/VtsHalRadioV1_0HostTest.py
@@ -35,7 +35,8 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
+                self, self.dut, self.dut.shell.one,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return
 
diff --git a/sensors/V1_0/host/VtsHalSensorsV1_0HostTest.py b/sensors/V1_0/host/VtsHalSensorsV1_0HostTest.py
index d65da77..f054ac6 100644
--- a/sensors/V1_0/host/VtsHalSensorsV1_0HostTest.py
+++ b/sensors/V1_0/host/VtsHalSensorsV1_0HostTest.py
@@ -39,7 +39,8 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
+                self, self.dut, self.dut.shell.one,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return
 
diff --git a/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest.py b/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest.py
index f0eb3f7..1c9a3ba 100644
--- a/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest.py
+++ b/tv/cec/V1_0/host/VtsHalTvCecV1_0HostTest.py
@@ -38,7 +38,8 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
+                self, self.dut, self.dut.shell.one,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return
 
diff --git a/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest.py b/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest.py
index 27a86d4..609f6a4 100644
--- a/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest.py
+++ b/tv/input/V1_0/host/VtsHalTvInputV1_0HostTest.py
@@ -36,7 +36,8 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
+                self, self.dut, self.dut.shell.one,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return
 
diff --git a/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest.py b/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest.py
index 8b66418..bac691e 100644
--- a/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest.py
+++ b/vibrator/V1_0/host/VtsHalVibratorV1_0HostTest.py
@@ -35,7 +35,8 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
+                self, self.dut, self.dut.shell.one,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return
 
diff --git a/vr/V1_0/host/VtsHalVrV1_0HostTest.py b/vr/V1_0/host/VtsHalVrV1_0HostTest.py
index 747f84f..0711e8b 100644
--- a/vr/V1_0/host/VtsHalVrV1_0HostTest.py
+++ b/vr/V1_0/host/VtsHalVrV1_0HostTest.py
@@ -35,7 +35,8 @@
         self.dut.shell.InvokeTerminal("one")
         self.dut.shell.one.Execute("setenforce 0")  # SELinux permissive mode
         if not precondition_utils.CanRunHidlHalTest(
-            self, self.dut, self.dut.shell.one):
+                self, self.dut, self.dut.shell.one,
+                self.run_as_compliance_test):
             self._skip_all_testcases = True
             return