summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2019-11-26Fix event management in test frameworkhalibut_8.0.5halibut_8.0.4halibut/8.0.5halibut/8.0.48.0.58.0.4Frederic Marec1-1/+2
Fix event receive Fix event not receive Fix lockwait event Remove trailing indentation Bug-AGL: SPEC-2374 Change-Id: Ie64b23c242bc13dcf7af96ff3ed2316bf6cad5f7 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh> (cherry picked from commit 5c3503e35c1b883e97ed6874f7683d0a7b5938b7)
2019-08-06Remove duplication include filehalibut_8.0.3halibut_8.0.2halibut_8.0.1halibut/8.0.3halibut/8.0.2halibut/8.0.18.0.38.0.28.0.1Li Xiaoming1-1/+0
ctl-config.h is already included in mapis.h Bug-AGL: SPEC-2422 Change-Id: I8743d8e49d067e25f6b13c2216f83fc296a4e36d Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
2019-01-24Handle event in core bindingRomain Forlot1-33/+52
Prefers to handle the events reception by the binding, in C, rather than using the LUA interpreter to avoid race condition on the LUA context. Because we are waiting events in LUA context using binder call sync, when the event is received then 2 threads operate simultaneously on LUA context, the waiting event thread and the receiving event thread. Bug-AGL: SPEC-2135 Change-Id: Ied0a78a61263b8fd41305969c636a491c6bb0295 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2019-01-24Git submodules migration to separated librariesRomain Forlot2-12/+2
Migrate submodule to use the afb-helpers and controller libraries. Find them as packages not only link against them like before. - Remove the submodules - Remote the target link on target - Add dependencies to afb-helpers and appcontroller packages. Bug-AGL: SPEC-2139 Change-Id: I79da3a84bc1ee020924bb51f0eaed85a99ba7288 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-11little memleak fix.Romain Forlot1-1/+4
Change-Id: I9288ef2f2f9d37de993164dd454fc75b69f44abf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-12-11Clean way to wait for an api's eventRomain Forlot1-2/+64
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. 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-11-30Bump app-controller-submoduleFrederic Marec1-0/+2
Bump app-controller-submodule Fix ctrlConfig following app-controller-submodule modification Change-Id: Ifd93d20bbff336420f478229f640d8304b502fc4 Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
2018-10-31Migrate app-templates to CMake moduleRomain Forlot1-1/+0
Bug-AGL SPEC-1682 Change-Id: Icf7eb9765483e1cf1c74a9d64cdb0178f773936d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-10-24Clean the code.Romain Forlot1-6/+0
Change-Id: I4111042fe0bb1084c9dcd1b978fa96163bd40f9c 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-09-07Use controller new behavior that add objectsflounder_5.99.6flounder/5.99.65.99.6Romain Forlot1-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-21Migration to binding version 3Romain Forlot2-17/+17
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-16Add path to the installed widget path.Romain Forlot1-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-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-02Some fixesRomain Forlot1-30/+30
Fix: No events defined in the mock apis Fix: new_api function has changed in binder Using the dynapi new_api function returned 0 in case of success and -1 on failure. New function since v3 returned NULL in case of failure or the api struct in case of success. Fix: wrong install_prefix variable used in CMake config file Fix: wrong variable used Typo after a copy/paste from event group handling. - Wrong use of table.insert - Wrong variable name used - only pass the data table, which is embed in another data table... - Fix aftereach and beforeeach function's call Change-Id: I9523ae50c170a3cdb9e5c3bc2b9e923c30f6ba39 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-02Add the binding root dir to the config search pathRomain Forlot1-5/+10
Change-Id: Ia067ce46f13bc49b6050522d0484f92627968ff1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-08-02Changed the way to load new test apisRomain Forlot1-22/+48
Now you could load supplementary tests api by providing either a path to a JSON configuration file or directly a JSON object representing a test configuration. Change-Id: I3145c28aaea482b934e9f9fed6f2969e32da5901 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-26DynAPI > V3 migration of afb-test binding.Romain Forlot2-16/+16
Controller is still using dynapi and preV3 version. This is a preparation for future controller update to V3 Submodule app-controller-submodule 88892db..b79a761: > Split loading JSON controller file. > Release arguments once C function returned. > Fix : typo introduced in a previous commit. > Fixed character counting that was shortening paths > Keep json unmodified during action execution Change-Id: Iba37b3fbd35e58973b9601a7f91bfdb61abcf76f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-26Create new test api from a json filepathRomain Forlot1-32/+46
Implement a new verb that start a new controller from a JSON filepath provided as argument. Change-Id: I498a0f24627357d93ac795cb034dc93dd0e84e62 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-21Fix: events callback aren't correctly registeredRomain Forlot2-14/+20
They were stored in the mapis sections instead of the events one. Clean and handle raw events as well. Before that it could only process events coming from monitoring api. Now it could receive the event directly. Make sure that the event handle is valid before sends the request response. This prevent to subcribe or push an event while the event handle hasn't been correctly created. This could happens if the testVerb hasn't not been called from a session. In that case, the response will just be that tests has been launched. Format. Change-Id: I0aa522939162684f91dd426cc14919bb0ec3f69e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-19Search the conf file using env and static variablesRomain Forlot1-6/+17
This helps finding configuration in several locations by concatenating environment variables and hardcoded variables. Then it is possible for the apps to retrieve its files or values in any environment (native, board, sdk) more easily. Depends-On: I0ad19242612559d1f4b66b6f9af9e7032d4675a8 Depends-On: Ic448ff017e6158bec05895d63688b8968b5c6434 Change-Id: I26a725c368e8354cfc2531d58de6dc362f7d0618 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Handle Mock API's eventsRomain Forlot1-3/+38
Add each Mock API event's action to the Mock API controller section. Change-Id: I072b7f2c610cf28760880e02629cafd38dafeb6b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10APIv3 + DynAPI compatibilityRomain Forlot1-1/+1
Change-Id: Ice73800c3ee110c641b9a0147bef238c537ef43f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Files reorganization and rename project to AFTRomain Forlot3-3/+3
Change-Id: I2e4adc51bdf5fcb9001c68fb4fc71f4987da47e0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Continue Mapis works WIPRomain Forlot3-8/+12
Beginning work to handle events from a Mapi. Also rename old fapis file to mapis and some format Change-Id: I30bedcbe13cac9568e21cd3a0947516e74dde271 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Add an exit handler also in LUA.Romain Forlot1-4/+0
Needs to make it as a parameter tested at the end of afb request call "launch_all_test". Change-Id: I87b93aae67561e5aec0a138bfbdc0dabac3bdc21 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Update onload to testVerbRomain Forlot1-1/+11
Then tests are executed at verb call instead of at the binding launch Change-Id: I133c203c28f561dd6d4242bf8c78bfcf71f73209 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10First draft for mock apisRomain Forlot5-62/+92
An m(ock)api is a plugin with its action as verb. About now the event listener is the same then the main api Change-Id: Iadbbb60cfbe9d5ef85801c346e6565ccde92b0c4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Began Mock API implementation WIPRomain Forlot4-2/+83
Change-Id: I30782e272cad5da75950d7983f9504dac6d24676 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Don't specify a path to find the aft.lua fileRomain Forlot1-2/+1
This let the controller find it in CONTROL_PLUGIN_PATH instead. Change-Id: I61d5160e45daf6882426206298d8574b4527bc5c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Make the require_api at the right step.Romain Forlot1-9/+5
Also ConfigExec isn't needed to be at the outside of the init step as we don't need to call the dynapi Change-Id: Id4c4d063137f8afdc84fbc3cdcc37a964baa2a66 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Simplify the writing of configuration.Romain Forlot1-3/+23
As resources and events are "static" hardcode them in the binding. Change-Id: I9dd600fa6cfe0d2f5f55cf605ce75d8c5446d78d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Fix binding initializationRomain Forlot1-12/+9
Change-Id: I1cacb160bccdbfca5001cd8a52a0383dd73e1403 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Use latest version of submodulesSebastien Douheret1-1/+1
Changes of afb-helpers: (c7cd527 - Sebastien Douheret) Removed anonymous function in ScanDir and fixed warnings (98c64ea - José Bollo) wrap-json: Add clone facility (5ae2a7a - Sebastien Douheret) Disabled debug code (only used for testing). (563bdea - Jonathan Aillet) Correction to include dynamic api correctly (9685413 - Sebastien Douheret) Fixed build warnings with gcc >= 7.3 (f250572 - Thierry Bultel) Added afb-helpers-utils.h (f9f7e1e - Thierry Bultel) Fixed compilation warnings with gcc-7.2.0 (c0c40af - Sebastien Douheret) Fixed spelling Changes of conf.d/app-templates: (66f7bc8 - Thierry Bultel) start-on-target: uses RSYNC_PREFIX path for config (e400fb3 - Sebastien Douheret) Fixed spelling. Changes of app-controller-submodule: (690bdee - Jonathan Aillet) Fix a compilation issue due to modif of AFB_ReqSuccess (4063ff0 - Clément Bénier) README:md: update README accordingly to new json scheme. (e9f423a - Sebastien Douheret) Fixed crash due to call to json_object_put (ce3e14c - Sebastien Douheret) Fix segfault when printing long message from lua (6838dff - Sebastien Douheret) Fixed spelling of AFB_ReqSuccess (5b079d4 - Jonathan Aillet) Remove an unnecessary variable (ddd10be - Jonathan Aillet) Make parsing of action loading non blocking (540522a - Jonathan Aillet) Use an external file for app fw functions link (50feaf0 - Jonathan Aillet) Use macro to test request validity (bcd9efc - Sebastien Douheret) Fixed build warnings with gcc >= 7.3 (0e30275 - Jonathan Aillet) Increase lua script max message size (263731b - Jonathan Aillet) Prevent lost of config file path when searching (8ce6d20 - Jonathan Aillet) Correct way that api actions are handled in controller (64671ea - Jonathan Aillet) Handle more metadata in the controller. (53bc4e4 - Jonathan Aillet) Add possibility to set prefix to NULL in CtlConfigScan (4a72302 - Thierry Bultel) Fixed compilation warnings with gcc-7.2.0 (4b4a05d - Jonathan Aillet) Add an external field to CtlConfigT (a070489 - Romain Forlot) Make action item from a LUA action mandatory (dcc27f2 - Romain Forlot) Handle no prefix given (a68eba9 - Romain Forlot) Good usage of strncat and strncpy (2acfbf2 - Romain Forlot) Update to the new JSON syntax (d02408c - Romain Forlot) Detect failure at OnLoad action calls (fd225dd - Romain Forlot) Improve reliability and function calls Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-07-10Adding more material to do testsRomain Forlot2-50/+17
Make the lua interpreter find the luaunit module. Find a way to use it from the controller. Adding canreplayer file and write a script that could launch in background the canplayer. No process handling by now which have to done in the next step Change-Id: I2d35472ba0e2fbb03ead121ff2587d831fe4ff17 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Update controller mechanismRomain Forlot2-92/+122
Add luaunit as xUnit lua framework Change-Id: I49627b6554c62d05eca5e367d073b037385e40b1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Initial commitRomain Forlot3-0/+230
This is the skeleton, it compile but there isn't tests implemented for now. Change-Id: Ie810a9eb23d58797bebd6b64b00682238e4bd732 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>