Test generated events match documentation
The test ensures that the generated documentation of emulation events is kept up to date. To locate the events.md file, the source root path is now exported to tests in OVNI_SOURCE_DIR. The "Built on ..." message with the date of the build is removed as otherwise it will always make the comparison fail.
This commit is contained in:
parent
402ea82847
commit
df0e7b2bd4
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2022-2023 Barcelona Supercomputing Center (BSC)
|
||||
# Copyright (c) 2022-2024 Barcelona Supercomputing Center (BSC)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
test_emu(flush-overhead.c DISABLED)
|
||||
@ -26,3 +26,4 @@ test_emu(thread-free-isready.c)
|
||||
test_emu(flush-tmpdir.c MP DRIVER "flush-tmpdir.driver.sh")
|
||||
test_emu(tmpdir-metadata.c MP DRIVER "tmpdir-metadata.driver.sh")
|
||||
test_emu(dummy.c NAME "ovniver" DRIVER "ovniver.driver.sh")
|
||||
test_emu(dummy.c NAME "match-doc-events" DRIVER "match-doc-events.sh")
|
||||
|
8
test/emu/ovni/match-doc-events.sh
Normal file
8
test/emu/ovni/match-doc-events.sh
Normal file
@ -0,0 +1,8 @@
|
||||
docs="$OVNI_SOURCE_DIR/doc/user/emulation/events.md"
|
||||
|
||||
(
|
||||
cat "$docs" | grep -v '^Built on' > old.md
|
||||
ovnievents | grep -v '^Built on' > new.md
|
||||
|
||||
diff -up old.md new.md
|
||||
)
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2022-2023 Barcelona Supercomputing Center (BSC)
|
||||
# Copyright (c) 2022-2024 Barcelona Supercomputing Center (BSC)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
include(CMakeParseArguments)
|
||||
@ -49,6 +49,9 @@ function(ovni_test source)
|
||||
list(APPEND OVNI_TEST_ENV
|
||||
"OVNI_CONFIG_DIR=${CMAKE_SOURCE_DIR}/cfg")
|
||||
|
||||
list(APPEND OVNI_TEST_ENV
|
||||
"OVNI_SOURCE_DIR=${CMAKE_SOURCE_DIR}")
|
||||
|
||||
if(OVNI_TEST_SORT)
|
||||
list(APPEND OVNI_TEST_ENV "OVNI_DO_SORT=1")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user