* Add Junit output file support
* Differentiate between an expected failure test and an error in the
test, as described in JUnit.
* In case of an error/exception during test, record and attach it to the
Test object and continue running the tests, and show it at the end
during the trial report.
Change-Id: Iedf6d912b3cce3333a187a4ac6d5c6b70fe9d5c5
Composing the filter in gen_filter() is more complex than we need. We pass the
address and potentially further filter elements separately, and then
gen_filter() has to guess how to combine these. Instead, have just a filter
string to use right from the start, so that the caller has full control (and
full responsibility).
Remove the addr argument, which was only used for filtering.
This is my conclusion of looking at the patches with change Ids
I62a6ae7bd3a84baceb684c26727d2269c86ed023 (PS 1) and
Icbb0f8d2058fa7ebb7f0f731645f9266cacdb120
I62... PS 2 will add the SSH filtering.
The name 'filter' is a python built-in, which is why I chose the argument
name 'filters' instead. It works with 'filter' as well, but let's try to
avoid naming conflicts like that.
Change-Id: Iff7ddf51d3bf0189ce07b488a3dcdcfce6907aba
No actual failure known, but using the abspath will prevent further problems
when running a binary in its own run dir and passing trial paths to it.
Adjust test expectations.
Change-Id: Ia2ba876a42eef9122a92645edd1f28ddb56e6be3
The idea is that if someone reads the short log and scratches her head, she can
notice that there is a more detailed log available.
Change-Id: Id5f443f1af0dc774d4d4c588a238b786a83e44d3
On the log output, clearly show which state dir is used. Since all runs should
use the same state dir, this is important and/or reassuring to see.
Change-Id: Ie92f1879a35d8bb399ee916b7ef72f9ee7d47409
In the dbus_connect() code path, return the subscription token.
In the Modem class, use this token to disconnect signal callbacks when an
interface is removed.
Generalize the signal connect/disconnect handling: have one tuple defining all
signals and their handler functions, add generalized loop to attach them. Store
all subscription tokens in a dict of lists, any number of signal callbacks per
general interface name. When an interface is announced to be removed from
ofono, detach all signals for that interface implicitly.
So far this only handles the MessageManager interface's IncomingMessage signal,
but others will likely follow soon.
Fixes: OS#2242
Change-Id: I0939ef414bc599ee8742df48da04d8d9569d00ba
listdict came into the code base from some other python code of mine, for no
apparent reason: it is actually not used here at all. However, an upcoming
patch will use a dict of lists.
Also, the listdict implementation is convoluted/complex (to allow accessing
keys as direct object members, which we don't need). Simplify the
implementation to be used by I0939ef414bc599ee8742df48da04d8d9569d00ba.
Change-Id: I09adfd128a19c6c5ba36aae1d4cab83dbd07e0fb
My current distribution ships a newer libcrypto and libssl which are not
ABI compatible with the ones generated by Jenkins. I had to copy those
libraries locally and use LD_LIBRARY_PATH to be able to run binaries
compiled coming from the jenkins slave. Without this patch I am not
able to run it because it is overwriting the previous variable.
Change-Id: Id9b16d13d343616cbf87b9da8a99e3fae48da6bd
Log on level 'log', more clearly show whether it's for reservation or actual
use, show the origin that is asking for them.
Change-Id: I3b78c7bdcaec90943900343c878099160f8d2f64
For each run on a trial, create a log target that logs to a file in the run
dir. Set all levels to DBG in that log target.
Related: OS#2206
Change-Id: Ie7279aeaf32950f85d4145abdc917024003d1d99
Rename log_sink to log_write_func to make it more clear.
Remember the list of log targets as static member LogTarget.all_targets.
Make each LogTarget instance register with the list of targets implicitly.
No longer create a default log target, rather create one explicitly in
osmo-gsm-tester.py.
Change-Id: I5844485eaed536cb34b44bfe23dc635fe1982dcd
Add flag raise_if_missing, and if False, instead of raising an exception,
return an empty list for that kind of resource. This makes sense for a caller
that requests a single resource.
When finding a single resource to use in ReservedResources.get(), use this to
raise a more adequate exception message if none was found.
Change-Id: Ia296ea68a787bede037a6cea38563b570fb0766e
The prompt() is useful for supervisor (user) interaction during tests.
However it had numerous problems:
- closed stdin, so second prompt() didn't work
- no editing
- no utf-8 multichar
- unflexible poll interval (poll often to stay responsive to input)
and unrelated:
- stdin was hijacked by subprocess.Popen
Firstly pass stdin=PIPE to all subprocesses to leave the tester's stdin
untouched.
Secondly use python input() to read the user entry (instead of mucking about
with the stdin fd), and import readline for history and editing features.
The old approach was put in place to allow polling DBus and processes
regularly. Instead, allow this by running input() in a separate thread while
polling regularly and slowly in the main thread.
The prompt code is now simpler, cleaner and works better.
Will be used in the upcoming 'debug' suite.
Change-Id: I580aca52cd038b59418055259d0d09e9aab49124
Collect incoming signals in a defer queue and handle them once the DBus polling
is through.
Related: OS#2220
Change-Id: Ic7520f2165888a4ee0f83b779cd58d20c4e45fa0
trials-cleanup.sh was still using the old 'SEEN' marker and thus didn't work.
In trial.py, make sure that *every* trial that is run is marked as taken, not
only those discovered by Trial.next().
Change-Id: I8aa6b2eece5d43266a7c84e6b2974b8fe7f3cda1
On failure to find an unused resource (in case a test tries to use more
resources than are reserved), the handling code had a bug: print
reserved_resources from the proper source, i.e. suite_run.
Change-Id: Ifdc4201581b3293605196292339e841543ea284e
Allow tokens to be passed for SMS composition, and use that to pass MO and MT
modem names into the SMS text for easier debugging.
Change-Id: I5e0d066ffa7a4631e8568c6cd4f210627f209122
For some reason the code there catches exceptions happening while interfaces
are being established. That's not a good idea, drop it.
Related: OS#2220
Change-Id: Ida7731ed6ff3cad44ff437137abe2d6a424fcaa4
Tweak test expectations to include the new debug logging.
Go through the paths in alphabetical order to get deterministic logging output,
so the test expectations always match.
Change-Id: I11a905b2467cda691d9ccea30ae436bac96476c9
Use it to set root user for SysmoBTS, otherwise if osmo-gsm-tester is
run by another user it will fail to connect
Change-Id: I67d4126fc75cb9c2d249c713cd6f14db1f1e21da
The nested wait was definitely a bad idea. This here is certainly not very
nice either, but an attempt to catch cases where a dbus interface cannot
be used yet despite being signalled by ofono (sporadically happens).
Change-Id: I2ac7eb0f5174250f4b97e2bf758666410d8cb854