From 6b119a365b6c04279104f123456ed841b2ce987f Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 31 Jul 2018 15:41:41 +0200 Subject: Create a test widget Create a test widget in addition of the normal one when you use any build type except of RELEASE. This widget will only provide the test files (configuration + test + fixtures ...). It joins the test framework binding to your binding or app then you only have to access to your defined test API and launch the tests. The entry point is a bash script which is in charge to launch all tests it finds. Change-Id: I8f4a670f17fd4e4319c53a861074fb5e10b63aad Signed-off-by: Romain Forlot --- docs/dev_guide/1_Quickstart.md | 14 +++++++++++--- docs/dev_guide/3_advanced_usage.md | 37 +++++++++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 5 deletions(-) (limited to 'docs/dev_guide') diff --git a/docs/dev_guide/1_Quickstart.md b/docs/dev_guide/1_Quickstart.md index 1df38c1..e910178 100644 --- a/docs/dev_guide/1_Quickstart.md +++ b/docs/dev_guide/1_Quickstart.md @@ -59,8 +59,15 @@ Choose between: *${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI syntax (e.g: *mybinding-apidef*). Or Alternatively, you can choose the name, without the extension, using macro - **set_openapi_filename**. If you use C++, you have to set - **PROJECT_LANGUAGES** with *CXX*. + **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES** + with *CXX*. +- **BINDINGV3**: Shared library that be loaded by the AGL Application Framework + This has to be accompagnied with a JSON file named like the + *${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI + syntax (e.g: *mybinding-apidef*). + Or Alternatively, you can choose the name, without the extension, using macro + **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES** + with *CXX*. - **PLUGIN**: Shared library meant to be used as a binding plugin. Binding would load it as a plugin to extend its functionnalities. It should be named with a special extension that you choose with SUFFIX cmake target property or @@ -73,6 +80,7 @@ Choose between: Application Framework - **LIBRARY**: An external 3rd party library bundled with the binding for its own purpose because platform doesn't provide it. +- **BINDING-CONFIG**: Any files used as configuration by your binding. > **TIP** you should use the prefix _afb-_ with your **BINDING* targets which > stand for **Application Framework Binding**. @@ -80,7 +88,7 @@ Choose between: ```cmake SET_TARGET_PROPERTIES(${TARGET_NAME} PREFIX "afb-" - LABELS "BINDINGV2" + LABELS "BINDINGV3" OUTPUT_NAME "file_output_name") ``` diff --git a/docs/dev_guide/3_advanced_usage.md b/docs/dev_guide/3_advanced_usage.md index 2ee78ce..114230f 100644 --- a/docs/dev_guide/3_advanced_usage.md +++ b/docs/dev_guide/3_advanced_usage.md @@ -35,8 +35,15 @@ Choose between: *${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI syntax (e.g: *mybinding-apidef*). Or Alternatively, you can choose the name, without the extension, using macro - **set_openapi_filename**. If you use C++, you have to set - **PROJECT_LANGUAGES** with *CXX*. + **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES** + with *CXX*. +- **BINDINGV3**: Shared library that be loaded by the AGL Application Framework + This has to be accompagnied with a JSON file named like the + *${OUTPUT_NAME}-apidef* of the target that describe the API with OpenAPI + syntax (e.g: *mybinding-apidef*). + Or Alternatively, you can choose the name, without the extension, using macro + **set_openapi_filename**. If you use C++, you have to set **PROJECT_LANGUAGES** + with *CXX*. - **PLUGIN**: Shared library meant to be used as a binding plugin. Binding would load it as a plugin to extend its functionnalities. It should be named with a special extension that you choose with SUFFIX cmake target property or @@ -49,6 +56,32 @@ Choose between: Application Framework - **LIBRARY**: An external 3rd party library bundled with the binding for its own purpose because platform doesn't provide it. +- **BINDING-CONFIG**: Any files used as configuration by your binding. + +Two optionnals **LABELS** are available to define which resources are your tests +materials: + +- **TEST-CONFIG**: JSON configuration files that will be used by the afb-test + binding to know how to execute tests. +- **TEST-DATA**: Resources used to test your binding. It is at least your test + plan and also could be fixtures and any needed files by your tests. These files + will appear in a separate test widget. + +Here is a mapping between LABELS and directories where files will be puted in +the widget: + +- **EXECUTABLE** : \/bin +- **BINDING-CONFIG** : \/etc +- **BINDING** | **BINDINGV2** | **BINDINGV3** | **LIBRARY** : \/lib +- **PLUGIN** : \/lib/plugins +- **HTDOCS** : \/htdocs +- **BINDING-DATA** : \/var +- **DATA** : \/var + +And about test dedicated **LABELS**: + +- **TEST-CONFIG** : \/etc +- **TEST-DATA** : \/var > **TIP** you should use the prefix _afb-_ with your **BINDING* targets which > stand for **Application Framework Binding**. -- cgit 1.2.3-korg