Commit graph

15 commits

Author SHA1 Message Date
Rafael Zalamena 2a76b0a8e2 topotest: fix Lou's framework command wait
Fix two main issues:

  * Don't use float to figure out if we spent the time user asked;
  * Don't depend on system clock to find we reached the end of time;

The fix is basically pre caculating the amount of wait cycles we are
going to peform and use a counter.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-07-23 10:26:15 -03:00
Donald Sharp 44d2a6775b Test: Add back a bit more debugging to see what is going on
All debug logging has been thrown to the floor in this loop.
Add it back in and additionally add a bit more debugging to
know what is going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-07-18 07:50:10 -04:00
Lou Berger d850e66733 topotest: reduce chattiness of lutil output
Signed-off-by: Lou Berger <lberger@labn.net>
2019-06-26 20:30:59 +00:00
Lou Berger ffd3f54493 lib: more logging to aid in failure debugging
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:14 -05:00
Lou Berger c941311fef lib: lutil - fix test numbering, add test number to command logging 2018-11-27 20:22:14 -05:00
Lou Berger 518874f48a lib: fix path the led to group_nl_converted being referenced when not set
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba c63906e8cf lib: lutil matching without changing newlines
Prior behavior of luCommand was to convert newlines to spaces in DUT
output before pattern matching. New method operating in parallel uses
re.DOTALL to mimic same behavior and allow preserving original DUT output.
The original output is needed for some scripts that parse line-by-line.

There is also some test code to compare match results using the
old way and new way and log a message if they are different. After
some short time we can develop confidence that using this new method
will not break any existing tests.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
G. Paul Ziemba f7af60f202 lutil: expose result method
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger cc3cf6a883 lib: lutil - fix test counting, add returnJson flag
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger 4348027f3e lib: add script name to summary output
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger 66c5287ec0 lib: add luLast to get last found luCommand regex match
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger 9e219b9af7 lib: scope life of Lutil and _lt to a single test run reorg to support regression environment
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:13 -05:00
Lou Berger 50b15737c9 lib: lutil - make it easier to spot command output and null output
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger 2fdcc34250 lib: lutil - make requested error logging change
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Lou Berger a582a8e9c5 lib: lutil cleanup move utilities/lutil.py -> lib/lutil.py add: luShowFail, CallOnFail, luStart parameter to set log dir change default wait to 10sec
Signed-off-by: Lou Berger <lberger@labn.net>
2018-11-27 20:22:12 -05:00
Renamed from tests/topotests/utilities/lutil.py (Browse further)