OpenXR-SDK-Source icon indicating copy to clipboard operation
OpenXR-SDK-Source copied to clipboard

1.0.23: build with`BUILD_TESTS=ON` and no ctest units found

Open kloczek opened this issue 3 years ago • 6 comments

Looks like something is wrong with test suite. cmake configuration

[tkloczko@devel-g2v x86_64-redhat-linux-gnu]$ cmake -L
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error: The source directory "/home/tkloczko/rpmbuild/BUILD/OpenXR-SDK-Source-release-1.0.23/x86_64-redhat-linux-gnu" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
-- Cache values
BASH_COMMAND:FILEPATH=/usr/bin/bash
BUILD_ALL_EXTENSIONS:BOOL=ON
BUILD_API_LAYERS:BOOL=ON
BUILD_FORCE_GENERATION:BOOL=OFF
BUILD_LOADER:BOOL=ON
BUILD_LOADER_WITH_EXCEPTION_HANDLING:BOOL=ON
BUILD_SPECIFICATION:BOOL=OFF
BUILD_TESTS:BOOL=ON
BUILD_WITH_STD_FILESYSTEM:BOOL=OFF
BUILD_WITH_SYSTEM_JSONCPP:BOOL=ON
BUILD_WITH_WAYLAND_HEADERS:BOOL=ON
BUILD_WITH_XCB_HEADERS:BOOL=ON
BUILD_WITH_XLIB_HEADERS:BOOL=ON
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
CMAKE_INSTALL_PREFIX:PATH=/usr
DYNAMIC_LOADER:BOOL=ON
FALLBACK_CONFIG_DIRS:STRING=/etc/xdg
FALLBACK_DATA_DIRS:STRING=/usr/local/share:/usr/share
GLSLANG_VALIDATOR:FILEPATH=/usr/bin/glslangValidator
GLSL_COMPILER:FILEPATH=/usr/bin/glslc
OPENXR_DEBUG_POSTFIX:STRING=
PRESENTATION_BACKEND:STRING=xlib

And with those settings:

[tkloczko@devel-g2v x86_64-redhat-linux-gnu]$ ctest -vv
Test project /home/tkloczko/rpmbuild/BUILD/OpenXR-SDK-Source-release-1.0.23/x86_64-redhat-linux-gnu
No tests were found!!!

There is no test suite? 🤔

kloczek avatar May 28 '22 04:05 kloczek

There is not much of a test suite but there is some. It looks like maybe you're from the wrong directory? You can look at the logs from the built in CI on azure pipelines to see what we verified. Additionally our internal CI does run the test suite on Linux.

rpavlik avatar May 28 '22 17:05 rpavlik

As you see I'm calling it from directoty created by cmake in which cmake -L works. Exactly the same way I'm using in +370 packages in which I'm using exactly the same rpm macro

[tkloczko@devel-g2v SPECS]$ grep ^%ctest * | wc -l
379

kloczek avatar May 28 '22 17:05 kloczek

Just checked https://github.com/KhronosGroup/OpenXR-SDK-Source/tree/main/.github/workflows and I don't see any traces of cmake test suite execution (by executing ctest or make test) Can you show me where is your result of ctest -vv? 🤔

kloczek avatar May 28 '22 17:05 kloczek

ah, so in our internal CI we're manually running the tests. However, the Debian package runs the tests as part of the normal process, I think. I could have sworn I had the tests added for ctest... Looking into it.

rpavlik avatar Jun 13 '22 17:06 rpavlik

OK, looks like we don't actually have the add_test calls to enable ctest: there are tests but not wired up that way. We are manually changing into the loader_test directory and running it. (The other "tests" in the source tree aren't exactly tests but more sample/demo apps or compile tests.)

The absence of include(CTest) (except in vendored source trees) should be an indication to you that we don't have ctest support in the build system yet.

rpavlik avatar Jun 13 '22 18:06 rpavlik

An issue (number 1733) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#1733 ), to facilitate working group processes.

This GitHub issue will continue to be the main site of discussion.

rpavlik-bot avatar Jun 15 '22 15:06 rpavlik-bot

Fixed in 1.0.30.

rpavlik avatar Sep 20 '23 17:09 rpavlik