HomeClusterLabs Projects

Build: python: Fix python tests when there's a separate build dir.

Description

Build: python: Fix python tests when there's a separate build dir.

If the build dir is separate from the source dir, we have two different
python module directories - one of which contains static files and one
of which contains files generated by autoconf. Python can't import a
single module from two different directories, so something ends up not
getting imported and "make check" fails.

In this case, just copy over the whole source directory. This will
include stuff like Makefile.am and buildoptions.py.in, but it probably
doesn't matter. make doesn't appear to care, and python won't notice
the .in files.

With this done, we can get rid of the additional path added to
PYTHONPATH as well as get rid of trying to run tests out of separate
directories. Passing both on the command line was always a bug anyway,
and that bug was disguising the underlying problem, resulting in no
python tests actually being run.

Details

Provenance
clumensAuthored on Sep 21 2023, 2:49 PM
Parents
rP91cb95c5756e: Merge pull request #3224 from nrwahl2/nrwahl2-xml
Branches
Unknown
Tags
Unknown