Loading Android.bp +21 −2 Original line number Diff line number Diff line Loading @@ -69,6 +69,25 @@ filegroup { } filegroup { name: "BluetoothGTestNotShardableConfigTemplate", srcs: ["AndroidGtestNotShardableTemplate.xml"], name: "BluetoothGTestForce32ConfigTemplate", srcs: [ "AndroidGTestForce32Template.xml", ], } // Address Sanitizer is flaky on Android x86_64 binaries but it's not on x86 // binaries. // This default workaround the x86_64 ASAN flakyness by running 32bit binaries // on 64bit targets. // TODO(b/154347133): Remove this workaround cc_defaults { name: "bluetooth_gtest_x86_asan_workaround", target: { android_x86: { test_config_template: ":BluetoothGTestForce32ConfigTemplate", }, android_x86_64: { enabled: false, }, }, } AndroidGtestNotShardableTemplate.xml→AndroidGTestForce32Template.xml +1 −4 Original line number Diff line number Diff line Loading @@ -14,15 +14,12 @@ limitations under the License. --> <configuration description="Runs {MODULE}."> <option name="not-shardable" value="true" /> <option name="test-suite-tag" value="apct" /> <option name="test-suite-tag" value="apct-native" /> <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" /> <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> <option name="cleanup" value="true" /> <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" /> <option name="append-bitness" value="true" /> <option name="push" value="{MODULE}32->/data/local/tmp/{MODULE}" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> <option name="run-command" value="settings put global ble_scan_always_enabled 0" /> Loading system/audio_a2dp_hw/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ cc_test { defaults: [ "audio_a2dp_hw_defaults", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], srcs: [ "test/audio_a2dp_hw_test.cc", Loading system/audio_hearing_aid_hw/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ cc_test { defaults: [ "audio_hearing_aid_hw_defaults", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], srcs: [ "test/audio_hearing_aid_hw_test.cc", Loading system/bta/Android.bp +11 −5 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ cc_test { defaults: [ "fluoride_bta_defaults", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], test_suites: ["device-tests"], srcs: [ Loading Loading @@ -233,6 +234,7 @@ cc_test { defaults: [ "fluoride_bta_defaults", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], test_suites: ["device-tests"], host_supported: true, Loading Loading @@ -325,6 +327,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, include_dirs: [ Loading Loading @@ -379,6 +382,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, include_dirs: [ Loading Loading @@ -421,6 +425,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, include_dirs: [ Loading Loading @@ -540,6 +545,7 @@ cc_test { "fluoride_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, target: { Loading Loading @@ -628,6 +634,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, // TODO(b/231993739): Reenable isolated:true by deleting the explicit disable below Loading Loading @@ -721,6 +728,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, // TODO(b/231993739): Reenable isolated:true by deleting the explicit disable below Loading Loading @@ -772,6 +780,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, include_dirs: [ Loading Loading @@ -843,6 +852,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, // TODO(b/231993739): Reenable isolated:true by deleting the explicit disable below Loading Loading @@ -899,6 +909,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, // TODO(b/231993739): Reenable isolated:true by deleting the explicit disable below Loading Loading @@ -960,9 +971,4 @@ cc_test { undefined: true, }, }, target: { android: { test_config_template: ":BluetoothGTestNotShardableConfigTemplate", }, }, } Loading
Android.bp +21 −2 Original line number Diff line number Diff line Loading @@ -69,6 +69,25 @@ filegroup { } filegroup { name: "BluetoothGTestNotShardableConfigTemplate", srcs: ["AndroidGtestNotShardableTemplate.xml"], name: "BluetoothGTestForce32ConfigTemplate", srcs: [ "AndroidGTestForce32Template.xml", ], } // Address Sanitizer is flaky on Android x86_64 binaries but it's not on x86 // binaries. // This default workaround the x86_64 ASAN flakyness by running 32bit binaries // on 64bit targets. // TODO(b/154347133): Remove this workaround cc_defaults { name: "bluetooth_gtest_x86_asan_workaround", target: { android_x86: { test_config_template: ":BluetoothGTestForce32ConfigTemplate", }, android_x86_64: { enabled: false, }, }, }
AndroidGtestNotShardableTemplate.xml→AndroidGTestForce32Template.xml +1 −4 Original line number Diff line number Diff line Loading @@ -14,15 +14,12 @@ limitations under the License. --> <configuration description="Runs {MODULE}."> <option name="not-shardable" value="true" /> <option name="test-suite-tag" value="apct" /> <option name="test-suite-tag" value="apct-native" /> <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" /> <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> <option name="cleanup" value="true" /> <option name="push" value="{MODULE}->/data/local/tmp/{MODULE}" /> <option name="append-bitness" value="true" /> <option name="push" value="{MODULE}32->/data/local/tmp/{MODULE}" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> <option name="run-command" value="settings put global ble_scan_always_enabled 0" /> Loading
system/audio_a2dp_hw/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ cc_test { defaults: [ "audio_a2dp_hw_defaults", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], srcs: [ "test/audio_a2dp_hw_test.cc", Loading
system/audio_hearing_aid_hw/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ cc_test { defaults: [ "audio_hearing_aid_hw_defaults", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], srcs: [ "test/audio_hearing_aid_hw_test.cc", Loading
system/bta/Android.bp +11 −5 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ cc_test { defaults: [ "fluoride_bta_defaults", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], test_suites: ["device-tests"], srcs: [ Loading Loading @@ -233,6 +234,7 @@ cc_test { defaults: [ "fluoride_bta_defaults", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], test_suites: ["device-tests"], host_supported: true, Loading Loading @@ -325,6 +327,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, include_dirs: [ Loading Loading @@ -379,6 +382,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, include_dirs: [ Loading Loading @@ -421,6 +425,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, include_dirs: [ Loading Loading @@ -540,6 +545,7 @@ cc_test { "fluoride_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, target: { Loading Loading @@ -628,6 +634,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, // TODO(b/231993739): Reenable isolated:true by deleting the explicit disable below Loading Loading @@ -721,6 +728,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, // TODO(b/231993739): Reenable isolated:true by deleting the explicit disable below Loading Loading @@ -772,6 +780,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, include_dirs: [ Loading Loading @@ -843,6 +852,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, // TODO(b/231993739): Reenable isolated:true by deleting the explicit disable below Loading Loading @@ -899,6 +909,7 @@ cc_test { "fluoride_bta_defaults", "clang_coverage_bin", "mts_defaults", "bluetooth_gtest_x86_asan_workaround", ], host_supported: true, // TODO(b/231993739): Reenable isolated:true by deleting the explicit disable below Loading Loading @@ -960,9 +971,4 @@ cc_test { undefined: true, }, }, target: { android: { test_config_template: ":BluetoothGTestNotShardableConfigTemplate", }, }, }