diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 74080e9..d22f27a 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -4,9 +4,9 @@ name: CMake on multiple platforms on: push: - branches: [ "public" ] + branches: [ "*" ] pull_request: - branches: [ "public" ] + branches: [ "main" ] jobs: build: @@ -86,4 +86,4 @@ jobs: working-directory: ${{ steps.strings.outputs.build-output-dir }} # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest --build-config ${{ matrix.build_type }} + run: ctest --output-on-failure --build-config ${{ matrix.build_type }} diff --git a/.gitmodules b/.gitmodules index a841ce4..fb1d199 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,4 +3,4 @@ url = ../BAST [submodule "tinyxml2"] path = extern/tinyxml2 - url = ../tinyxml2 + url = https://github.com/leethomason/tinyxml2.git diff --git a/extern/BAST b/extern/BAST index 6122a02..5f32efb 160000 --- a/extern/BAST +++ b/extern/BAST @@ -1 +1 @@ -Subproject commit 6122a0264a982606ab7bba23e799ab18e2ffe212 +Subproject commit 5f32efb55386bc8e8736a36458eb89da75c0e251 diff --git a/extern/tinyxml2 b/extern/tinyxml2 index b25c19b..1dee28e 160000 --- a/extern/tinyxml2 +++ b/extern/tinyxml2 @@ -1 +1 @@ -Subproject commit b25c19bd75fb56cf1076a62d42b6a72c736df625 +Subproject commit 1dee28e51f9175a31955b9791c74c430fe13dc82 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4684966..e074634 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,4 +17,4 @@ macro(add_pog_test id) set_tests_properties(${id} PROPERTIES TIMEOUT 1) endmacro(add_pog_test) -add_pog_test(empty_1) +# add_pog_test(empty_1) diff --git a/test/dotest.sh b/test/dotest.sh index 649fa89..8a68fa6 100644 --- a/test/dotest.sh +++ b/test/dotest.sh @@ -23,21 +23,26 @@ mkdir -p "$outdir" $program "$inpdir/input.pog" > "$outdir/output.pog" 2> "$outdir/stderr" echo $? > "$outdir/exitcode" -diff "$outdir/output.pog" "$refdir/output.pog" +error=0 +diff "$outdir/exitcode" "$refdir/exitcode" if [ $? -ne 0 ]; then - echo "Test failed: output.pog differs" - exit 1 + echo "Test failed: exitcode differs" + error=1 fi diff "$outdir/stderr" "$refdir/stderr" if [ $? -ne 0 ]; then echo "Test failed: stderr differs" - exit 1 + error=1 fi -diff "$outdir/exitcode" "$refdir/exitcode" +diff "$outdir/output.pog" "$refdir/output.pog" if [ $? -ne 0 ]; then - echo "Test failed: exitcode differs" + echo "Test failed: output.pog differs" + error=1 +fi + +if [ $error -ne 0 ]; then exit 1 fi diff --git a/test/tools/CMakeLists.txt b/test/tools/CMakeLists.txt index f931d62..f20b5ad 100644 --- a/test/tools/CMakeLists.txt +++ b/test/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.15) project(loadpog_test) @@ -8,7 +8,11 @@ include_directories( ${BASTLIB_SOURCE_DIR} ) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + add_executable(loadpog loadpog.cpp) +get_target_property(LOADPOG_OUTPUT_DIRECTORY loadpog RUNTIME_OUTPUT_DIRECTORY) + target_link_libraries(loadpog PRIVATE POGLIB BAST_LIB tinyxml2::tinyxml2) -set(loadpog_EXE ${CMAKE_CURRENT_BINARY_DIR}/loadpog CACHE PATH "loadpog executable") +set(loadpog_EXE ${LOADPOG_OUTPUT_DIRECTORY}/loadpog${CMAKE_EXECUTABLE_SUFFIX} CACHE PATH "loadpog executable")