clp icon indicating copy to clipboard operation
clp copied to clipboard

Schema unit tests fail if run outside build directory.

Open davidlion opened this issue 1 year ago • 0 comments

Bug

If the unit tests are run outside the build directory, e.g.: ./build/unitTest instead of cd build && ./unitTest you will get 11 failures related to missing schema files.

This is caused by relative paths being used in the schema unit tests.

An error example:

/home/lion/yscope/clp-ffi-go/cpp/clp/components/core/tests/test-Grep.cpp:21: FAILED:
due to unexpected exception with message:
ReaderInterface operation failed

[2023-05-20 23:25:59.016] [info] [test-ParserWithUserSchema.cpp:72] File not found: /home/lion/yscope/clp-ffi-go/cpp/clp/components/tests/test_schema_files/missing_schema.txt

CLP version

460d377

Environment

ghcr.io/y-scope/clp/clp-core-dependencies-x86-ubuntu-focal:main

Reproduction steps

  1. build the latest CLP
  2. run unitTest outside of your build directory (i.e. run unitTest from any directory other than the file's parent)

davidlion avatar May 20 '23 23:05 davidlion