mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-08-31 15:51:17 +00:00
pegtl: install ptest data files where the tests look for them
14 of the 257 pegtl tests failed - every test that reads a data file
(input_file_input, input_mmap_input, internal_file_mapper,
internal_read_file_stdio, stream_*_input, example_json, ...) while the
243 tests that parse in-memory strings passed.
Upstream runs its tests from the source root:
src/test/CMakeLists.txt:299
add_test(NAME ${exename} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ...)
so the tests open their data with CWD-relative literals - grepping the
test sources shows src/test/data/duseltronik.txt (7 references),
src/test/data/test_data.txt (4) and src/test/data/{blns,pass1-3,
fail1-39}.json. run-ptest executes the binaries from ${PTEST_PATH}, so
the data has to be at ${PTEST_PATH}/src/test/data/.
The recipe instead installed it to src/test/pegtl/data - one directory
too deep - and copied only *.json, so test_data.txt and
duseltronik.txt were missing entirely. Install all of src/test/data
to the path the tests actually use. The binaries stay in
src/test/pegtl, which is where run-ptest globs for them.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -12,8 +12,9 @@ SRCREV = "9ec6da187f840d8e804d42b9b7867f79d5d6adc2"
|
||||
inherit cmake ptest
|
||||
|
||||
do_install_ptest () {
|
||||
install -d ${D}${PTEST_PATH}/src/test/pegtl/data
|
||||
install -d ${D}${PTEST_PATH}/src/test/pegtl
|
||||
install -d ${D}${PTEST_PATH}/src/test/data
|
||||
install -m 0755 ${B}/src/test/pegtl-test-* ${D}${PTEST_PATH}/src/test/pegtl
|
||||
install ${S}/src/test/file_*.txt ${D}${PTEST_PATH}/src/test/pegtl
|
||||
install ${S}/src/test/data/*.json ${D}${PTEST_PATH}/src/test/pegtl/data
|
||||
install -m 0644 ${S}/src/test/file_*.txt ${D}${PTEST_PATH}/src/test/
|
||||
install -m 0644 ${S}/src/test/data/* ${D}${PTEST_PATH}/src/test/data/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user