From 0bada977b5df418cfa5e84ceef93db13ee1c906b Mon Sep 17 00:00:00 2001 From: dawidg81 Date: Thu, 29 Jan 2026 14:25:19 +0100 Subject: unsuccessfull testing; fied CMakeLists.txt to support testing --- CMakeLists.txt | 7 ++ .../v1/reply/index-2026-01-29T13-21-24-0663.json | 132 --------------------- .../v1/reply/index-2026-01-29T13-25-01-0527.json | 132 +++++++++++++++++++++ build/CMakeFiles/TargetDirectories.txt | 1 + build/CMakeFiles/minesweeper.dir/src/Game.cpp.o | Bin 27460 -> 27460 bytes build/CMakeFiles/minesweeper.dir/src/Utils.cpp.o | Bin 25200 -> 25200 bytes build/CMakeFiles/minesweeper.dir/src/main.cpp.o | Bin 24804 -> 24804 bytes build/CTestTestfile.cmake | 8 ++ build/DartConfiguration.tcl | 0 build/Makefile | 11 ++ build/Testing/20260129-1317/Test.xml | 8 +- build/Testing/Temporary/LastTest_20260129-1317.log | 4 +- build/minesweeper | Bin 57164 -> 57160 bytes 13 files changed, 165 insertions(+), 138 deletions(-) delete mode 100644 build/.cmake/api/v1/reply/index-2026-01-29T13-21-24-0663.json create mode 100644 build/.cmake/api/v1/reply/index-2026-01-29T13-25-01-0527.json create mode 100644 build/CTestTestfile.cmake create mode 100644 build/DartConfiguration.tcl diff --git a/CMakeLists.txt b/CMakeLists.txt index dbedac1..ad2fca5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,3 +13,10 @@ file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS add_executable(minesweeper) target_sources(minesweeper PRIVATE ${SOURCE_FILES}) + +enable_testing() + +add_test( + NAME runs_minesweeper + COMMAND minesweeper +) \ No newline at end of file diff --git a/build/.cmake/api/v1/reply/index-2026-01-29T13-21-24-0663.json b/build/.cmake/api/v1/reply/index-2026-01-29T13-21-24-0663.json deleted file mode 100644 index b500d3b..0000000 --- a/build/.cmake/api/v1/reply/index-2026-01-29T13-21-24-0663.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "cmake" : - { - "generator" : - { - "multiConfig" : false, - "name" : "Unix Makefiles" - }, - "paths" : - { - "cmake" : "/usr/bin/cmake", - "cpack" : "/usr/bin/cpack", - "ctest" : "/usr/bin/ctest", - "root" : "/usr/share/cmake-3.25" - }, - "version" : - { - "isDirty" : false, - "major" : 3, - "minor" : 25, - "patch" : 1, - "string" : "3.25.1", - "suffix" : "" - } - }, - "objects" : - [ - { - "jsonFile" : "codemodel-v2-40f156f81e6d86655ed4.json", - "kind" : "codemodel", - "version" : - { - "major" : 2, - "minor" : 4 - } - }, - { - "jsonFile" : "cache-v2-1254cebdd8aa8b415b4c.json", - "kind" : "cache", - "version" : - { - "major" : 2, - "minor" : 0 - } - }, - { - "jsonFile" : "cmakeFiles-v1-0ef4c84cc7d7c57db284.json", - "kind" : "cmakeFiles", - "version" : - { - "major" : 1, - "minor" : 0 - } - }, - { - "jsonFile" : "toolchains-v1-558d07bba70c8f19e3ad.json", - "kind" : "toolchains", - "version" : - { - "major" : 1, - "minor" : 0 - } - } - ], - "reply" : - { - "client-vscode" : - { - "query.json" : - { - "requests" : - [ - { - "kind" : "cache", - "version" : 2 - }, - { - "kind" : "codemodel", - "version" : 2 - }, - { - "kind" : "toolchains", - "version" : 1 - }, - { - "kind" : "cmakeFiles", - "version" : 1 - } - ], - "responses" : - [ - { - "jsonFile" : "cache-v2-1254cebdd8aa8b415b4c.json", - "kind" : "cache", - "version" : - { - "major" : 2, - "minor" : 0 - } - }, - { - "jsonFile" : "codemodel-v2-40f156f81e6d86655ed4.json", - "kind" : "codemodel", - "version" : - { - "major" : 2, - "minor" : 4 - } - }, - { - "jsonFile" : "toolchains-v1-558d07bba70c8f19e3ad.json", - "kind" : "toolchains", - "version" : - { - "major" : 1, - "minor" : 0 - } - }, - { - "jsonFile" : "cmakeFiles-v1-0ef4c84cc7d7c57db284.json", - "kind" : "cmakeFiles", - "version" : - { - "major" : 1, - "minor" : 0 - } - } - ] - } - } - } -} diff --git a/build/.cmake/api/v1/reply/index-2026-01-29T13-25-01-0527.json b/build/.cmake/api/v1/reply/index-2026-01-29T13-25-01-0527.json new file mode 100644 index 0000000..b500d3b --- /dev/null +++ b/build/.cmake/api/v1/reply/index-2026-01-29T13-25-01-0527.json @@ -0,0 +1,132 @@ +{ + "cmake" : + { + "generator" : + { + "multiConfig" : false, + "name" : "Unix Makefiles" + }, + "paths" : + { + "cmake" : "/usr/bin/cmake", + "cpack" : "/usr/bin/cpack", + "ctest" : "/usr/bin/ctest", + "root" : "/usr/share/cmake-3.25" + }, + "version" : + { + "isDirty" : false, + "major" : 3, + "minor" : 25, + "patch" : 1, + "string" : "3.25.1", + "suffix" : "" + } + }, + "objects" : + [ + { + "jsonFile" : "codemodel-v2-40f156f81e6d86655ed4.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 4 + } + }, + { + "jsonFile" : "cache-v2-1254cebdd8aa8b415b4c.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "cmakeFiles-v1-0ef4c84cc7d7c57db284.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + { + "jsonFile" : "toolchains-v1-558d07bba70c8f19e3ad.json", + "kind" : "toolchains", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + ], + "reply" : + { + "client-vscode" : + { + "query.json" : + { + "requests" : + [ + { + "kind" : "cache", + "version" : 2 + }, + { + "kind" : "codemodel", + "version" : 2 + }, + { + "kind" : "toolchains", + "version" : 1 + }, + { + "kind" : "cmakeFiles", + "version" : 1 + } + ], + "responses" : + [ + { + "jsonFile" : "cache-v2-1254cebdd8aa8b415b4c.json", + "kind" : "cache", + "version" : + { + "major" : 2, + "minor" : 0 + } + }, + { + "jsonFile" : "codemodel-v2-40f156f81e6d86655ed4.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 4 + } + }, + { + "jsonFile" : "toolchains-v1-558d07bba70c8f19e3ad.json", + "kind" : "toolchains", + "version" : + { + "major" : 1, + "minor" : 0 + } + }, + { + "jsonFile" : "cmakeFiles-v1-0ef4c84cc7d7c57db284.json", + "kind" : "cmakeFiles", + "version" : + { + "major" : 1, + "minor" : 0 + } + } + ] + } + } + } +} diff --git a/build/CMakeFiles/TargetDirectories.txt b/build/CMakeFiles/TargetDirectories.txt index 7458725..f7cf61e 100644 --- a/build/CMakeFiles/TargetDirectories.txt +++ b/build/CMakeFiles/TargetDirectories.txt @@ -1,3 +1,4 @@ /home/dawidg81/minesweeper/build/CMakeFiles/minesweeper.dir +/home/dawidg81/minesweeper/build/CMakeFiles/test.dir /home/dawidg81/minesweeper/build/CMakeFiles/edit_cache.dir /home/dawidg81/minesweeper/build/CMakeFiles/rebuild_cache.dir diff --git a/build/CMakeFiles/minesweeper.dir/src/Game.cpp.o b/build/CMakeFiles/minesweeper.dir/src/Game.cpp.o index e31f986..7f7d0f5 100644 Binary files a/build/CMakeFiles/minesweeper.dir/src/Game.cpp.o and b/build/CMakeFiles/minesweeper.dir/src/Game.cpp.o differ diff --git a/build/CMakeFiles/minesweeper.dir/src/Utils.cpp.o b/build/CMakeFiles/minesweeper.dir/src/Utils.cpp.o index b62c86b..1df501a 100644 Binary files a/build/CMakeFiles/minesweeper.dir/src/Utils.cpp.o and b/build/CMakeFiles/minesweeper.dir/src/Utils.cpp.o differ diff --git a/build/CMakeFiles/minesweeper.dir/src/main.cpp.o b/build/CMakeFiles/minesweeper.dir/src/main.cpp.o index 81f96f6..5910222 100644 Binary files a/build/CMakeFiles/minesweeper.dir/src/main.cpp.o and b/build/CMakeFiles/minesweeper.dir/src/main.cpp.o differ diff --git a/build/CTestTestfile.cmake b/build/CTestTestfile.cmake new file mode 100644 index 0000000..5ef1de8 --- /dev/null +++ b/build/CTestTestfile.cmake @@ -0,0 +1,8 @@ +# CMake generated Testfile for +# Source directory: /home/dawidg81/minesweeper +# Build directory: /home/dawidg81/minesweeper/build +# +# This file includes the relevant testing commands required for +# testing this directory and lists subdirectories to be tested as well. +add_test(runs_minesweeper "/home/dawidg81/minesweeper/build/minesweeper") +set_tests_properties(runs_minesweeper PROPERTIES _BACKTRACE_TRIPLES "/home/dawidg81/minesweeper/CMakeLists.txt;19;add_test;/home/dawidg81/minesweeper/CMakeLists.txt;0;") diff --git a/build/DartConfiguration.tcl b/build/DartConfiguration.tcl new file mode 100644 index 0000000..e69de29 diff --git a/build/Makefile b/build/Makefile index 94aa135..9874dd0 100644 --- a/build/Makefile +++ b/build/Makefile @@ -65,6 +65,16 @@ CMAKE_BINARY_DIR = /home/dawidg81/minesweeper/build #============================================================================= # Targets provided globally by CMake. +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + # Special rule for the target edit_cache edit_cache: @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." @@ -210,6 +220,7 @@ help: @echo "... depend" @echo "... edit_cache" @echo "... rebuild_cache" + @echo "... test" @echo "... minesweeper" @echo "... src/Game.o" @echo "... src/Game.i" diff --git a/build/Testing/20260129-1317/Test.xml b/build/Testing/20260129-1317/Test.xml index 6895632..5701d26 100644 --- a/build/Testing/20260129-1317/Test.xml +++ b/build/Testing/20260129-1317/Test.xml @@ -24,11 +24,11 @@ ProcessorClockFrequency="0" > - Jan 29 14:17 CET - 1769692656 + Jan 29 14:25 CET + 1769693101 - Jan 29 14:17 CET - 1769692656 + Jan 29 14:25 CET + 1769693101 0 diff --git a/build/Testing/Temporary/LastTest_20260129-1317.log b/build/Testing/Temporary/LastTest_20260129-1317.log index 0e73a26..9b9288c 100644 --- a/build/Testing/Temporary/LastTest_20260129-1317.log +++ b/build/Testing/Temporary/LastTest_20260129-1317.log @@ -1,3 +1,3 @@ -Start testing: Jan 29 14:17 CET +Start testing: Jan 29 14:25 CET ---------------------------------------------------------- -End testing: Jan 29 14:17 CET +End testing: Jan 29 14:25 CET diff --git a/build/minesweeper b/build/minesweeper index bdc8b3a..06b881e 100755 Binary files a/build/minesweeper and b/build/minesweeper differ -- cgit v1.2.3