summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2023-10-05 11:43:38 -0700
committerCole Faust <colefaust@google.com>2023-10-05 12:13:55 -0700
commite377194080a8417308b7ef48b7288fecb45632a9 (patch)
treebb52c0e426766dbab99e7e34510c945279ca40f7 /tests
parentfd6ea7e04e590f4794c1761327aba97da93c935f (diff)
downloadextras-e377194080a8417308b7ef48b7288fecb45632a9.tar.gz
Remove bootloadertest's contents
This makefile installs files in an unusual way that doesn't work with hermetic partition builds. I don't think this test is used, because: - It appears to be a host test that interacts with the device, given that it runs adb and fastboot. So it shouldn't need to be installled on the device. - It doesn't install the adb or fastboot libraries, so it won't run on device. - The only references to it are in instructions in google3 to run the python files directly for manual testing. However, there are also references to it in old branches, so keep the module definition around for now. Bug: 205632228 Test: Presubmits Change-Id: I187be3751b8b2683f6bd4026b2cd977e758a475c
Diffstat (limited to 'tests')
-rw-r--r--tests/bootloader/Android.mk19
-rw-r--r--tests/bootloader/bootloadertest.py9
2 files changed, 7 insertions, 21 deletions
diff --git a/tests/bootloader/Android.mk b/tests/bootloader/Android.mk
index a5421a50..c9fd611d 100644
--- a/tests/bootloader/Android.mk
+++ b/tests/bootloader/Android.mk
@@ -1,8 +1,7 @@
+# TODO: Remove this file, bootloader_unit_test is still referenced on old branches
+
LOCAL_PATH := $(call my-dir)
-# Build a module that has all of the python files as its LOCAL_PICKUP_FILES.
-# Since no action needs to be taken to compile the python source, just
-# use BUILD_PHONY_PACKAGE to give us a target to execute.
include $(CLEAR_VARS)
LOCAL_MODULE := bootloader_unit_test
@@ -11,18 +10,4 @@ LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_MODULE_TAGS := tests
-bootloader_py_files := $(call find-subdir-files, *.py)
-
-bootloader_zip_prefix := $(TARGET_OUT_DATA)/py_bootloader
-bootloader_zip_path := $(bootloader_zip_prefix)/nativetest/py_bootloader
-
-GEN := $(addprefix $(bootloader_zip_path)/, $(bootloader_py_files))
-$(GEN) : PRIVATE_PATH := $(LOCAL_PATH)
-$(GEN) : PRIVATE_CUSTOM_TOOL = cp $< $@
-$(GEN) : $(bootloader_zip_path)/% : $(LOCAL_PATH)/%
- $(transform-generated-source)
-
-LOCAL_PICKUP_FILES := $(bootloader_zip_prefix)/nativetest
-LOCAL_ADDITIONAL_DEPENDENCIES := $(GEN)
-
include $(BUILD_PHONY_PACKAGE)
diff --git a/tests/bootloader/bootloadertest.py b/tests/bootloader/bootloadertest.py
index 963e22f3..8de7ac7b 100644
--- a/tests/bootloader/bootloadertest.py
+++ b/tests/bootloader/bootloadertest.py
@@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import adb
+from __future__ import print_function
+
import argparse
import os
import unittest
@@ -85,9 +86,9 @@ class ShellTest(unittest.TestCase):
except ValueError:
self.fail("slot-count (%s) is not an integer" % val)
except subprocess.CalledProcessError:
- print "Does not appear to be an A/B device."
+ print("Does not appear to be an A/B device.")
if not slotcount:
- print "Does not appear to be an A/B device."
+ print("Does not appear to be an A/B device.")
return slotcount
def test_getvarall(self):
@@ -128,7 +129,7 @@ class ShellTest(unittest.TestCase):
self.exists_yes_no("slot-unbootable:"+slot, var_all)
self.exists_integer("slot-retry-count:"+slot, var_all)
else:
- print "This does not appear to be an A/B device."
+ print("This does not appear to be an A/B device.")
def test_getvar_nonexistent(self):
"""Tests behaviour of nonexistent variables."""