From 113f8e99991b70709eb58168a6c4572a01e907b6 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 20 Dec 2016 17:00:20 +0100 Subject: [ct] Add ct_testspec:get_tests/1 This API function is used by rebar3 instead of implementing test spec parsing again. --- lib/common_test/doc/src/Makefile | 3 +- lib/common_test/doc/src/ct_testspec.xml | 84 +++++++++++++++++++++++++++++++++ lib/common_test/doc/src/ref_man.xml | 1 + 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 lib/common_test/doc/src/ct_testspec.xml (limited to 'lib/common_test/doc/src') diff --git a/lib/common_test/doc/src/Makefile b/lib/common_test/doc/src/Makefile index e495f587a3..152ece5d25 100644 --- a/lib/common_test/doc/src/Makefile +++ b/lib/common_test/doc/src/Makefile @@ -53,7 +53,8 @@ XML_REF3_FILES = ct.xml \ ct_slave.xml \ ct_property_test.xml \ ct_netconfc.xml \ - ct_hooks.xml + ct_hooks.xml \ + ct_testspec.xml XML_REF6_FILES = common_test_app.xml XML_PART_FILES = part.xml diff --git a/lib/common_test/doc/src/ct_testspec.xml b/lib/common_test/doc/src/ct_testspec.xml new file mode 100644 index 0000000000..36893f66cf --- /dev/null +++ b/lib/common_test/doc/src/ct_testspec.xml @@ -0,0 +1,84 @@ + + + + +
+ + 2016 + Ericsson AB. All Rights Reserved. + + + 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. + + + + ct_testspec + + + + + + + A + ct_testspec.xml +
+ ct_testspec + Parsing of test specifications for Common Test. + + + + +

Parsing of test specifications for Common Test.

+ +

This module exports help functions for parsing of test specifications.

+ +
+ + + + get_tests(SpecsIn) -> {ok, [{Specs,Tests}]} | {error, Reason} + Parse the given test specification files and return the tests to run and skip. + + SpecsIn = [string()] | [[string()]] + Specs = [string()] + Test = [{Node,Run,Skip}] + Node = atom() + Run = {Dir,Suites,Cases} + Skip = {Dir,Suites,Comment} | {Dir,Suites,Cases,Comment} + Dir = string() + Suites = atom | [atom()] | all + Cases = atom | [atom()] | all + Comment = string() + Reason = term() + + +

Parse the given test specification files and return the + tests to run and skip.

+ +

If SpecsIn=[Spec1,Spec2,...], separate tests will be + created per specification. If + SpecsIn=[[Spec1,Spec2,...]], all specifications will be + merge into one test.

+ +

For each test, a {Specs,Tests} element is returned, + where Specs is a list of all included test + specifications, and Tests specifies actual tests to + run/skip per node.

+
+
+ +
+ +
+ + diff --git a/lib/common_test/doc/src/ref_man.xml b/lib/common_test/doc/src/ref_man.xml index d1567e2d3c..1ac20db5c2 100644 --- a/lib/common_test/doc/src/ref_man.xml +++ b/lib/common_test/doc/src/ref_man.xml @@ -47,6 +47,7 @@ + -- cgit v1.2.3