Commit graph

8 commits

Author SHA1 Message Date
Martin Braun
5f8142e543 tests: Make python_api_test.py always explicitly call Python
This change makes it such that python_api_test.py will spawn
a subprocess for multi_usrp_test.py by explicitly calling the Python
interpreter, and making the path to multi_usrp_test.py the first
argument.
This fixes running this devtest after installing Python tests via ipks
on embedded devices.
2021-06-02 21:49:39 -07:00
Martin Braun
8a33db6022 devtest: Make Python tests their own type of devtest
Like the example test, the Python-based test is now codified. The
"special sauce" for Python tests revolves around the fact that they
require the Python API, so we have to gracefully fail if the Python API
was never enabled, but hard-fail when the Python API is enabled, but not
working.

This creates a new type of devtest (UHDPythonTestCase) and moves
uhd_python_api_test over to the new type.
2021-05-10 15:02:24 -05:00
Steven Koo
2da3cdcb3b devtest: Support multi_usrp_test on Windows
Windows requires the command 'python' to prepend calls to .py files.
This change moves the path to multi_usrp_test.py to an argument on
Windows.
2020-08-10 15:14:36 -05:00
Martin Braun
f832a176d9 devtest: Assert result of python_api_test correctly
Before this, the python_api_test didn't assert an error when it failed.
2020-06-10 12:46:33 -05:00
Martin Braun
6db281792b devtest: Don't skip Python API tests if Python API is enabled
One of the devtests (the python_api_test) gets skipped without failures
if the uhd module can't be loaded. However, this can mask errors if the
uhd module can't be loaded because it's broken. This change will verify
if the uhd module should have been loaded, and throw an error if that's
the case.
2020-06-10 12:46:33 -05:00
Martin Braun
1bba62a75a Remove remaining Python 2 references
This changes two things in all applicable files:
- Remove imports from __future__
- Change default shebangs from /usr/bin/env python to /usr/bin/env
  python3
2020-05-07 15:10:41 -05:00
Martin Braun
21ed72b5a2 devtese: Change default Python interpreter to 3
Usually, devtest is run via make (or ninja), and will use the correct
Python interpreter. When running directly on the command line, it is
important to pick the right Python interpreter so it will work with the
Python API.

Here, we change the default interpreter from Python 2 to 3, because
that's the more common version, and will be the only option for upcoming
UHD 4.0 anyway.
2019-11-08 08:56:20 -08:00
Vidush
5b55a32c92 devtest: Integrate Python API Tester into Devtest 2018-08-10 11:42:47 -07:00