easybuilders / easybuild

EasyBuild - building software with ease
http://easybuild.io
GNU General Public License v2.0
470 stars 144 forks source link

Tests throw spurious warnings when run with EasyBuild module file #684

Closed ocaisa closed 3 years ago

ocaisa commented 3 years ago

I've seen this a lot in my framework tests but it is also the case for easyconfigs tests:

[ocaisa@node1 ~]$ git clone https://github.com/easybuilders/easybuild-easyconfigs.git
Cloning into 'easybuild-easyconfigs'...
remote: Enumerating objects: 75, done.
remote: Counting objects: 100% (75/75), done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 299361 (delta 30), reused 23 (delta 8), pack-reused 299286
Receiving objects: 100% (299361/299361), 55.85 MiB | 12.56 MiB/s, done.
Resolving deltas: 100% (185091/185091), done.
Updating files: 100% (17021/17021), done.
[ocaisa@node1 ~]$ cd easybuild-easyconfigs/
[ocaisa@node1 ~]$ module load EasyBuild
[ocaisa@node1 easybuild-easyconfigs]$ python3 -m test.easyconfigs.suite
Found 11692 easyconfigs...
...
WARNING: 'eb' not found in $PATH, failed to determine installation prefix!
...

if I explicitly set PATH and PYTHONPATH I do not see these errors:

[ocaisa@node1 easybuild-easyconfigs]$ module purge
[ocaisa@node1 easybuild-easyconfigs]$ export PYTHONPATH=/cvmfs/pilot.eessi-hpc.org/2020.12/software/x86_64/amd/zen2/software/EasyBuild/4.3.2/lib/python3.8/site-packages:$PYTHONPATH
[ocaisa@node1 easybuild-easyconfigs]$ export PATH=/cvmfs/pilot.eessi-hpc.org/2020.12/software/x86_64/amd/zen2/software/EasyBuild/4.3.2/bin:$PATH
[ocaisa@node1 easybuild-easyconfigs]$ python3 -m test.easyconfigs.suite

So it looks like the tests suites should be caching the installation prefix early on, rather than evaluating it again and again.

ocaisa commented 3 years ago

Looks like we can set EB_SCRIPT_PATH in the tests to solve this

ocaisa commented 3 years ago

Confirmed, setting that gets rid of the warnings.

ocaisa commented 3 years ago

@boegel Where is the right place to set that for tests?