Closed kloczek closed 1 year ago
Hello @kloczek,
with every release of esptool you open the same issue ticket and I tell you the same thing - test_esptool.py
is meant to run on real hardware. You need to add it to the ignore list. Possibly you can just deselect the TestConfigFile::test_custom_reset_sequence
test.
The new test_espsecure_hsm.py
needs some additional initialization steps to run. See here. Either you can do these or also add it to the ignore list.
test_espsecure.py
should work. Please make sure you have the right dependencies installed (e.g. cryptography
) according to these instructions.
Please have look one more time on what I'm reporing.
As I wtote I've --deselected all units which requires actual hardware to test and not all test/test_espsecure.py
units are failing.The same is with test/test_esptool.py
Other thing that in case all units which requires hardware it would be good to add pytest mark like @pytest.mark.ttyUSB0
mark to allow easily ommit those units which requires actual hardware by executing `pytest -m "not ttyUSB0"'
https://docs.pytest.org/en/7.1.x/how-to/mark.html
The new test_espsecure_hsm.py needs some additional initialization steps to run. See here. Either you can do these or also add it to the ignore list.
OK. Thx 👍 Will try to adapt that to my build&testing procedure 😄
As I said:
TestConfigFile::test_custom_reset_sequence
needs to be deselected too, it depends on real HWtest/test_espsecure.py
should work. Here is an example of a successful run - this doesn't require hardware. Please check your installation, it seems like the errors originate from the cryptography
package.it would be good to add pytest mark like @pytest.mark.ttyUSB0 mark to allow easily ommit those units which requires actual hardware
This is a good idea. Thanks for the suggestion!
Hi @kloczek,
you should now be able to run the whole test suite simply as pytest -m host_test
, as described here.
This runs all of the tests without the need for real hardware or installation of additional prerequisites.
This will be included in the next release.
Just tested 4.5.1 and on first lok looks like it is something wrong around use flaky
Here is pytest output:
I'm using flaky
3.7.0.
Hello,
1) we don't use flaky
in the esptool repo at all, but pytest-rerunfailures
2) I see you run the tests as-m 'not host_test'
- while the host_test
marker is supposed to be used as -m host_test
.
OK I've added pytest-rerunfailures
to build and and pytest is executed with -m host_test
and still something is wrong ..
Operating System
Linux/x86_64
Esptool Version
4.5
Python Version
3.8.16
Full Esptool Command Line that Was Run
N/A
Esptool Output
What is the Expected Behaviour?
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Looks like few unit wich are not using /dev/ttyUSB0 are failing.
More Information
Here is pytest output:
Here is list of installed modules in build env
Other Steps to Reproduce
N/A