summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-07-10Make Built type overwritten by cli possible.Romain Forlot1-8/+2
Settings a CMAKE CACHE variable make the first definition to be not overwritten by a next assignement. Then a cli variable is then possible more without force. Change installation prefix to point the same than afb-daemon. Change-Id: Ia3cb60e9ea16897bbeee117d8b8170e4ed793edd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Change function testCustom to describeRomain Forlot1-1/+1
testCustom isn't explicit and could confuse people "describe" is more the usage with test framework Change-Id: I270048640226e4be1355ed8b4e201ad81198d004 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Bump submodulesRomain Forlot3-0/+0
Submodule afb-helpers 9a1f7ea..5811a53: > At search, use the prefix parameter as a prefix > Remove deprecated use of cmake/Qt macro > Rename method to avoid conflict with Qt's one > Fix warnings due to json-c evolution Submodule app-controller-submodule 9622138..e45d063: > Execute ConfigExec only if section is existing > Always set the api member even if NULL. Submodule conf.d/app-templates aa68dbd..eec9f07: > Fix: SYSROOT location detection... Wrong test. > Change the default debug compilation options. > Clearer coverage compilation options configuration Change-Id: Iec276d139a70b425cab852a41802dc071c6ca3f2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Added a pkgconfig file with the projectRomain Forlot2-0/+35
Goal is to provide a file to get binding installation path easily from other bindings and be able to use it Change-Id: I09025cfcc568b517da7e48b5a96dece64426f81f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Files reorganization and rename project to AFTRomain Forlot20-473/+14
Change-Id: I2e4adc51bdf5fcb9001c68fb4fc71f4987da47e0 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Binding now talks to the client8000ff1-1/+8
- Resonding after a the test verb has been called - Sends the test results through an event Change-Id: Ifc52ca2fdd272777ba42c97c8d4424cf75c05553 Signed-off-by: 8000ff <clementmallejac@gmail.com> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Continue Mapis works WIPRomain Forlot6-9/+20
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-10Remove log monitoring capabilityRomain Forlot1-10/+1
Tests should not rely on binder logs messages. Change-Id: Ic274cb5600924100dde48fb7d3d31fc367b1c5cd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Add an exit handler also in LUA.Romain Forlot2-4/+9
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 Controller submodule:Romain Forlot1-0/+0
Submodule app-controller-submodule 10c0afa...9622138: > Ability to add a plugin after the initial load < Retrieve a section from config by its 'uid' Change-Id: I7c9ad1cf02c083414950376f581a1fd6e9f0016c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Update onload to testVerbRomain Forlot3-3/+13
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-10Update app-templatesRomain Forlot1-0/+0
Submodule conf.d/app-templates 1f2944e..aa68dbd: > Don't overwrite the autobuild script if it exists > Disable the in-tree build method. > Detect Yocto as OS distribution Change-Id: I646fcb5a1dae71e46e2044ae19a1b04be2e23f72 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10First draft for mock apisRomain Forlot9-65/+189
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-10Submodule app-controller-submodule d7e260c..10c0afa:Romain Forlot1-0/+0
> Retrieve a section from config by its 'uid' > Be able to dispatch required api at the wanted time > Change LUA package path at LUA interpreter load > Don't load two times a plugin even for LUA > Fixed hidden bound variable (apiHandle) > Fixed null value when push Lua arguments > Adjust to compile with incoming bindings v3 Change-Id: Ie6a448005ffa9d13fdb2238c7abcb99383145554 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Began Mock API implementation WIPRomain Forlot5-2/+142
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-10Redirect print to a file in addition of standard outputRomain Forlot1-1/+13
Change-Id: I3cd556d8dba9b2d30d169da15a1f09de7ccc2b10 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Remove low-can testsRomain Forlot7-1672/+0
These tests should lies in the low-can git repo. Change-Id: I87c679fc2d3024c22191dc98bb99290f5fd19eca 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-10Rolling back pull request, that shouldn't be merged.Romain Forlot2-70/+15
Change-Id: I56f9c7446dd603f098010344dc661317d065518c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Update helloworld.luaCorentinLGS1-22/+0
Change-Id: Icb1c56cc369fcc5f85cb71257b53c554287e63f5 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Added test exemplesCorentin Le Gall1-0/+78
Change-Id: Icf8eb2214c77575029de0a44916b8391a7f5102b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Add relative etc, var directories to search pathRomain Forlot1-2/+2
The test would be stored in the tested binding and not the test binding so lua file and json configuration would have to be found in the tested binding root directory. Change-Id: I1c60ff7b31fd14ca7a88e1eaaaa4212428cbfca1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Handle string or array arguments for "files" keyRomain Forlot3-5/+7
Change-Id: I16b6dedfa4c2fee866463c6df235505bc68a358c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Add the helloworld lua example code to the READMERomain Forlot1-56/+87
Change-Id: I29565b8b879ccac9fd8dfcdd6862fdb91cd60119 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10CleaningRomain Forlot1-84/+0
Change-Id: Id264b4b0a90cbb4684fc91db6e2e4103216483aa Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Update README with luaUnit functions documentationRomain Forlot1-0/+270
Change-Id: Ifc59139b1dd0818d85057bb4fe38970656983c3a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Added alias function to the READMERomain Forlot1-0/+2
To improve readability of tests we need a function to reset the receivedCount on event or log messages then we can assert in a same function that it has been received and not received. Change-Id: If08f24732c78797a0ef36b780e9620474d95f70d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Extend and added dedicated coverage test fileRomain Forlot2-2/+63
Change-Id: If087d52db631e8accc3fa81f13c91554b150c7f9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Added Not Received assert and test functionsRomain Forlot1-2/+25
Change-Id: Ic5bdbb9c57144acac2ca54c0c60ef202766c5704 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Adapt low-can test cases to the new test frameworkRomain Forlot1-73/+20
Change-Id: I6868b6bd5919dfc5d1e9c938febe2f29be99ddfd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Execute Callback in assertion is more usefulRomain Forlot1-6/+6
Indeed we need to be able to execute a callback to improve the assertion so it has to lies in the assert and not the verb Change-Id: Id835d76c1984087fb815db207c89cfe650f6240c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Fix: renamed key api to traceRomain Forlot1-1/+1
Change-Id: I7bae735e05e0fb753816bb555034936c60d33789 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Fix: infinite loop of event fired by test bindingRomain Forlot3-8/+19
Restrict which api are monitored to avoid daemon log messages to be infinitely generated. Change-Id: Ie527267985ca8035c3f410be1d775f3214feac2c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Add the ability to assert daemon log messagesRomain Forlot2-32/+92
Change-Id: I392dc677061223d4990a12517606e9ef9142d515 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Simplify the writing of configuration.Romain Forlot2-17/+28
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-10Add a ReadMe.Romain Forlot1-0/+402
Change-Id: Ibfb4f8f11399b55edb6e07ca3421674421801fc9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Add possibility to create custom test functionRomain Forlot1-0/+6
Change-Id: I83de0cc0edce37cb0d512fce0cec560659f625a7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Update config.cmake, cleaning deps.Romain Forlot1-4/+2
Change-Id: I5b0dfb9a08fe687c18ad0f86e255e6b5ef589dc9 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Implement event part of test frameworkRomain Forlot3-59/+160
Change-Id: I77151a668f89671e0391a90be2559d61dc0e5ec4 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-10Update submodulesRomain Forlot3-0/+0
Submodule afb-helpers f5f1e25..9a1f7ea: > wrap-json: new helper functions for comparison > Removed anonymous function in ScanDir and fixed warnings > wrap-json: Add clone facility > Disabled debug code (only used for testing). > Correction to include dynamic api correctly > Fixed build warnings with gcc >= 7.3 > Added afb-helpers-utils.h > Fixed compilation warnings with gcc-7.2.0 > Fixed spelling Submodule app-controller-submodule 690bdee..d7e260c: > Remove declaration to not existing functions > Add 2 lua utilities function > Update README.md for new metadata keys. Submodule conf.d/app-templates 6621af0..f65761c: > 02-variables.cmake: Avoid checking CXX version if not required > config.cmake.sample: Remove dependency to libsystemd > config.cmake.sample: Remove dependency to libmicrohttpd > Added -D_FORTIFY_SOURCE=2 to CFLAGS > start-on-target: uses RSYNC_PREFIX path for config > Fixed spelling. Change-Id: Ic78f99b3737ffb87220e2d11183d3c5554ff2a81 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Add a Application Framework TestRomain Forlot7-9/+313
Change-Id: Ic786bab6df777f62ff2156ea18156389c8aa79e3 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Use latest version of submodulesSebastien Douheret4-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-10Fixed CMakefile target namingSebastien Douheret2-2/+2
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
2018-07-10Fix wrong commit recorded for controller submoduleRomain Forlot1-0/+0
Change-Id: Ibb680391749e7e2e9569cd669a97bf9a99c4e1e6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Adding more material to do testsRomain Forlot10-69/+1636
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-10submodule updateRomain Forlot2-0/+0
Change-Id: Iab4d51428c313bcead8fb8a045ec8aae540ef4dd Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Update controller mechanismRomain Forlot13-121/+3250
Add luaunit as xUnit lua framework Change-Id: I49627b6554c62d05eca5e367d073b037385e40b1 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
2018-07-10Initial commitRomain Forlot27-0/+1241
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>