Browse Source

Removing test file. (#1545)

This test file is just testing compilation with the library works correctly but is no longer needed because:
- it is not cross platform
- it taps into the CTest system which is better suited for real unit/integration tests
- it can be incorporated into the pipeline of github actions instead in the future
pull/1549/head
hristo 3 years ago
committed by GitHub
parent
commit
4bf7b00013
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 36 deletions
  1. +12
    -12
      .github/workflows/cmake.yml
  2. +0
    -21
      cmake/test-pkgconfig.sh
  3. +0
    -3
      src/CMakeLists.txt

+ 12
- 12
.github/workflows/cmake.yml View File

@ -41,12 +41,12 @@ jobs:
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $env:BUILD_TYPE
c"># - name: Test
c"># working-directory: ${{github.workspace}}/build
c"># shell: powershell
c"># # Execute tests defined by the CMake configuration.
c"># # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
c"># run: ctest -C $env:BUILD_TYPE
w"> - name: Test
w"> working-directory: ${{github.workspace}}/build
w"> shell: powershell
w"> # Execute tests defined by the CMake configuration.
w"> # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
w"> run: ctest -C $env:BUILD_TYPE
build_linux:
name: Linux Build
@ -85,9 +85,9 @@ jobs:
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
c"># - name: Test
c"># working-directory: ${{github.workspace}}/build
c"># shell: bash
c"># # Execute tests defined by the CMake configuration.
c"># # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
c"># run: ctest -C $BUILD_TYPE
w"> - name: Test
w"> working-directory: ${{github.workspace}}/build
w"> shell: bash
w"> # Execute tests defined by the CMake configuration.
w"> # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
w"> run: ctest -C $BUILD_TYPE

+ 0
- 21
cmake/test-pkgconfig.sh View File

@ -1,21 +0,0 @@
#!/bin/sh
# Test if including/linking/running an installed raylib works
set -x
export LD_RUN_PATH=/usr/local/lib
CFLAGS="-Wall -Wextra -Werror $CFLAGS"
if [ "$ARCH" = "i386" ]; then
CFLAGS="-m32 $CLFAGS"
fi
cat << EOF | ${CC:-cc} -otest -xc - $(pkg-config --libs --cflags $@ raylib.pc) $CFLAGS && exec ./test
#include <stdlib.h>
#include <raylib.h>
int main(void)
{
int num = GetRandomValue(42, 1337);
return 42 <= num && num <= 1337 ? EXIT_SUCCESS : EXIT_FAILURE;
}
EOF

+ 0
- 3
src/CMakeLists.txt View File

@ -56,7 +56,6 @@ add_library(raylib ${raylib_sources} ${raylib_public_headers})
if (NOT BUILD_SHARED_LIBS)
MESSAGE(STATUS "Building raylib static library")
add_library(raylib_static ALIAS raylib)
add_test("pkg-config--static" ${PROJECT_SOURCE_DIR}/../cmake/test-pkgconfig.sh --static)
else()
MESSAGE(STATUS "Building raylib shared library")
if (MSVC)
@ -65,8 +64,6 @@ else()
INTERFACE $<INSTALL_INTERFACE:USE_LIBTYPE_SHARED>
)
endif ()
add_test("pkg-config" ${PROJECT_SOURCE_DIR}/../cmake/test-pkgconfig.sh)
endif()
# Setting target properties

Loading…
Cancel
Save