summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-10-22Bump submodulesRomain Forlot2-0/+0
Submodule app-controller-submodule d6eb01e..ce07538: > Abort if one required API is missing > Correct an error when no plugins are defined > Decrease print level when no onload action > Add a 'params' fields for controller plugins > Call wasn't done correctly in 'CtlConfigExec' > Add ctlPlugins array to the ctlConfig structure > Add an Init step to the plugins load Submodule conf.d/app-templates 52ae181..e7fd1da: > Select the test set to run > Always use wgt when talking about widget > Minor fixes > Improved test widget launcher script > Set default link flags to the target property > Use a custom test-config.xml file for test widget > cmake: coverage: disable compiler optimization for COVERAGE build > Adding warning message to migrate on CMake module > common.cmake: fixed erroneous search path for os-release > Fix: missing gcov symbol in compiled binaries > app-templates doc: Changed doc to fit new format. > Update Docs Change-Id: I7b21414e465a8377c031cfd54f6170051d4312de Signed-off-by: Romain Forlot <romain.forlot@iot.bzh> Submodule conf.d/app-templates 0f25ab2..: Change-Id: Ief3ca4ba2e7a4ccf5a3d730a0f1656454e2853df Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-22Be able to launch several verb in a rowRomain Forlot1-2/+0
You must not specify the _AFT.exitAtEnd in your LUA files if you want to be able to chain test verb calls. Else it will exit during the file which has specified the exitAtEnd call. Change-Id: I3e7f4c6efadcbada426176f51bd709413f1c7405 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-22Improve native launching methodRomain Forlot2-6/+32
This will launch every verbs defined in the test configuration file instead of only the hardcoded launch_all_tests verbs Change-Id: Ibc890660cd2209516195ad0f3cf2069e2612b0d4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-22Fix: wrong output file specified using single argRomain Forlot1-1/+1
Copy/paste error... Change-Id: Iac3a96fed518171cd5a6963145296429368782fa Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Clean the base afb-test binding's dependenciesRomain Forlot1-13/+1
Clean the base afb-test binding's dependencies on external apis. This will be needed to run it as a stand-alone service in the future. Change-Id: Ia708c4bfd6c674279b62df2c8fc38464567f23e8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Shellcheck: protect variable against whitespaceRomain Forlot1-13/+13
This avoid some side effects caused by empty variable value. Change-Id: If3134dfe561d9b12b7429dbe511f63f8fdb376dc Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Improve exit output messageRomain Forlot2-8/+22
Display the tests results depending on the chosen format or inform the user of the error and displaying in that case the binder(s) log output. Change-Id: I2437d3b59ef5b864c8e41749b16bf3ed738c9caa Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-09Test the LockWait featureRomain Forlot1-0/+12
This commit adds a test that ensures that the timeout waiting an event expires correctly and that we correctly wait for the indicated time. Change-Id: Ic9aeb32d09b45af0d75c8c51fa421b8f5a25f39c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-09Unify test launch between target and nativeRomain Forlot4-26/+24
On a target, the binder process name is taken from the widget "id", now the native launcher script also launches the binder using the widget "id". As the controller searches its configuration file using the binder process middle name we need to differentiate between both "id" otherwise the wrong configuration file is used. The commit renames configuration file according to the new "id". Change-Id: Icd01abe21ddee562518c7f822baca8b098bbb55e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-09Update documentationRomain Forlot4-19/+109
This adds some instructions to build test widget using SDK and basic instruction on how to test natively on your host as well as on a target board. Change-Id: I077fda253336883bec3cd0101e61467565d679ff Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-08get rid of afb-definitionsClément Bénier3-54/+54
directly use app framework binder api v3 Change-Id: If2587b074ab5215036bce68ff5b42c398512af0d Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-10-03Avoid to kill anything when no config file foundRomain Forlot1-0/+3
Display an error and exit if no JSON test configuration file found. Else it would kill your user session. Change-Id: Ica934cfda02baca3844d15d2134d295055c372da Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-26Separation between CB and classic test functionsRomain Forlot1-6/+15
Without that separation you need to specify a nil argument before your setUp and tearDown functions in your test definition. Change-Id: Ic9ef9c1928fa658b15eceb43a464243d246f9b79 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-25Rename test service api to be more discriminant.Romain Forlot5-12/+12
Using aftest and aft-aftest api name to self test was difficult because of searching file using the binder process name which could be the same although api name were diffirent. Change-Id: I20ef554d54ddc1cb5bd169d462558d78f2769668 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-25Assert that an event hasn't been receivedRomain Forlot1-0/+35
Change-Id: Icc1bef7f87f55a377cacfb590e1d371d9f6a1511 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-25Script for both native and target launchRomain Forlot6-56/+151
Change-Id: I975c6c8e5eb41d7197ee7992762799b72d7bcb41 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-16Separate output filesguppy_6.90.0guppy/6.90.06.90.0Romain Forlot1-3/+20
Use one output file by test suite executed with the according extension depending upon the output type chosen. Change-Id: I1804287fc56e4ee2b6df9f672d94553a3d947d49 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-07Use controller new behavior that add objectsflounder_5.99.6flounder/5.99.65.99.6Romain Forlot2-32/+5
Adding objects to events section using the controller function to create a mock-api. Change-Id: Ic538c02f08b2f4f3376ffa6e9b9ffcbef1592599 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-30Silence all outputs of kill commandflounder_5.99.5flounder/5.99.55.99.5Romain Forlot1-1/+1
Because may the users doesn't set to exit the binder at the end in the LUA so it has to be killed by the script. Then every case are covered. Change-Id: I3967b296ca8eafc65bb8109c57d2b8b2de582583 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-30Reset context functions between test filesRomain Forlot1-20/+28
This reset the contextual functions that trigger before and after tests between each files loaded. Then context is set by file and not by the API's verb of the test binding. This is more an intuitive behavior. Change-Id: I76716dd19d23b715690b74d9b67253dffd01c12d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-30Update gitignoreRomain Forlot1-1/+1
Change-Id: I895ca559a1ebf313c25252b38883f54d45da8bd8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-30Lower CMake version requirementRomain Forlot1-1/+1
Change-Id: I8ac2a69aeb1f6cf6daeb560bd38f92c411dbaf58 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-30Make afTest test itself correctlyRomain Forlot2-20/+21
For native build and test purposes you need to start 2 bindings to be able to test correctly the afb-test binding. The first one will answer on the main API name afTest and the second to launch the test. This is the closest test case similar to a test on a target board. Change-Id: I6b961c0e41cdd3eef387b7f5156ed334e8f6c3de Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-30Don't crash if lua test files aren't foundRomain Forlot1-7/+13
This protect the file read to avoid crashing if no file has been found and display an error. Protect with double-quote the path to avoid 'find' error if space are part of the path. Change-Id: I3a27ca9d2566edd5f1b9cd301153e0ab735a177a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-30afb-test doc: Updated doc.CorentinLGS3-33/+263
-Changed 0_ProjectTree.md to only show what's interesting. -Made further explanations on how to organize and integrate test files. -Updated 2_LaunchTheExample.md, now explains the new way to launch tests. -Also added the result of a test launched on a target. -Added a configuration example in 1_BindingConfiguration.md . Change-Id: I4c4ed1cef5e914a8179a6823489791e6756106b6 Signed-off-by: CorentinLGS <corentinlgs@gmail.com>
2018-08-29Native test script launcher improvmentsRomain Forlot2-4/+6
Remove the debug log messages. Display the results of tests at the end. Change-Id: I38ec1a6807a8e7de483545fd3346327fe1847f73 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-28afb-test doc: Changed doc to new format.CorentinLGS13-977/+2
-Deleted gendocs.sh, docs/_layout and docs/resources. -Splited book.json to match new format. -Changed description in README.md Change-Id: I9835bf64ea2f0b6b3ca6cfd9f1ec8c720b4618c9 Signed-off-by: CorentinLGS <corentinlgs@gmail.com>
2018-08-24Fix: compatibility with binder FF.RC4flounder_5.99.4flounder/5.99.45.99.4Romain Forlot1-0/+0
Binder FF.RC4 provides the missing define afb_service_call[_sync]_legacy which doesn't fit with define in the controller as the first argument API is already given by the app framework binder. Change-Id: I5aa6dbbbf6cad37377d933ff4de8466a6a4d9a34 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-23Bump app-templates to fix typo bugRomain Forlot1-0/+0
Submodule conf.d/app-templates f0b24b0..52ae181: > Fix: typo Change-Id: I0a233b64eb592d3b9254b3bdb13046d8ce41f866 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-23Use separate test folder to hold test filesRomain Forlot13-18/+198
Also separate helloWorld example binding test from self aft tests Change-Id: I5b7c48b38cc6629c3edc97d280d7f9228451b337 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-23Update the self-testsRomain Forlot2-10/+6
- Fix: expected data table structure in callbackEvent - Testing event received with a timeout is meaningless since the event are pushed on afb-test request. So They are already received at the assertion moment. - Wrong test waiting for a verb error. Change-Id: I1cec211f7fe4c37d4c238439e8a9a633121a6cf0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-22CleaningRomain Forlot1-35/+0
Cleaning, there is no point to test if we do not receive events Change-Id: I28bc46d7b933c851f716466ad0d97b56cca3d95b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-22Default output format to TAPRomain Forlot1-1/+1
As it is the most common used in AGL environment. Ptest is almost the same and only need a little sed script to be compatible and Jenkins have a TAP plugin that also handle TAP test results. Change-Id: I9f367a01417121aad35753536adece27b3ca0f7d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-22Redirect LUA stdout to a fileRomain Forlot1-0/+1
This is made to have all tests results in 1 place else they will lie in the binder log journal. Change-Id: I60293230bbd8252d1ed947bba7c9583f5957e01e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-22Make the binding root directory availableRomain Forlot1-3/+4
This lets the test lua scripts use this variable to be able to retrieve fixtures files which lie in the 'var' directory Change-Id: Iad321706bd05dfb8e5f0423a15d710fdc540c154 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-22Enhance afm-test scriptRomain Forlot1-6/+18
- Create a cleanup function to be called in case of error - Assume the app home directory to be able to retrieve the test results log file. - Use a sed script to make the output of test results compliant with ptest. Change-Id: I6e3f0ca59a1ca8fc7537955c440a4c55196b9ec6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-21Migration to binding version 3Romain Forlot5-18/+18
For compatibility between different binding versions Submodule app-controller-submodule e3f2c45...4386ec5: > Migration to v3 > Adds v3 function to get binding settings > New function returning the binding root directory > Change the default GLOB pattern > Fix wrong computed length > Add path to the installed widget path. > Controller: Converted README to a gitbook version. Submodule conf.d/app-templates 9c1a0fb..f0b24b0: > Rollback about TEST build type > Adding a TEST build type > Change default compilation options. > Test widget only if there are test materials > Handles more test LABELS. > Missing flag for COVERAGE build type > Create a test widget Change-Id: I4f96cc6773ec4da7eba96f243d6bf06170ef0cb0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-21Wrong file name searched specifiedRomain Forlot1-1/+1
Wrong file name searched specified in the log message. Change-Id: I39d70797191de4cee966dee2793e866b7ab3cbf4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-21Fix: segfault using several test filesRomain Forlot1-3/+5
Fix: getrootdir function usage that needs the context to be passed. This closes file handle before going to the next one. This was causing a segfault on the second file reading. Change-Id: I1d7459e29f9b8725dcbce1a277a10d3adcd4c856 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-21Adds afm-test script in the build directoryRomain Forlot1-0/+26
Then it is possible to use Yocto to retrieve it and include it in the rpm that will be installed in the target. Change-Id: I2038ca67ea62865351436daf48193d1b972d65e2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-16Search in the binding root dir for lua materialsflounder_5.99.3flounder/5.99.35.99.3Romain Forlot2-2/+7
Change-Id: I09f174c99488ff104aaa7995e1575a5e5aa3a0c0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-16Add path to the installed widget path.Romain Forlot2-5/+21
This resolv the link to the binding aftest library then set the dir path to the widget installation location. Depends-On: I5db247fd9925065684e036d8d458c2131006f9db Change-Id: I4c49b930181a813d0ef3c2d873455a4ac7721206 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-16Use new AppFw feature to find a libraryRomain Forlot1-2/+6
Use new AppFw feature to find a library location. This will help to find the library that hold a binding which could create several different APIs. Depends-On: I70aad7d523ece7a2ae0058b79708a02ef81144e2 Change-Id: I1454eb8ea661d4d3854b344cb989fc05e2704a77 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-16Fix wrong language and auto-versionningRomain Forlot1-2/+2
Version is handled by the app-templates if PROJECT_VERSION is not set. Adjusts pattern to match lua files location Change-Id: I40052e86d5f55ef2c43f9f1266e1ac3fe14db0c8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-16Added afm-test scriptRomain Forlot2-0/+65
This script will be in charge of launching the test binding app. Change-Id: I34d74d173f9f00d916a61b912b0e285b350ead99 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-08Tested and added doc on updated assertEvtGrpReceived functionsCorentinLGS4-21/+18
- Tested changed assertEvtGrpReceived functions - Updated doc about it Change-Id: I91725152e54ebba9d65e501da54a72801699c760 Signed-off-by: Corentin Le Gall <corentinlgs@gmail.com>
2018-08-02Adds a new directory to search for pluginsRomain Forlot1-2/+2
This adding is to find LUA plugins that aren't located to the same directory than C plugins. It uses 2 variables INSTALL_PREFIX and CMAKE_INSTALL_PREFIX because of CMake's files inclusion order in the current app-templates. This will be needed until app-templates migrate as a CMake module. Change-Id: I06bffbc60f132c08eca0cf0793d7c3f25f0524ad Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-02Bump submodulesRomain Forlot3-0/+0
Submodule afb-helpers 764c355..f0ce5b6: > wrap-json: Fix duplicated lines in header file Submodule app-controller-submodule b79a761..4e30eb1: > New defaults useful functions on lua table > More precise log message when loading a Lua file > Fix: wrong legacy function signature Submodule conf.d/app-templates f94e45e..9c1a0fb: > Fix: interpreted '&' character > More accurate comment about widget template file. Change-Id: I5d18b1005e797f2297c6766266abcbdbc65816e4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-02Fix: wrong terminating character handlingRomain Forlot1-3/+3
snprintf include the terminating character when it writes to the buffer. Change-Id: Idca1050deb9af64de1fdd4f08744166b2fa144b1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-02Move useful functions to lua_utils.cRomain Forlot1-8/+0
This make table_size function accessible by default in all lua scripts. Depends-On: Ia549315e305dd7d02b975a3e8a1278c4ab709eec Change-Id: I312c79581ab3eaef72c1b5725982a70515c62a2a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>