Loading system/gd/Android.mk +12 −3 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ bluetooth_cert_test_file_list := \ security/cert/simple_security_test.py \ shim/cert/stack_test.py bluetooth_cert_test_file_list := $(addprefix $(LOCAL_PATH)/,$(bluetooth_cert_test_file_list)) bluetooth_cert_test_file_list += \ Loading @@ -36,12 +35,22 @@ bluetooth_cert_test_file_list += \ $(TARGET_OUT_SHARED_LIBRARIES)/libgrpc++_unsecure.so \ $(HOST_OUT_NATIVE_TESTS)/root-canal/root-canal bluetooth_cert_env_provider_path := \ $(call intermediates-dir-for,PACKAGING,bluetooth_cert_test_package,HOST)/packages/modules/Bluetooth/system/gd/cert/environment_provider.py $(bluetooth_cert_env_provider_path): @mkdir -p $(dir $@) $(hide) echo "PRODUCT_DEVICE = \"$(PRODUCT_DEVICE)\"" > $@ bluetooth_cert_zip_path := \ $(call intermediates-dir-for,PACKAGING,bluetooth_cert_test_package,HOST)/bluetooth_cert_test.zip $(bluetooth_cert_zip_path): PRIVATE_BLUETOOTH_CERT_TEST_FILE_LIST := $(bluetooth_cert_test_file_list) $(bluetooth_cert_zip_path) : $(SOONG_ZIP) $(bluetooth_cert_test_file_list) $(hide) $(SOONG_ZIP) -d -o $@ $(addprefix -f ,$(PRIVATE_BLUETOOTH_CERT_TEST_FILE_LIST)) $(bluetooth_cert_zip_path): PRIVATE_BLUETOOTH_CERT_ENV_PROVIDER_PATH := $(bluetooth_cert_env_provider_path) $(bluetooth_cert_zip_path) : $(SOONG_ZIP) $(bluetooth_cert_env_provider_path) $(bluetooth_cert_test_file_list) $(hide) $(SOONG_ZIP) -d -o $@ $(addprefix -f ,$(PRIVATE_BLUETOOTH_CERT_TEST_FILE_LIST)) \ -C $(call intermediates-dir-for,PACKAGING,bluetooth_cert_test_package,HOST) -f $(PRIVATE_BLUETOOTH_CERT_ENV_PROVIDER_PATH) $(call dist-for-goals,bluetooth_stack_with_facade,$(bluetooth_cert_zip_path):bluetooth_cert_test.zip) system/gd/cert/gd_base_test_facade_only.py +4 −5 Original line number Diff line number Diff line Loading @@ -23,8 +23,6 @@ import os import signal import subprocess ANDROID_BUILD_TOP = os.environ.get('ANDROID_BUILD_TOP') class GdFacadeOnlyBaseTestClass(BaseTestClass): Loading @@ -42,8 +40,9 @@ class GdFacadeOnlyBaseTestClass(BaseTestClass): self.rootcanal_logs = open(rootcanal_logpath, 'w') rootcanal_config = self.controller_configs['rootcanal'] rootcanal_hci_port = str(rootcanal_config.get("hci_port", "6402")) android_host_out = os.environ.get('ANDROID_HOST_OUT') rootcanal = android_host_out + "/nativetest64/root-canal/root-canal" rootcanal = os.path.join( os.getcwd(), "out/host/linux-x86/nativetest64/root-canal/root-canal") self.rootcanal_process = subprocess.Popen( [ rootcanal, Loading @@ -51,7 +50,7 @@ class GdFacadeOnlyBaseTestClass(BaseTestClass): rootcanal_hci_port, str(rootcanal_config.get("link_layer_port", "6403")) ], cwd=ANDROID_BUILD_TOP, cwd=os.getcwd(), env=os.environ.copy(), stdout=self.rootcanal_logs, stderr=self.rootcanal_logs) Loading system/gd/cert/gd_device_base.py +9 −5 Original line number Diff line number Diff line Loading @@ -28,9 +28,12 @@ from acts.controllers.adb import AdbProxy import grpc ANDROID_BUILD_TOP = os.environ.get('ANDROID_BUILD_TOP') ANDROID_HOST_OUT = os.environ.get('ANDROID_HOST_OUT') ANDROID_PRODUCT_OUT = os.environ.get('ANDROID_PRODUCT_OUT') from cert.environment_provider import PRODUCT_DEVICE ANDROID_PRODUCT_OUT = os.path.join( os.getcwd(), "out/dist/bluetooth_cert_test/out/target/product", PRODUCT_DEVICE) WAIT_CHANNEL_READY_TIMEOUT = 10 Loading @@ -43,7 +46,8 @@ def replace_vars(string, config): rootcanal_port = "" if serial_number == "DUT" or serial_number == "CERT": raise Exception("Did you forget to configure the serial number?") return string.replace("$ANDROID_HOST_OUT", ANDROID_HOST_OUT) \ android_host_out = os.path.join(os.getcwd(), "out/host/linux-x86") return string.replace("$ANDROID_HOST_OUT", android_host_out) \ .replace("$(grpc_port)", config.get("grpc_port")) \ .replace("$(grpc_root_server_port)", config.get("grpc_root_server_port")) \ .replace("$(rootcanal_port)", rootcanal_port) \ Loading Loading @@ -103,7 +107,7 @@ class GdDeviceBase: self.backing_process = subprocess.Popen( cmd, cwd=ANDROID_BUILD_TOP, cwd=os.getcwd(), env=os.environ.copy(), stdout=self.backing_process_logs, stderr=self.backing_process_logs) Loading system/gd/cert/python3.8-gd +3 −1 Original line number Diff line number Diff line #! /bin/bash PYTHONPATH=$PYTHONPATH:$ANDROID_BUILD_TOP/out/host/linux-x86/lib64:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py/packages/modules/Bluetooth/system/gd python3.8 "$@" PYTHONPATH=$ANDROID_BUILD_TOP/out/host/linux-x86/lib64:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py/packages/modules/Bluetooth/system/gd:$PYTHONPATH \ PATH=$ANDROID_HOST_OUT/nativetest64/root-canal:$ANDROID_HOST_OUT/nativetest64/bin:$PATH \ python3.8 "$@" system/gd/cert/run +8 −1 Original line number Diff line number Diff line Loading @@ -37,8 +37,15 @@ set -- "${POSITIONAL[@]}" # restore positional parameters unzip -o -q $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py.zip \ -d $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py PYTHONPATH=$PYTHONPATH:$ANDROID_BUILD_TOP/out/host/linux-x86/lib64:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py/packages/modules/Bluetooth/system/gd \ unzip -o -q $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test.zip \ -d $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test pushd . cd $ANDROID_BUILD_TOP PYTHONPATH=$ANDROID_BUILD_TOP/out/host/linux-x86/lib64:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py/packages/modules/Bluetooth/system/gd:$PYTHONPATH \ PATH=$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test/out/host/linux-x86/nativetest64/root-canal:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test/out/host/linux-x86/bin:$PATH \ python3.8 `which act.py`\ -c $TEST_CONFIG \ $TEST_FILTER \ -tp $ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd popd No newline at end of file Loading
system/gd/Android.mk +12 −3 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ bluetooth_cert_test_file_list := \ security/cert/simple_security_test.py \ shim/cert/stack_test.py bluetooth_cert_test_file_list := $(addprefix $(LOCAL_PATH)/,$(bluetooth_cert_test_file_list)) bluetooth_cert_test_file_list += \ Loading @@ -36,12 +35,22 @@ bluetooth_cert_test_file_list += \ $(TARGET_OUT_SHARED_LIBRARIES)/libgrpc++_unsecure.so \ $(HOST_OUT_NATIVE_TESTS)/root-canal/root-canal bluetooth_cert_env_provider_path := \ $(call intermediates-dir-for,PACKAGING,bluetooth_cert_test_package,HOST)/packages/modules/Bluetooth/system/gd/cert/environment_provider.py $(bluetooth_cert_env_provider_path): @mkdir -p $(dir $@) $(hide) echo "PRODUCT_DEVICE = \"$(PRODUCT_DEVICE)\"" > $@ bluetooth_cert_zip_path := \ $(call intermediates-dir-for,PACKAGING,bluetooth_cert_test_package,HOST)/bluetooth_cert_test.zip $(bluetooth_cert_zip_path): PRIVATE_BLUETOOTH_CERT_TEST_FILE_LIST := $(bluetooth_cert_test_file_list) $(bluetooth_cert_zip_path) : $(SOONG_ZIP) $(bluetooth_cert_test_file_list) $(hide) $(SOONG_ZIP) -d -o $@ $(addprefix -f ,$(PRIVATE_BLUETOOTH_CERT_TEST_FILE_LIST)) $(bluetooth_cert_zip_path): PRIVATE_BLUETOOTH_CERT_ENV_PROVIDER_PATH := $(bluetooth_cert_env_provider_path) $(bluetooth_cert_zip_path) : $(SOONG_ZIP) $(bluetooth_cert_env_provider_path) $(bluetooth_cert_test_file_list) $(hide) $(SOONG_ZIP) -d -o $@ $(addprefix -f ,$(PRIVATE_BLUETOOTH_CERT_TEST_FILE_LIST)) \ -C $(call intermediates-dir-for,PACKAGING,bluetooth_cert_test_package,HOST) -f $(PRIVATE_BLUETOOTH_CERT_ENV_PROVIDER_PATH) $(call dist-for-goals,bluetooth_stack_with_facade,$(bluetooth_cert_zip_path):bluetooth_cert_test.zip)
system/gd/cert/gd_base_test_facade_only.py +4 −5 Original line number Diff line number Diff line Loading @@ -23,8 +23,6 @@ import os import signal import subprocess ANDROID_BUILD_TOP = os.environ.get('ANDROID_BUILD_TOP') class GdFacadeOnlyBaseTestClass(BaseTestClass): Loading @@ -42,8 +40,9 @@ class GdFacadeOnlyBaseTestClass(BaseTestClass): self.rootcanal_logs = open(rootcanal_logpath, 'w') rootcanal_config = self.controller_configs['rootcanal'] rootcanal_hci_port = str(rootcanal_config.get("hci_port", "6402")) android_host_out = os.environ.get('ANDROID_HOST_OUT') rootcanal = android_host_out + "/nativetest64/root-canal/root-canal" rootcanal = os.path.join( os.getcwd(), "out/host/linux-x86/nativetest64/root-canal/root-canal") self.rootcanal_process = subprocess.Popen( [ rootcanal, Loading @@ -51,7 +50,7 @@ class GdFacadeOnlyBaseTestClass(BaseTestClass): rootcanal_hci_port, str(rootcanal_config.get("link_layer_port", "6403")) ], cwd=ANDROID_BUILD_TOP, cwd=os.getcwd(), env=os.environ.copy(), stdout=self.rootcanal_logs, stderr=self.rootcanal_logs) Loading
system/gd/cert/gd_device_base.py +9 −5 Original line number Diff line number Diff line Loading @@ -28,9 +28,12 @@ from acts.controllers.adb import AdbProxy import grpc ANDROID_BUILD_TOP = os.environ.get('ANDROID_BUILD_TOP') ANDROID_HOST_OUT = os.environ.get('ANDROID_HOST_OUT') ANDROID_PRODUCT_OUT = os.environ.get('ANDROID_PRODUCT_OUT') from cert.environment_provider import PRODUCT_DEVICE ANDROID_PRODUCT_OUT = os.path.join( os.getcwd(), "out/dist/bluetooth_cert_test/out/target/product", PRODUCT_DEVICE) WAIT_CHANNEL_READY_TIMEOUT = 10 Loading @@ -43,7 +46,8 @@ def replace_vars(string, config): rootcanal_port = "" if serial_number == "DUT" or serial_number == "CERT": raise Exception("Did you forget to configure the serial number?") return string.replace("$ANDROID_HOST_OUT", ANDROID_HOST_OUT) \ android_host_out = os.path.join(os.getcwd(), "out/host/linux-x86") return string.replace("$ANDROID_HOST_OUT", android_host_out) \ .replace("$(grpc_port)", config.get("grpc_port")) \ .replace("$(grpc_root_server_port)", config.get("grpc_root_server_port")) \ .replace("$(rootcanal_port)", rootcanal_port) \ Loading Loading @@ -103,7 +107,7 @@ class GdDeviceBase: self.backing_process = subprocess.Popen( cmd, cwd=ANDROID_BUILD_TOP, cwd=os.getcwd(), env=os.environ.copy(), stdout=self.backing_process_logs, stderr=self.backing_process_logs) Loading
system/gd/cert/python3.8-gd +3 −1 Original line number Diff line number Diff line #! /bin/bash PYTHONPATH=$PYTHONPATH:$ANDROID_BUILD_TOP/out/host/linux-x86/lib64:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py/packages/modules/Bluetooth/system/gd python3.8 "$@" PYTHONPATH=$ANDROID_BUILD_TOP/out/host/linux-x86/lib64:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py/packages/modules/Bluetooth/system/gd:$PYTHONPATH \ PATH=$ANDROID_HOST_OUT/nativetest64/root-canal:$ANDROID_HOST_OUT/nativetest64/bin:$PATH \ python3.8 "$@"
system/gd/cert/run +8 −1 Original line number Diff line number Diff line Loading @@ -37,8 +37,15 @@ set -- "${POSITIONAL[@]}" # restore positional parameters unzip -o -q $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py.zip \ -d $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py PYTHONPATH=$PYTHONPATH:$ANDROID_BUILD_TOP/out/host/linux-x86/lib64:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py/packages/modules/Bluetooth/system/gd \ unzip -o -q $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test.zip \ -d $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test pushd . cd $ANDROID_BUILD_TOP PYTHONPATH=$ANDROID_BUILD_TOP/out/host/linux-x86/lib64:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py/packages/modules/Bluetooth/system/gd:$PYTHONPATH \ PATH=$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test/out/host/linux-x86/nativetest64/root-canal:$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test/out/host/linux-x86/bin:$PATH \ python3.8 `which act.py`\ -c $TEST_CONFIG \ $TEST_FILTER \ -tp $ANDROID_BUILD_TOP/packages/modules/Bluetooth/system/gd popd No newline at end of file