He Yin Ling
cffe7bf3a1
ci: use more flexible assign for unit test cases
2019-12-11 15:57:49 +11:00
He Yin Ling
dd74a331c7
tiny-test-fw: print useful debug info when assign test:
...
* total requirements (number of required jobs vs tags)
* unused CI jobs
* missing jobs (number of missing jobs vs tags)
2019-12-11 15:57:49 +11:00
He Yin Ling
6ee7492512
ci: optimize unit test assignment:
...
Currently we use config and test function as filter when assign cases to one CI job. It's not necessary as the runner can run test with different configs / test functions. Now we will try to assign as many cases to a job as possible, to reduce the amount of jobs required.
2019-12-11 15:57:49 +11:00
Ivan Grokhotkov
7db756fbd9
tiny-test-fw: add build config and target options
2019-12-11 15:57:49 +11:00
Ivan Grokhotkov
a37694741c
tiny-test-fw: support testing apps with flash encryption
...
If CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT is set, pass
--encrypted flag to esptool.py.
2019-09-10 17:18:51 +02:00
He Yin Ling
81dd9d4e27
CI: use parallel attribute in CI config file
2019-07-03 16:53:34 +08:00
He Yin Ling
af4daf6a22
test: include chip in test case ID
2019-04-19 14:39:44 +08:00
He Yin Ling
b75400294a
test: collect unit-test performance items and save to report
2019-04-19 14:39:44 +08:00
He Yin Ling
0462620a23
tiny-test-fw: support save performance to junit report:
...
1. support get performance from DUT
2. update performance to `testcase.stdout` in JunitReport
2019-04-19 12:17:13 +08:00
David Cermak
f05228be36
tiny-test-fw: update sdkconfig python dictionary to contain values without trailing newlines
2019-03-22 11:37:26 +01:00
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
Ivan Grokhotkov
b65a088791
tinyfw: update to support new esptool argument
2019-01-22 18:40:25 +08:00
David Cermak
b13a536041
mqtt tests: connect to local broker when running in CI to make the tests more reliable
2019-01-11 15:30:15 +01:00
He Yin Ling
1c54630eaa
test: fix failed to download in example test:
...
1. example test uses auto detect flash size. we need to call
`detect_flash_size` before write flash
2. fix incorrect baudrate used: when using WROVER-Kits, it's likely that download with baudrate 921600
will fail. If we don't reset serial setting in decorator, 921600 will
become the default baudrate. This causes all the subsequent
communication fails
3. do hw reset after used esptool function
2019-01-02 20:49:03 +08:00
Roland Dobai
4ca2b149e5
examples, tools: Fix Python3 deprecation warning for the imp module
2018-12-20 12:44:33 +01:00
Roland Dobai
bfa9610f58
tools: Fix the Python coding style
2018-12-19 11:56:24 +01:00
Angus Gratton
b3249d56f3
unit tests: Fix retrying with a new baud rate in IDFDUT.start_app()
2018-12-18 14:09:29 +11: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
ef9eaddd88
ci: assign unit test cases in sequence of config and name
2018-11-26 10:07:41 +08:00
He Yin Ling
644571f78b
test: generate junit test report according to executed cases
2018-11-26 10:07:41 +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
He Yin Ling
8e70582cad
tiny-test-fw: enhanced junit test report support:
...
1. replace xunitgen with junit_xml, which can log more info
2. allow test cases to handle junit test report by them own
3. allow test cases to log some info into report via `sysout` tag
2018-11-22 20:49:15 +08:00
David Cermak
8ce1f55b59
mqtt: example tests refactored to provide descriptive failures, addapted to python23, removed workarround for launching without mqtt-paho package
2018-11-01 09:04:09 +01:00
Angus Gratton
f55509bd3f
Merge branch 'bugfix/py3_ci' into 'master'
...
Fix Python3 compatibility issues
See merge request idf/esp-idf!3487
2018-10-26 13:45:19 +08:00
Roland Dobai
9daf51e6be
Fix Python 3 compatibility issues
2018-10-24 11:20:54 +02:00
He Yin Ling
722a7e3b53
CI: only create required jobs when use bot to trigger test:
...
Gitlab CI now allow us to define if a job need to be created by
varialbes. This commit add label to CI jobs, so we can make some jobs
not created in certain scenarios when we trigger pipeline with @bot.
2018-10-24 09:19:39 +00:00
Roland Dobai
374f92c0a0
Tiny-test-fw: Fix string comparison which cases ignore of test cases
...
Example tests from examples/protocols/http_server/ were silently ignored
because of incompatible string comparisons.
2018-10-17 11:07:04 +02:00
Roland Dobai
9ea9d111c8
tools: Make Utility.console_log accept Unicode and byte strings as well
2018-09-26 12:56:00 +02:00
Roland Dobai
975688b97f
examples: Use flushed print to see logs on the CI server
2018-09-25 08:05:56 +02:00
Roland Dobai
17b7959de9
Examples: Add Python 2&3 support
2018-09-25 08:05:56 +02:00
Roland Dobai
130a8ea324
tiny-test-fw: Detect either 'download.config' or 'flash_project_args'
2018-09-20 06:39:04 +00:00
Roland Dobai
c3d99dd2e4
Encourage to install python packages without administrative rights
...
Using 'sudo pip install' can cause a lot of problems because usually
there are a couple of Python interpreters installed. This fix encourages
developers to use `pip install --user` instead which is safer.
2018-09-11 08:54:37 +02:00
Roland Dobai
bc307c920c
tiny-test-fw: Print more useful info when download.config doesn't exist
2018-08-27 12:47:08 +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
85bc2d5967
tiny-test-fw: support ignore test cases in CI assign test stage
2018-07-27 19:44:15 +08: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
bffcea09df
CI: erase nvs partition before test:
...
Latest NVS partition bin can't be parsed by old IDF revision. Need to erase before test.
2018-07-27 17:22:24 +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
5f26b36f0f
tiny-test-fw: filter examples with test level
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
01efe9a300
Merge branch 'feature/ci_support_test_one_case_multiple_times' into 'master'
...
CI: support test one case multiple times by @bot
See merge request idf/esp-idf!2692
2018-07-12 19:57:21 +08:00
He Yin Ling
15858895a4
CI: support test one case multiple times by @bot
2018-07-11 10:22:13 +08:00
He Yin Ling
5edc9f9752
tiny-test-fw: filter out invalid IDF ports
2018-07-11 00:00:40 +08:00
Ivan Grokhotkov
eb85c4ec15
tiny-test-fw: handle case when ESPPORT is not set
...
Fix bug introduced in 8a88dd35
, where .decode was called on result of
os.getenv, which was None if ESPPORT was not set.
2018-07-02 21:45:27 +08:00
He Yin Ling
0c3e34b79a
tiny-test-fw: add class diagram to document
2018-07-02 10:40:23 +00:00
Ivan Grokhotkov
6a626f7984
tiny-test-fw: add requirements.txt, small docs tweaks
2018-07-02 10:40:23 +00:00