summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13little memleak fix.Romain Forlot1-1/+4
Change-Id: I9288ef2f2f9d37de993164dd454fc75b69f44abf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Handle more argument's type when making a subcallRomain Forlot1-1/+5
Calling an api's verb may require to use other things than a JSON object, so this add the possibility to use the other JSON types: string, number or boolean. Change-Id: If95aa35241ea3b11e88e82e7dbdd3e462b4f9eff Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Clean way to wait for an api's eventRomain Forlot3-57/+122
Modify the way to wait for an event. Here we call synchronously a verb of the test api that will end when a timeout expires or when the reception of the event ends the request Useless set up of verbosity to debug for the monitoring API. "push_after" messages could be caught without setting up this. Bump app-controller-submodule: Submodule app-controller-submodule 303022b..4ddd789: > memleak fixes > Retrieve by default an int64 instead of int > New function to retrieve Api's name from LUA > Handle number and boolean to subcall an api's verb > Fix: compiling a controller without LUA support > Fix Parse plugin > AFB:servsync: add string for query argument Bug-AGL: SPEC-2003 Depends-On: https://gerrit.automotivelinux.org/gerrit/#/c/18583/ Change-Id: I24af6bae6a9aa0f70f3b78304134a65e09f12a58 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Limit the monitoring to events not to the requestsRomain Forlot1-2/+2
Improve the accuracy of the monitoring trace filtering, spying the requests isn't needed anymore. Change-Id: I0177346c27914df99027cb0324e20ee43e702e8d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Add new assert verbFrederic Marec1-1/+1
Add assertIsTrue verb who allow table and string argument Bug-AGL: SPEC-1983 Change-Id: I8a13b7cdd8d4b841c37e732ffa225b4b9822fad8 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-12-13Bump app-controller-submoduleFrederic Marec2-0/+2
Fix plugins loading after app-controller-submodule modification Now plugins are holded in the controller configuration structure. Submodule app-controller-submodule ce07538...303022b: > Reworked pluginConfig function > Retrieve plugin list from api rather than a global > Add setter/getter for user free defined pointer > Pass the plugin to action. > 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' < Abort if one required API is missing > Add an Init step to the plugins load < 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 ctlPlugins array to the ctlConfig structure < Add an Init step to the plugins load > Add gitreview file for flounder branch Change-Id: Ifd93d20bbff336420f478229f640d8304b502fc4 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Move autobuild to top treeFrederic Marec2-26/+42
Bug-AGL: SPEC-495 Change-Id: I584b5fb287bef3bb6a466000d5c8aeb167fb7690 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-12-13Change exit message depending on exit reasonRomain Forlot1-1/+6
Clarify the exit message in case of binder timeout since the default timeout is 3 seconds, it may not be sufficient. As the timeout command, return exit 124 in case of timeout and 128+9 when killed (signal 9). Change-Id: Ia6197c65a32b6fe547fc18115e8c21f572cfcc2b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Packaging: Set project version using command-lineRomain Forlot2-2/+3
When packaging, the build environment doesn't clone the git repository but instead use an archive and so we lose the git repository's information. This is a workaround to set the project version using the packaging system. Change-Id: I3e8edc197a12f455f4f1cc24bc452feb146bab6c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Improves packaging debian rulesRomain Forlot5-100/+25
Change rules to be more sustainable and maintainable. Remove the patch that isn't needed anymore since the app-templates has been migrated to a cmake module. Fix also wrong descriptions Change-Id: I789b18d8238015bd9e0350ae39136002b10bed51 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-13Fix packaging for native buildRonan Le Martret4-4/+3
- *.pc file must have ascii charset - remove gcc dependency for deb package - Fix *.pc file packaging for deb package - set CMAKE_INSTALL_LIBDIR in debian.rules Change-Id: I448aedcdb6fd21d662416ac72148d98da5e05ac3 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
2018-12-12Adjust lib dependenciesRomain Forlot2-2/+1
This ensure that the project build under debian like distro and also rpm based distributions. Change-Id: I1c0b49163253f5c9ad06a2cdbc6c7b1b8b739f84 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-12Add packaging materialsRomain Forlot9-0/+243
Files used by an OBS server to be able to build deb and rpm packages. The afb-test binding could be then used in a native environment. Change-Id: Ifd5ab363c90269bed949ff63315d228017de7d05 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-11Docs reorganization and updateRomain Forlot24-694/+934
Docs reorganization and update using the latest afb-test improvments and try to make it clearer. Change-Id: If022cdb46364ef250361bdcd420d45b360f10a2e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh> (cherry picked from commit 2f3654275e44f9719818a848da9a0b576d5a1b53)
2018-10-24Clean the code.flounder_6.0.3flounder_6.0.2flounder/6.0.3flounder/6.0.26.0.36.0.2Romain Forlot1-6/+0
Change-Id: I97f1053940fa78a67c46550063c3b35e802183b1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-24Adds test set markers around each test file launchRomain Forlot1-1/+8
Fix wrong test case markers order... Result has to be after the test case ending. Change-Id: If05a57382879d19fcae33f219141148004f07918 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-24Add Lava markers on output and select test setRomain Forlot3-32/+110
The launch scripts now allow you to select a verb from the test api to only launch that verb instead of all. Also using the verb's argument {'lavaOutput':true}, the test framework adds specific Lava markers. Reformat the script to accept options instead of only positionnal arguments Change-Id: I52539cd2bef460aacb8d327d5abb34ecfd94f512 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-24Bump 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 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh> Submodule conf.d/app-templates 0f25ab2..: Change-Id: I391ef41ca88018c56027ad44b38aef81140cb62a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-24Be 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: I73ce0014d162dbecea443454f85a0e0373345a23 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-24Improve 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: I95f2714054403899424ae5f567903cfa0bbd49f4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-24Fix: wrong output file specified using single argRomain Forlot1-1/+1
Copy/paste error... Change-Id: Icfac57e043a5ff51b69fb07156554bca5b8a1350 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-24Clean 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: I0bc22920c05a349ca5800287170564e6a91ca24a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Shellcheck: protect variable against whitespaceflounder_6.0.1flounder/6.0.16.0.1Romain 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: Id1d91d55b182969e8a5a8d7aed319d16aec0db19 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Test 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: I70c5aaf8d66588b4073cb772163d20344fdaf77c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Unify 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: I4a596dd1d54201a671bb68bf9aca6904286322c6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Update 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: I9af1a099c57fcd3e330fb505b16426309f3fb93d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10get rid of afb-definitionsClément Bénier3-54/+54
directly use app framework binder api v3 Change-Id: Ifb12568026772b32dad94decd2c32eeab904968d Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
2018-10-10Avoid 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: Idbd92c47fafc5c1b75397ec729b29abb49c607b1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Separation 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: Ied7d5b057075478ccf2c4cefc954e9a0f6814bb7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Rename 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: Id14e30024f0b98c29feed5b707ab9dc8b74d3552 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Assert that an event hasn't been receivedRomain Forlot1-0/+35
Change-Id: I594c31238a0afc47f90cc97be82f3044a5052d67 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-10Script for both native and target launchRomain Forlot6-56/+151
Change-Id: I57ac01794ea92e235cb105acb22ab44f5566268b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-09-24Separate output filesRomain 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-10Add gitreview file for flounder branchflounder_6.0.0flounder_5.99.7flounder/6.0.0flounder/5.99.76.0.05.99.7Jan-Simon Möller1-1/+2
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
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>