blob: 678194156f59421a68f279cf9f1714ededa19365 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2009 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
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
<!-- Contains the schema definition for Android test definitions xml -->
<xs:schema xmlns:xs=""
<xs:element name="test-definitions">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="test" type="javaTestType" />
<xs:element name="test-native" type="nativeTestType" />
<xs:element name="test-host" type="hostTestType" />
<!-- Generic, abstract test definition. Contains attributes common to all
test types. -->
<xs:complexType name="testType">
<!-- Self-descriptive name used to uniquely identify the test. -->
<xs:attribute name="name" type="xs:string" use="required" />
<!-- File system path, relative to Android build root, to this
package's file.-->
<xs:attribute name="build_path" type="xs:string" use="required" />
<!-- Include test in continuous test system. -->
<xs:attribute name="continuous" type="xs:boolean" use="optional"
default="false" />
<!-- Include test as part of named suite. -->
<xs:attribute name="suite" type="xs:string" use="optional" />
<!-- Short description (typically less than 60 characters) about this
test. -->
<xs:attribute name="description" type="xs:string" use="optional" />
<!-- Specifies that a full 'make', as opposed to 'mmm' command, is
needed to build this test. The build command used will be
'make extra_build_args' -->
<xs:attribute name="full_make" type="xs:boolean"
use="optional" />
<!-- Extra arguments to append to build command when building this
test. -->
<xs:attribute name="extra_build_args" type="xs:string"
use="optional" />
<!-- Java on device instrumentation test.
The test attributes map to the following commands:
(if class is defined)
adb shell am instrument -w <package>/<runner>
adb shell am instrument -w -e class <class> <package>/<runner>
<xs:complexType name="javaTestType">
<xs:extension base="testType">
<!-- Android application package that contains the tests. -->
<xs:attribute name="package" type="xs:string" use="required" />
<!-- Fully qualified Java test class to run. -->
<xs:attribute name="class" type="xs:string" use="optional" />
<!-- Fully qualified InstrumentationTestRunner to execute. -->
<xs:attribute name="runner" type="xs:string" use="optional"
default="android.test.InstrumentationTestRunner" />
<!-- Build name of Android package this test targets. These
targets are defined in the coverage_targets.xml file. Used as
basis for code coverage metrics. If omitted, code coverage will
not be supported for this test. -->
<xs:attribute name="coverage_target" type="xs:string"
use="optional" />
<!-- Native (C/C++) on device tests.
The native test attributes map to the following commands:
make <build_path>/ <extra_build_args>
adb sync
for test_prog in <tests built>; do
adb shell "/system/bin/${test_prog} >/dev/null 2>&1;echo \$?"
adb shell "rm /system/bin/${test_prog}"
<xs:complexType name="nativeTestType">
<xs:extension base="testType" />
<!-- no additional attributes -->
<!-- Host java tests.
Uses hosttestlib to execute tests on host. Maps to following command:
java -cp <libs>:jar_name \
<class> -s <device serial> -p <app build path>
<xs:complexType name="hostTestType">
<xs:extension base="testType">
<!-- The test class to run. Must extend DeviceTestSuite, and
implement a public static suite() method that returns a Test to
run. -->
<xs:attribute name="class" type="xs:string" use="required" />
<!-- built jar name of host library that includes the tests. -->
<xs:attribute name="jar_name" type="xs:string" use="required" />