On 02/05/2020 21:58, Mike Kelsey wrote:
Kenneth Hoste writes:
On 24/04/2020 02:33, Mike Kelsey wrote:
Quick question about running unit tests.  I have all the EasyBuild stuff in
local clones, and set up the module to find them.  Once I get my environment
set up, it points to my personal installation:

[kelsey@terra1 EasyBuild]$ which eb
/scratch/user/kelsey/EasyBuild/framework/eb

but when I launch the unit test per the documentation, I get complaints:

[kelsey@terra1 EasyBuild]$ export TEST_EASYBUILD_MODULES_TOOL=Lmod
[kelsey@terra1 EasyBuild]$ python -m test.framework.toy_build

WARNING: 'eb' not found in $PATH, failed to determine installation prefix!
WARNING: 'eb' not found in $PATH, failed to determine installation prefix!
WARNING: 'eb' not found in $PATH, failed to determine installation prefix!
[ repeated 6 times before '.' , with double blank lines between them! ]

Some of the individual test instances (the '.' marks) have many more such
warnings in between.  I guess this is due to how many 'eb' invocations there
are per test?

Is there something I've missed in my setup?  Is this a site issue?
Did you add the location of the 'eb' command to $PATH using 'export', or
not?
Yes, I did.  You can see that above; notice that |which eb| resolves to the
correct version at the command line, but not within the "toy_build" test.  I
got my PATH and PYTHONPATH set by creating my own "EasyBuild-kelsey" module
along the lines of your "devloper installation":

        set root    "/scratch/user/kelsey/EasyBuild"
        conflict    EasyBuild
        prepend-path    PATH            "$root/framework"
        prepend-path    PYTHONPATH      "$root/framework"
        prepend-path    PYTHONPATH      "$root/easyblocks"
        prepend-path    PYTHONPATH      "$root/easyconfigs"

(I shortened my repository names by hand).

It may be related to using a module for this, I think the tests may be wiping all loaded modules at some point, which makes the $PATH change get undone...

As you suggest, I'll open an issue for this.  Is there any way for me to
label it "bug report"?  When I try, the "Labels" sidebar doesn't seem to be
active.

Only maintainers can currently label issues/PRs currently, I need to check whether I can give that permission to others, not sure GitHub's permissions are fine-grained enough...

                                                -- Mike

Reply via email to