Closed smarek closed 9 years ago
tests
directory contains unit test for TREZOR device so they should not be a part of setup.py
Also you see errors because you have no TREZOR device connected.
Yes, but they should respond to python setup.py test
, see https://pythonhosted.org/an_example_pypi_project/setuptools.html#using-setup-py
It was connected, so that means that tests fail on OSX as of now
run-separate.sh shouldn't return any OK/FAIL status for each test?
Do you have hidapi
and mnemonic
python packages installed? Is hidapi
able to open the device (permissions)?
run-separate outputs into $testname.out
and $testname.err
files.
@prusnak tests require debuglink, correct? That said, nothing in /tests/ will run against stock firmware...
@prusnak I have, setup.py installed them as dependencies and install succeeded. Don't know about permissions, can you add some script to check device connectivity and/or file (or other) permissions, so I can tell you debug info?
I have lots of out
/err
files, want any specific ones?
@slush0 if that's correct, it should be mentioned that tests are not to test device accesibility, state and state of library against platform, probably remove the tests from public repository and replace them with tests that user/developer can run against stock firmware?
Does running the script as root work? If yes then my guess would be that you need to do something similar like udev rules on Linux (https://github.com/trezor/trezord/blob/master/release/linux/trezor.rules for inspiration).
No unit tests can be run on stock firmware, because they need to know internal data of TREZOR that stock firmware never shares for obvious reasons.
Environment OS X, x64, 10.9.4 (not relevant probably) Python version 2.7.8
1) Missing documentation on how to run tests. Should we use
run.sh
orrun-separate.sh
? 2)python setup.py test
doesn't react, should execute given tests after in-place build 3) Running./run-separate.sh
gives no output on tests success/failure, example output:4) Running
./run.sh
intests
folder, gives 99 errors like this: