Commit graph

17 commits

Author SHA1 Message Date
He Yin Ling
b85e9e5cda tiny-test-fw: support translate backtrace in IDFDUT 2019-03-19 11:24:08 +08:00
He Yin Ling
f11eba7802 tiny-test-fw: support detect exception in IDFDUT 2019-03-19 11:24:08 +08:00
Roland Dobai
bfa9610f58 tools: Fix the Python coding style 2018-12-19 11:56:24 +01:00
Angus Gratton
f6e857c2b9 unit tests: Keep serial port open when running esptool
* Call esptool directly not via subprocess
* Use the same serial port instance for listener thread and esptool
* Includes some refactoring for encapsulation of App vs DUT members
2018-12-18 14:09:29 +11:00
He Yin Ling
5ae3a11c8d tiny-test-fw: fix exception when expect RegEx:
match.groups() could return None. We can't do decode on None object.
2018-11-29 23:06:16 +08:00
He Yin Ling
0ad226b375 tiny-test-fw: support capture raw data in DUT:
test cases might want to use `expect` and get raw data from DUT at the same time. New added capture method provides a way to do that.
2018-11-26 10:07:41 +08:00
Roland Dobai
17b7959de9 Examples: Add Python 2&3 support 2018-09-25 08:05:56 +02:00
Ivan Grokhotkov
fd61c1440b tiny-test-fw: invoke expect callbacks in order of appearance
Previously the callbacks were invoked in the same order as the list of
patterns to be matched.
2018-08-20 16:49:20 +08:00
Angus Gratton
6bd58beac5 tiny-test-fw: Increase default expect timeout to 10 seconds
Fix CI failures due to (for example) DHCP lease taking more than 5s to be negotiated.
2018-08-03 16:55:50 +10:00
He Yin Ling
316d087960 tiny-test-fw: fix exception during print debug info:
DUT log is unicode, might not be able to encode
2018-07-27 19:44:15 +08:00
He Yin Ling
4f971619fa tiny-test-fw: save DUT log in different thread:
We found some SD card on Raspberry Pi could have very bad performance.
It could take seconds to save small amount of data.
If the DUT receives data and save it as log, then it stops receiving data until log is saved.
This could lead to expect timeout. As an workaround to this issue,
``BaseDUT`` class will create a thread to save logs.
Then data will be passed to ``expect`` as soon as received.
2018-07-13 07:04:05 +00:00
He Yin Ling
b452cea04e tiny-test-fw: fix incorrect wait timeout in expect 2018-07-13 07:04:05 +00:00
He Yin Ling
23d98aa358 tiny-test-fw: print expect failure when test fails 2018-07-13 07:04:05 +00:00
He Yin Ling
2b068f3ceb tiny-test-fw: fix misc bugs:
1. configs are not functional
    * decorator will be executed when search case, need to set default config before search case.
2. fix DUT encode/decode errors
    * python3 serial don't support write string/unicode, need to convert to bytes first.
    * python2 string could failed to encode/decode non-acsii chars
3. fix bug that log folder not created
4. fix bug that test suite name is not correctly passed:
    * the keyward arg should be `test_suite_name` not `test_name`
5. fix bug that test stopped on failed case
6. fix DUT `read` don't return all data cache
    * `_DataCache.get_data` should first copy all data from queue to data cache and then return to user.
7. fix bug that `expect_all` failed even all expected item passed
8. optimize error info for expect
    * print pattern for regular expression when match failed
9. fix bug that set default config doesn't work
2018-05-15 03:29:31 +00:00
houchenyao
1e4508bc8d tiny-test-fw: fix dut for python2 and python3 2018-02-05 06:58:22 +00:00
He Yin Ling
9395a702ef test: check and collect performance via CI 2017-11-16 17:48:30 +08:00
He Yin Ling
47a9a4a614 test: add test fw for example test 2017-10-31 17:42:19 +08:00