uflacs tests (gtest) can't br run from top-level ffc directory

Issue #128 resolved
Prof Garth Wells created an issue

The uflacs tests that use gtest fail if run from the top-level ffc directory.

It would be handy if this would work - it would make the pipelines testing neater because there was have some path issues when running pytest via python -m pytest foo.

Comments (12)

  1. Prof Garth Wells reporter

    Could be a different issue from the title of the report. py.test and pythin -m pytest are not the same (despite what is written in the pytest docs). They handle paths differently.

  2. Martin Sandve Alnæs

    I'm trying to make the paths consistently absolute, there were a couple of exceptions.

  3. Prof Garth Wells reporter

    This I've seen is related to PYTHONPATH, at least with pipelines where tests are run as root.

  4. Martin Sandve Alnæs

    This is weird: ffc.backends.ufc.get_include_path() returns /home/martinal/dev/fenics-dev/ffc/test/uflacs/crosslanguage/ffc/backends/ufc when run from test/uflacs/conftest.py

  5. Martin Sandve Alnæs

    In get_include_dir:

    In [1]: __file__
    Out[1]: 'ffc/backends/ufc/__init__.py'
    
    In [2]: os.path.abspath(__file__)
    Out[2]: '/home/martinal/dev/fenics-dev/ffc/test/uflacs/crosslanguage/ffc/backends/ufc/__init__.py'
    
  6. Log in to comment