Commit graph

18 commits

Author SHA1 Message Date
6f5e8386eb Add tests for local uuid and os.clock
To get execution coverage of bc.lua to 100%, add two more tests:

1. The first one ensures that os.clock is used properly when
   computer.uptime() is not available.
2. The second one tests the fallback implementation of uuid generation
   when uuid.next() is not available.
2022-12-23 15:40:23 +01:00
c4e0d9dfe7 Improve test coverage
Add missing tests to fully cover the BaseControl codebase (execution
coverage).  The only missing pieces are now uuid and os.clock coverage.
Importantly, these changes do not guarantee full coverage of failure
modes - but at least more possible failures are covered now.
2022-12-23 15:29:01 +01:00
4a5349be96 Switch from lunit to u-test
lunit is unmaintained since ~2011.  Switch to u-test [1] instead which
seems to be more actively maintained.

[1]: https://github.com/IUdalov/u-test
2021-01-29 22:11:16 +01:00
0d852d7aac Make cleanup more robust
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-19 14:13:49 +02:00
2b935b87e4 Add timeout to call_sync
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:49:37 +02:00
253e04ff5d Implement batch register
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:41 +02:00
50ae923ef7 Add late installed listeners
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:41 +02:00
c33fdd41a6 Implement listen cancelling
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:41 +02:00
719201e950 Implement listening
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:40 +02:00
8fb07e22cc Implement close()
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:40 +02:00
d6aa1637f1 Test fixes
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:40 +02:00
b9c3674755 Actually make bc timeout
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:40 +02:00
9f10348b58 Implement finalize
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:40 +02:00
1b73d0d04c Make get and call_sync error
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:40 +02:00
4b5fcf3d99 More tests
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:40 +02:00
888ad288af Implement call_sync
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:39 +02:00
e4f19c3e20 Implement simple verb calling
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:39 +02:00
c6bbdcf984 Modularize tests
Signed-off-by: Rahix <rahix@rahix.de>
2019-04-17 12:42:39 +02:00