Skip to content

Commit 0c12b25

Browse files
committed
add ctest workflow
1 parent f7240ea commit 0c12b25

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

.github/workflows/job-test-macOS.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
uses: actions/download-artifact@v4
2525
with:
2626
name: Build-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
27+
path: Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}
2728

2829
- name: Update access permission of ZEngineTests
2930
run: chmod +x ./Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}/tests/ZEngineTests

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ endif()
3636

3737
list( APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib )
3838

39+
include(CTest)
40+
include(GoogleTest)
41+
3942
# Externals dependencies
4043
#
4144
if (NOT LAUNCHER_ONLY)

Scripts/RunTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function RunTests {
6666
[string]$testExecutablePath = ""
6767
switch ($SystemName) {
6868
"Windows" {
69-
$testExecutablePath = [IO.Path]::Combine($OutputBuildDirectory, "tests", "ZEngineTests.exe")
69+
$testExecutablePath = Join-Path $OutputBuildDirectory -ChildPath "tests/ZEngineTests.exe")
7070
}
7171
"Darwin" {
7272
$testExecutablePath = Join-Path $OutputBuildDirectory -ChildPath "tests/ZEngineTests"

ZEngine/ZEngine/Rendering/Shaders/Compilers/CompilationStage.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#pragma once
21
#include <Core/Coroutine.h>
32
#include <Logging/LoggerDefinition.h>
43
#include <Rendering/Shaders/Compilers/CompilationStage.h>

ZEngine/tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ set_target_properties(ZEngineTests PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREF
1818
install(TARGETS ZEngineTests
1919
RUNTIME DESTINATION tests)
2020

21+
gtest_discover_tests(ZEngineTests DISCOCERY_MODE PRE_TEST)

0 commit comments

Comments
 (0)