Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfe42753 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Cert: Unzip all cert files into the same virtual environment" am:...

Merge "Cert: Unzip all cert files into the same virtual environment" am: 100330b4 am: 5b4e29c8 am: 337a998f am: c537b4e3

Change-Id: I37a0dd28f9e64093d33feb84958b1df6b178992c
parents 4ca8257e c537b4e3
Loading
Loading
Loading
Loading
+2 −18
Original line number Diff line number Diff line
LOCAL_PATH := $(call my-dir)

bluetooth_cert_test_file_list := \
    $(call all-named-files-under,*.py,cert) \
    $(call all-named-files-under,*.sh,cert) \
    $(call all-named-files-under,run,cert) \
    $(call all-named-files-under,*.py,.) \
    $(call all-named-files-under,*.proto,cert facade hal hci/cert hci/facade l2cap/classic \
	    l2cap/classic/cert neighbor/facade security) \
    cert/all_cert_testcases \
    cert/android_devices_config.json \
    cert/host_config.json \
    hal/cert/simple_hal_test.py \
    hci/cert/acl_manager_test.py \
    hci/cert/controller_test.py \
    hci/cert/direct_hci_test.py \
    hci/cert/le_acl_manager_test.py \
    hci/cert/le_advertising_manager_test.py \
    hci/cert/le_scanning_manager_test.py \
    l2cap/classic/cert/l2cap_test.py \
    l2cap/classic/cert/pts_l2cap_test.py \
    neighbor/cert/neighbor_test.py \
    security/cert/simple_security_test.py \
    shim/cert/stack_test.py
    cert/all_cert_testcases

bluetooth_cert_test_file_list := $(addprefix $(LOCAL_PATH)/,$(bluetooth_cert_test_file_list))

+2 −2
Original line number Diff line number Diff line
#! /bin/bash
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 \
BLUETOOTH_CERT_TEST_ENV=$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test_env
PYTHONPATH=$BLUETOOTH_CERT_TEST_ENV/out/host/linux-x86/lib64:$BLUETOOTH_CERT_TEST_ENV/packages/modules/Bluetooth/system/gd:$PYTHONPATH \
 python3.8 "$@"
+7 −4
Original line number Diff line number Diff line
@@ -34,16 +34,19 @@ esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters

BLUETOOTH_CERT_TEST_ENV=$ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test_env
rm -rf BLUETOOTH_CERT_TEST_ENV
mkdir -p $BLUETOOTH_CERT_TEST_ENV

unzip -o -q $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py.zip \
   -d $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_generated_py
   -d $BLUETOOTH_CERT_TEST_ENV

unzip -o -q $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test.zip \
   -d $ANDROID_BUILD_TOP/out/dist/bluetooth_cert_test
   -d $BLUETOOTH_CERT_TEST_ENV

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 \
PYTHONPATH=$BLUETOOTH_CERT_TEST_ENV/out/host/linux-x86/lib64:$BLUETOOTH_CERT_TEST_ENV/packages/modules/Bluetooth/system/gd:$PYTHONPATH \
    python3.8 `which act.py`\
      -c $TEST_CONFIG \
      $TEST_FILTER \
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ from bluetooth_packets_python3.l2cap_packets import CommandCode
from bluetooth_packets_python3.l2cap_packets import SupervisoryFunction
from bluetooth_packets_python3.l2cap_packets import Poll
from bluetooth_packets_python3.l2cap_packets import InformationRequestInfoType
from cert_l2cap import CertL2cap
from l2cap.classic.cert.cert_l2cap import CertL2cap

# Assemble a sample packet. TODO: Use RawBuilder
SAMPLE_PACKET = l2cap_packets.CommandRejectNotUnderstoodBuilder(1)