aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHadrien Zalek <hzalek@google.com>2020-02-14 18:05:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-02-14 18:05:46 +0000
commit15b7c74ee7de195324b6905ce5e80f6701cb168d (patch)
tree66c2aba5c51bed27fd2d1e562ca41c14c5e34a97
parenta3cdcc59fae0f26be447a9ade2ba7ea33d2bf037 (diff)
parent2f5b2a9eea1d592cc961d90d395d760665a5872c (diff)
downloadcsuite-15b7c74ee7de195324b6905ce5e80f6701cb168d.tar.gz
Merge "Configure project to run tests using atest"
-rw-r--r--harness/Android.mk4
-rw-r--r--harness/AndroidTest.xml20
-rw-r--r--harness/TEST_MAPPING8
-rw-r--r--harness/src/test/resources/config/csuite-harness-tests.xml30
-rw-r--r--tools/csuite-tradefed/Android.mk8
-rw-r--r--tools/csuite-tradefed/AndroidTest.xml20
-rw-r--r--tools/csuite-tradefed/README3
-rw-r--r--tools/csuite-tradefed/TEST_MAPPING8
-rw-r--r--tools/csuite-tradefed/src/test/resources/config/csuite-unit-tests.xml30
9 files changed, 62 insertions, 69 deletions
diff --git a/harness/Android.mk b/harness/Android.mk
index c057891..aad6044 100644
--- a/harness/Android.mk
+++ b/harness/Android.mk
@@ -36,8 +36,6 @@ include $(BUILD_HOST_JAVA_LIBRARY)
include $(CLEAR_VARS)
-LOCAL_JAVA_RESOURCE_DIRS := src/test/resources
-
LOCAL_SRC_FILES = $(call all-java-files-under, src/test/java)
LOCAL_JAVA_LIBRARIES := tradefed csuite-harness
@@ -46,4 +44,6 @@ LOCAL_STATIC_JAVA_LIBRARIES := mockito-host objenesis testng
LOCAL_MODULE := csuite-harness-tests
+LOCAL_COMPATIBILITY_SUITE := general-tests
+
include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/harness/AndroidTest.xml b/harness/AndroidTest.xml
new file mode 100644
index 0000000..f3fb637
--- /dev/null
+++ b/harness/AndroidTest.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 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="Executes the C-Suite harness unit tests">
+ <test class="com.android.tradefed.testtype.HostTest" >
+ <option name="class" value="com.android.compatibility.CSuiteUnitTests" />
+ </test>
+</configuration>
diff --git a/harness/TEST_MAPPING b/harness/TEST_MAPPING
new file mode 100644
index 0000000..50ed1cd
--- /dev/null
+++ b/harness/TEST_MAPPING
@@ -0,0 +1,8 @@
+{
+ "postsubmit": [
+ {
+ "name": "csuite-harness-tests",
+ "host": true
+ }
+ ]
+}
diff --git a/harness/src/test/resources/config/csuite-harness-tests.xml b/harness/src/test/resources/config/csuite-harness-tests.xml
deleted file mode 100644
index 10dc6dc..0000000
--- a/harness/src/test/resources/config/csuite-harness-tests.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2019 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="Executes the C-Suite harness unit tests">
- <option name="null-device" value="true" />
- <build_provider class="com.android.tradefed.build.StubBuildProvider" />
-
- <test class="com.android.tradefed.testtype.HostTest" >
- <option name="class" value="com.android.compatibility.CSuiteUnitTests" />
- </test>
-
- <logger class="com.android.tradefed.log.FileLogger" />
-
- <result_reporter class="com.android.tradefed.result.ConsoleResultReporter">
- <option name="suppress-passed-tests" value="true" />
- </result_reporter>
- <template-include name="reporters" default="empty" />
-</configuration>
diff --git a/tools/csuite-tradefed/Android.mk b/tools/csuite-tradefed/Android.mk
index f91b65b..654fac7 100644
--- a/tools/csuite-tradefed/Android.mk
+++ b/tools/csuite-tradefed/Android.mk
@@ -21,7 +21,6 @@ LOCAL_MODULE_TAGS := optional
LOCAL_PREBUILT_EXECUTABLES := src/scripts/csuite-tradefed
include $(BUILD_HOST_PREBUILT)
-
############################
# csuite-tradefed
############################
@@ -39,20 +38,17 @@ LOCAL_MODULE := csuite-tradefed
include $(BUILD_COMPATIBILITY_SUITE)
-
############################
# csuite-tradefed-tests
############################
include $(CLEAR_VARS)
-LOCAL_JAVA_RESOURCE_DIRS := src/test/resources
-
LOCAL_SRC_FILES += $(call all-java-files-under, src/test/java)
LOCAL_MODULE := csuite-tradefed-tests
LOCAL_MODULE_TAGS := optional
-LOCAL_JAVA_LIBRARIES := tradefed csuite-tradefed
-LOCAL_STATIC_JAVA_LIBRARIES := csuite-harness-tests
+LOCAL_STATIC_JAVA_LIBRARIES := tradefed csuite-tradefed
+LOCAL_COMPATIBILITY_SUITE := general-tests
include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/tools/csuite-tradefed/AndroidTest.xml b/tools/csuite-tradefed/AndroidTest.xml
new file mode 100644
index 0000000..850750e
--- /dev/null
+++ b/tools/csuite-tradefed/AndroidTest.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 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>
+ <test class="com.android.tradefed.testtype.HostTest" >
+ <option name="class" value="com.android.compatibility.tradefed.CSuiteTradefedTest" />
+ </test>
+</configuration>
diff --git a/tools/csuite-tradefed/README b/tools/csuite-tradefed/README
index dbc09aa..32cf936 100644
--- a/tools/csuite-tradefed/README
+++ b/tools/csuite-tradefed/README
@@ -35,10 +35,11 @@ platform source code and setting up a build environment.
The source for the tradefed framework can be found on the 'tradefed' branch.
Perform these steps to build and run csuite from the development environment:
+
cd <path to android source root>
make csuite
csuite-tradefed
-run csuite-unit-tests
+run <plan-name>
More documentation and details on using and extending trade federation will
be forthcoming in the near future.
diff --git a/tools/csuite-tradefed/TEST_MAPPING b/tools/csuite-tradefed/TEST_MAPPING
new file mode 100644
index 0000000..89c2072
--- /dev/null
+++ b/tools/csuite-tradefed/TEST_MAPPING
@@ -0,0 +1,8 @@
+{
+ "postsubmit": [
+ {
+ "name": "csuite-tradefed-tests",
+ "host": true
+ }
+ ]
+}
diff --git a/tools/csuite-tradefed/src/test/resources/config/csuite-unit-tests.xml b/tools/csuite-tradefed/src/test/resources/config/csuite-unit-tests.xml
deleted file mode 100644
index 20384d1..0000000
--- a/tools/csuite-tradefed/src/test/resources/config/csuite-unit-tests.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2019 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="Executes the C-Suite unit tests">
- <option name="null-device" value="true" />
- <build_provider class="com.android.tradefed.build.StubBuildProvider" />
-
- <test class="com.android.tradefed.testtype.HostTest" >
- <option name="class" value="com.android.compatibility.tradefed.CSuiteTradefedTest" />
- </test>
-
- <logger class="com.android.tradefed.log.FileLogger" />
-
- <result_reporter class="com.android.tradefed.result.ConsoleResultReporter">
- <option name="suppress-passed-tests" value="true" />
- </result_reporter>
- <template-include name="reporters" default="empty" />
-</configuration>