diff options
author | Jack He <siyuanh@google.com> | 2018-08-28 18:28:55 -0700 |
---|---|---|
committer | Jack He <siyuanh@google.com> | 2018-09-27 22:21:21 +0000 |
commit | 37b717c612a82f81366afee36db8853b1611b865 (patch) | |
tree | f7c109c00a35917cb8b2377daec1f3dcb14d7f5a | |
parent | 71113b44c302b3d105ef4999ef899d09e2a6bf42 (diff) | |
download | bt-37b717c612a82f81366afee36db8853b1611b865.tar.gz |
Add TEST_MAPPING to system/bt
* Add "postsubmit" test group to TEST_MAPPING in system/bt
* Developer can run tests mannually in system/bt via:
system/bt$ atest :postsubmit
* Remove legacy configuration files spread across system/bt
* Created unified configuration file system/bt/AndroidTestTemplate.xml
and add it to the default build config so that developers don't have
to configure it
Bug: 113359343
Test: atest :postsubmit
Change-Id: I0fdd55b47ef176b5c4ce3d2cd217ffa67cf9bc23
-rw-r--r-- | Android.bp | 7 | ||||
-rw-r--r-- | AndroidTestTemplate.xml | 33 | ||||
-rw-r--r-- | TEST_MAPPING | 52 | ||||
-rw-r--r-- | btcore/AndroidTest.xml | 26 | ||||
-rw-r--r-- | build/Android.bp | 1 | ||||
-rw-r--r-- | device/AndroidTest.xml | 26 | ||||
-rw-r--r-- | hci/AndroidTest.xml | 26 | ||||
-rw-r--r-- | osi/AndroidTest.xml | 26 | ||||
-rw-r--r-- | service/AndroidTest.xml | 26 | ||||
-rw-r--r-- | test/suite/AndroidTest.xml | 29 |
10 files changed, 93 insertions, 159 deletions
diff --git a/Android.bp b/Android.bp index 74c027e3c..dd1d7fa99 100644 --- a/Android.bp +++ b/Android.bp @@ -23,3 +23,10 @@ subdirs = [ "tools", "proto", ] + +filegroup { + name: "BluetoothTestConfigTemplate", + srcs: [ + "AndroidTestTemplate.xml" + ] +} diff --git a/AndroidTestTemplate.xml b/AndroidTestTemplate.xml new file mode 100644 index 000000000..3ad4cd26e --- /dev/null +++ b/AndroidTestTemplate.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2018 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<configuration description="Runs {MODULE}."> + <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.tradefed.targetprep.PushFilePreparer"> + <option name="cleanup" value="true" /> + <option name="push" value="{MODULE}->/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" /> + <option name="run-command" value="svc bluetooth disable" /> + </target_preparer> + <test class="com.android.tradefed.testtype.GTest" > + <option name="native-test-device-path" value="/data/local/tmp" /> + <option name="module-name" value="{MODULE}" /> + <option name="run-test-as" value="0" /> + </test> +</configuration> diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 000000000..7318465f8 --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,52 @@ +{ + "postsubmit" : [ + { + "name" : "bluetoothtbd_test" + }, + { + "name" : "net_test_audio_a2dp_hw" + }, + { + "name" : "net_test_avrcp" + }, + { + "name" : "net_test_btcore" + }, + { + "name" : "net_test_btif" + }, + { + "name" : "net_test_btif_profile_queue" + }, + { + "name" : "net_test_btpackets" + }, + { + "name" : "net_test_device" + }, + { + "name" : "net_test_hci" + }, + { + "name" : "net_test_performance" + }, + { + "name" : "net_test_stack" + }, + { + "name" : "net_test_stack_ad_parser" + }, + { + "name" : "net_test_stack_multi_adv" + }, + { + "name" : "net_test_stack_rfcomm" + }, + { + "name" : "net_test_stack_smp" + }, + { + "name" : "net_test_types" + } + ] +} diff --git a/btcore/AndroidTest.xml b/btcore/AndroidTest.xml deleted file mode 100644 index 27cd56950..000000000 --- a/btcore/AndroidTest.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2017 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<configuration description="Config for net_test_btcore"> - <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> - <option name="cleanup" value="true" /> - <option name="push" value="net_test_btcore->/data/local/tmp/net_test_btcore" /> - </target_preparer> - <option name="test-suite-tag" value="apct" /> - <test class="com.android.tradefed.testtype.GTest" > - <option name="native-test-device-path" value="/data/local/tmp" /> - <option name="module-name" value="net_test_btcore" /> - </test> -</configuration>
\ No newline at end of file diff --git a/build/Android.bp b/build/Android.bp index bec3e8577..5949bb40e 100644 --- a/build/Android.bp +++ b/build/Android.bp @@ -55,6 +55,7 @@ fluoride_defaults { fluoride_defaults { name: "fluoride_defaults", + test_config_template: ":BluetoothTestConfigTemplate", defaults: ["fluoride_types_defaults"], header_libs: ["libbluetooth_headers"], static_libs: [ diff --git a/device/AndroidTest.xml b/device/AndroidTest.xml deleted file mode 100644 index 0960fb439..000000000 --- a/device/AndroidTest.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2017 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<configuration description="Config for net_test_device"> - <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> - <option name="cleanup" value="true" /> - <option name="push" value="net_test_device->/data/local/tmp/net_test_device" /> - </target_preparer> - <option name="test-suite-tag" value="apct" /> - <test class="com.android.tradefed.testtype.GTest" > - <option name="native-test-device-path" value="/data/local/tmp" /> - <option name="module-name" value="net_test_device" /> - </test> -</configuration>
\ No newline at end of file diff --git a/hci/AndroidTest.xml b/hci/AndroidTest.xml deleted file mode 100644 index 944b454e3..000000000 --- a/hci/AndroidTest.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2017 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<configuration description="Config for net_test_hci"> - <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> - <option name="cleanup" value="true" /> - <option name="push" value="net_test_hci->/data/local/tmp/net_test_hci" /> - </target_preparer> - <option name="test-suite-tag" value="apct" /> - <test class="com.android.tradefed.testtype.GTest" > - <option name="native-test-device-path" value="/data/local/tmp" /> - <option name="module-name" value="net_test_hci" /> - </test> -</configuration>
\ No newline at end of file diff --git a/osi/AndroidTest.xml b/osi/AndroidTest.xml deleted file mode 100644 index aa723bb4d..000000000 --- a/osi/AndroidTest.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2017 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<configuration description="Config for net_test_osi"> - <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> - <option name="cleanup" value="true" /> - <option name="push" value="net_test_osi->/data/local/tmp/net_test_osi" /> - </target_preparer> - <option name="test-suite-tag" value="apct" /> - <test class="com.android.tradefed.testtype.GTest" > - <option name="native-test-device-path" value="/data/local/tmp" /> - <option name="module-name" value="net_test_osi" /> - </test> -</configuration>
\ No newline at end of file diff --git a/service/AndroidTest.xml b/service/AndroidTest.xml deleted file mode 100644 index 0beba7504..000000000 --- a/service/AndroidTest.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2017 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<configuration description="Config for bluetoothtbd_test"> - <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> - <option name="cleanup" value="true" /> - <option name="push" value="bluetoothtbd_test->/data/local/tmp/bluetoothtbd_test" /> - </target_preparer> - <option name="test-suite-tag" value="apct" /> - <test class="com.android.tradefed.testtype.GTest" > - <option name="native-test-device-path" value="/data/local/tmp" /> - <option name="module-name" value="bluetoothtbd_test" /> - </test> -</configuration>
\ No newline at end of file diff --git a/test/suite/AndroidTest.xml b/test/suite/AndroidTest.xml deleted file mode 100644 index d7778e1a2..000000000 --- a/test/suite/AndroidTest.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright 2017 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<configuration description="Config for net_test_bluetooth"> - <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> - <option name="cleanup" value="true" /> - <option name="push" value="net_test_bluetooth->/data/local/tmp/net_test_bluetooth" /> - </target_preparer> - <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> - <option name="run-command" value="stop" /> - </target_preparer> - <option name="test-suite-tag" value="apct" /> - <test class="com.android.tradefed.testtype.GTest" > - <option name="native-test-device-path" value="/data/local/tmp" /> - <option name="module-name" value="net_test_bluetooth" /> - </test> -</configuration> |