Thomas Schwinge <[email protected]> writes: > Hi! > > I'm using the 'lit' command, via the Guix 'python-lit' package. That > works fine. > > Now, I want to use 'lit' with '--timeout N' option, and it fails: > > [...] > .lit-real: > /gnu/store/d8vy11ka0rkk54xngh8c4kl85d234fx2-python-lit-18.1.8/lib/python3.11/site-packages/lit/LitConfig.py:129: > fatal: Setting a timeout per test not supported. Requires the Python psutil > module but it could not be found. Try installing it via pip or via your > operating system's package manager. > > So, I add in the Guix 'python-psutil' package. But: that doesn't resolve > the issue. Reproduce as follows: > > $ cat < lit.cfg.py > import lit.formats > config.test_format = lit.formats.ShTest(execute_external=True) > config.suffixes = ['.test'] > $ cat < 1.test > RUN: sleep 2 > $ guix shell python-lit python-psutil -- lit . > -- Testing: 1 tests, 1 workers -- > PASS: <unnamed> :: 1.test (1 of 1) > > Testing Time: 2.02s > > Total Discovered Tests: 1 > Passed: 1 (100.00%) > $ guix shell python-lit python-psutil -- lit --timeout 1 . > .lit-real: > /gnu/store/d8vy11ka0rkk54xngh8c4kl85d234fx2-python-lit-18.1.8/lib/python3.11/site-packages/lit/main.py:72: > note: The test suite configuration requested an individual test timeout of 0 > seconds but a timeout of 1 seconds was requested on the command line. Forcing > timeout to be 1 seconds. > .lit-real: > /gnu/store/d8vy11ka0rkk54xngh8c4kl85d234fx2-python-lit-18.1.8/lib/python3.11/site-packages/lit/LitConfig.py:129: > fatal: Setting a timeout per test not supported. Requires the Python psutil > module but it could not be found. Try installing it via pip or via your > operating system's package manager. > > Am I doing anything wrong, or is this a bug? > > > Grüße > Thomas
Hi Thomas, If you want python to find the psutil package, add python to your shell invocation: guix shell python python-lit python-psutil That will cause guix shell to start setting the GUIX_PYTHONPATH environment variable (see --search-paths).
signature.asc
Description: PGP signature
