Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
Change-Id: I594c31238a0afc47f90cc97be82f3044a5052d67
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I09f174c99488ff104aaa7995e1575a5e5aa3a0c0
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
Change the way to assert the reception of a group of event. To be able
to know the attended event count it is better to define it directly when you
pass the table of event group. The event name as the key and the number
of event that you are waiting for. Also returning the total of received events
instead of 1 then it could be asserted to the expected total count.
Fix: segfault when manipulating data history values:
There was a segfault and random unexpected behavior when attempting
to access old event's data. Only the last one was available and trying
to access older values lead to memory access violation as the JSON
representing the old data has been released since. So it completely
mess up the memory and causes unexpected situations.
This is simply fix by deep copying the data into another memory space
which could be safely accessed afterwards.
Changes the way to receive events from monitor api:
The old method isn't accurate because it tolds monitor
to trace all api request and all push_after event from that
api. But we only want event from the api not the others messages
coming from the binder which aren't event.
Change-Id: Id5aa4a0c79d2adba050ef03d58c45a3db72ec2a2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Processing both event coming from the wanted api and from
monitor (which gave the same event but with more informations)
leads to unexpected behavior since you can't know which event's
data has been registered so data structure changes and can't be
asserted.
Change-Id: Ifb32c9fdb3b6cc061d0fe5e8d1e5481d51e8d886
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
Very helpful for setup and/or teardown of a test scenario
Change-Id: I068e779a6812bb89bc65646eda2c0271387513d0
Signed-off-by: 8000ff <clementmallejac@gmail.com>
|
|
-Changed event.name to eventName and added a condition in _AFT.triggerEvtCallback.
-Added tests functions to assertEvtGrpReceived functions.
-Corrected a mistake in _AFT.assertEvtGrpNotReceived.
Change-Id: Ic0f72ac9789f5056dd628d950fa53f54b3a82112
Signed-off-by: Corentin Le Gall <corentinlgs@gmail.com>
|
|
Then it is possible to compare an event data with past event
data. Also rationalize the code to invoke the event's callback
Change-Id: I4309e0643d4c21c44d8fef510507e28745a9f83d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
Typo.
Change-Id: I3bb3639dfbeae1ffbf1f4912e8b30e9c8bc1cc49
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
This lets you retrieve print messages done by the test binding
in a file log in addition of binder runtime log messages.
By default, the standard output is redirected to a file
in the workdir of the binder.
This is convenient when you have a heavy loaded binder output. It's
more difficult to extract the test results.
Change-Id: Ifae540652ae431d4d9703a19673e5bc69c2b315f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Fixed, tested and documented setBefore and setAfter functions.
Improved doc for updated functions in aft.lua.
Change-Id: Idc7ffc06e98ef7f6af1e06d9e6cda0dcbd4f97b8
Signed-off-by: Corentin Le Gall <corentinlgs@gmail.com>
|
|
warning: it may be possible to do better than that but the ev catcher is
called at the next loop
Change-Id: I2d69322f4079ccda0c85968861b8a9d0c4457855
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
|
|
this function handles to wait for one specific afb event
Change-Id: Ief730b6b5f2109379ca0191d98b013d1c9e4225e
Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
|
|
Either you specify the functions as a function argument
either you use a specific _AFT functions meant to add the
function to the test instance.
Change-Id: I4ccd467c70d2181d12edb354f80db6c233b8769d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Change-Id: I0098beeed06482ca08dc1e1ae235206f6b02032f
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
3 Cases are done:
- before and after all tests
- before and after each tests
- before and after specific tests
Change-Id: Ie222e6a3809a14d71a822b084a27ed93ec7bb286
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
afb-test is considered like a binding "system" which could
be retrieved using pkgconfig file variable.
Change-Id: Icc9a0186093c98817e1a421d7ddee8043a33efa1
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Add the ability to set a context before each and/or tests
as well as unset it with the corresponding "after" function
We now have the following function to define those functions:
setBeforeEach
setAfterEach
setBeforeAll
setAfterAll
Change-Id: I12b3d4f187ee066d5051ca07c644c45de8886f82
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
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>
|
|
Change-Id: I2e4adc51bdf5fcb9001c68fb4fc71f4987da47e0
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|