test: Don't hardcode the port to listen on
Hardcoding the port to let the test server listen on is can be problematic in case the build hosts happens to have something on that port (e.g. another daemon or build running at the same time). Instead let the kernel pick a free port for us. Apart from that, this changes all configuration files to be templated, with HOST expected to be updated with the actual address/port picked. For explicit configuration files there is a new context manager which will provide a temporary config file with the right information while the sysroot http server will setup a temporary directory to serve files from (with all files updates with correct url information as well). Signed-off-by:Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by:
Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D5243
Showing
- tests/data/conf.in 1 addition, 1 deletiontests/data/conf.in
- tests/data/invalid_archive.in 1 addition, 1 deletiontests/data/invalid_archive.in
- tests/data/invalid_sysroot.in 1 addition, 1 deletiontests/data/invalid_sysroot.in
- tests/data/invalid_version.in 1 addition, 1 deletiontests/data/invalid_version.in
- tests/data/latest.conf.in 1 addition, 1 deletiontests/data/latest.conf.in
- tests/data/missing_version.in 1 addition, 1 deletiontests/data/missing_version.in
- tests/data/sections.conf.in 3 additions, 3 deletionstests/data/sections.conf.in
- tests/data/version.in 1 addition, 1 deletiontests/data/version.in
- tests/data/wrong_distro.in 1 addition, 1 deletiontests/data/wrong_distro.in
- tests/data/wrong_release.in 1 addition, 1 deletiontests/data/wrong_release.in
- tests/test-download 14 additions, 11 deletionstests/test-download
- tests/test-install 13 additions, 11 deletionstests/test-install
- tests/test-latest 12 additions, 10 deletionstests/test-latest
- tests/test-update 15 additions, 13 deletionstests/test-update
- tests/test_util.py 58 additions, 13 deletionstests/test_util.py
Loading
Please register or sign in to comment