Commit Graph

12 Commits

Author SHA1 Message Date
Peter Dragun
23a38f0f6f bug(tools): dependency check catch exception when package not installed 2023-08-31 10:24:06 +02:00
Roland Dobai
8f91dfed12 fix(tools): Increase timeout in idf_tools.py Python tests 2023-08-11 09:25:52 +02:00
Roland Dobai
951f3300ed fix(tools): Keep the original Python environment when idf_tools.py tests are run 2023-08-11 09:25:52 +02:00
Roland Dobai
dced82b949 fix(tools): idf_tools.py tests should keep the original constraint file 2023-08-11 09:25:52 +02:00
Peter Dragun
0be661f8bf fix(tools): check_python_version accept dev releases as requirement 2023-08-04 14:06:35 +02:00
Frantisek Hrbata
53a8742680 ci: add dep check_python_dependencies.pyt test
Two new tests are added.

1) test_check_python_dependencies
The test prepares artificial constraints file containing packages from
requirements.core.txt, which are also reported in pip-freeze output
for virtual env. The constraints file requires package versions higher
than currently installed in venv, so check_python_dependencies
should fail for all of them.

2) test_check_required_packages_only
Test for espressif/esp-idf/-/merge_requests/17917. After installing
core requirements, install additional foopackage, which is embedded.
Add version requirement for foopackage, which cannot be satisfied,
to constraints file. Since foopackage is not a direct requirement,
check-python-dependencies should not fail.

This also fixes existing TestCustomPythonPathInstall test, which sets
IDF_PYTHON_ENV_PATH, but does not restore it. Unittest seems to be
running tests in order based on class/test name. Meaning this test runs
before TestPythonInstall and all tests in TestPythonInstall are using
the latest tmpdir from TestCustomPythonPathInstall as IDF_PYTHON_ENV_PATH.
IOW TestPythonInstall is actually testing custom python env path, same as
TestCustomPythonPathInstall. This fixes it by restoring the
IDF_PYTHON_ENV_PATH. Note that since the actual IDF_PYTHON_ENV_PATH
was different(tmpdir) from PYTHON_DIR, the default PYTHON_DIR was never used,
so the tests were running with old python env(no
shutil.rmtree(PYTHON_DIR).

Since TestCustomPythonPathInstall is inheriting from TestPythonInstall
it also runs test_opt_argument and test_no_constraints for the second
time. This seems unnecessary, so this patch also skips these two tests
in TestCustomPythonPathInstall.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2023-03-17 15:22:33 +01:00
Roland Dobai
afe554c753 Tools: Allow custom Python installation path with IDF_PYTHON_ENV_PATH
IDF_PYTHON_ENV_PATH is the path where the Python environment is created
and used. By default it is inside IDF_TOOLS_PATH. IDF_PYTHON_ENV_PATH
was exported by idf_tools.py but was not imported back. This fixes the
issue and ESP-IDF will honor the value of IDF_PYTHON_ENV_PATH.

Closes https://github.com/espressif/esp-idf/issues/10489
2023-02-14 17:26:04 +01:00
Ivan Grokhotkov
5c8db0ea7f
ci: increase timeout for python packages install test
On the build runners, the installation frequently takes around 150
seconds, which is above the current timeout. This change increases
the timeout.

Closes IDFCI-1436
2022-08-25 10:45:03 +02:00
Marek Fiala
24fc499b6c Tools: Added test_idf_tools_python_env output log file 2022-08-14 00:28:16 +02:00
Marek Fiala
90a69c4490 Tools: --disable-* argument for removing features
Optional argument --disable-* for removing features in install scripts.
2022-06-30 12:31:59 +02:00
Roland Dobai
fddc73759e Tools: Make easier the detection of the list of Python features 2022-02-03 19:02:14 +01:00
Roland Dobai
b28d7e6850 Tools: Improve the Python package system
Introduce features into the Python package management system & manage
package versions outside of ESP-IDF repo.
2022-01-17 16:54:36 +01:00