flux-framework / flux-sched

Fluxion Graph-based Scheduler
GNU Lesser General Public License v3.0
84 stars 39 forks source link

python/t10001-resourcegraph.py fails if correct `flux` module not in `PYTHONPATH` #1150

Closed grondo closed 1 month ago

grondo commented 2 months ago

The environment is not set up correctly for python/t10001-resourcegraph.py when the default PYTHONPATH doesn't include the flux module:

The following tests FAILED:
     92 - python/t10001-resourcegraph.py (Failed)
Errors while running CTest
Output from these tests are in: /home/grondo/git/flux-sched/Testing/Temporary/LastTest.log

 grondo@pi3:~/git/flux-sched$ ctest --rerun-failed --output-on-failure 
Test project /home/grondo/git/flux-sched
    Start 92: python/t10001-resourcegraph.py
1/1 Test #92: python/t10001-resourcegraph.py ...***Failed    0.21 sec
Traceback (most recent call last):
  File "/home/grondo/git/flux-sched/t/python/t10001-resourcegraph.py", line 22, in <module>
    from fluxion.resourcegraph.V1 import (
  File "/home/grondo/git/flux-sched/src/python/fluxion/resourcegraph/V1.py", line 13, in <module>
    from flux.idset import IDset
ModuleNotFoundError: No module named 'flux'

The sharness tests setup the environment via flux env but there's no facility to do that for the python based test with CMake.