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

Commit b4aafdd1 authored by Martin Brabham's avatar Martin Brabham
Browse files

Blueberry2: Fix testing for development

Bug: 236738437
Test: system/gd/cert/run --clean --sl4a
Test: system/gd/cert/run --clean --sl4a_sl4a
Tag: #stability
Ignore-AOSP-First: Need in tm-dev stat and can't put it in AOSP yet
Change-Id: I131ab15506928e075ed17ae0ed069faa292d4594
parent 2b77cce5
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ def make_ports_available(ports: Container[int], timeout_seconds=10):
        logging.warning("Freeing port %d used by %s" % (conn.laddr.port, str(conn)))
        if not conn.pid:
            logging.error("Failed to kill process occupying port %d due to lack of pid" % conn.laddr.port)
            success = False
            continue
        logging.warning("Killing pid %d that is using port port %d" % (conn.pid, conn.laddr.port))
        if conn.pid in killed_pids:
+4 −1
Original line number Diff line number Diff line
@@ -78,7 +78,10 @@ def teardown_sl4a(device: AndroidDevice):
        # waiting for the future. However, mobly calls it and cause InvalidStateError when it
        # tries to do that after the thread pool has stopped, overriding it here
        # TODO: Resolve this issue in mobly
        try:
            device.sl4a.ed.poller = FakeFuture()
        except Exception as e:
            print(e)
    try:
        # Guarded by is_alive internally
        device.sl4a.stop()
+2 −2
Original line number Diff line number Diff line
@@ -268,13 +268,13 @@ function select_devices {

function soong_build {
    if [ "$CLEAN_VENV" == true ] ; then
        $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --build-mode --"modules-in-a-dir" --dir="${ANDROID_BUILD_TOP}/packages/modules/Bluetooth/system" dist $BUILD_TARGET -j20
        $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --build-mode --"modules-in-a-dir" --dir="${ANDROID_BUILD_TOP}/packages/modules/Bluetooth/system" dist $BUILD_TARGET -j $(nproc)
        if [[ $? -ne 0 ]] ; then
            echo -e "${RED}Failed to build ${BUILD_TARGET}${NOCOLOR}"
            exit 1
        fi
    else
        $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --build-mode --"all-modules" --dir="${ANDROID_BUILD_TOP}/packages/modules/Bluetooth/system" $BUILD_TARGET -j20
        $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --build-mode --"all-modules" --dir="${ANDROID_BUILD_TOP}/packages/modules/Bluetooth/system" dist $BUILD_TARGET -j $(nproc)
        if [[ $? -ne 0 ]] ; then
            echo -e "${RED}Failed to build ${BUILD_TARGET}${NOCOLOR}"
            exit 1