Skip to content

Commit 7c0526f

Browse files
kreuzbergerursfassler
authored andcommitted
applied changes required from review
1 parent 1bdf975 commit 7c0526f

File tree

3 files changed

+21
-49
lines changed

3 files changed

+21
-49
lines changed

run-linux.sh

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ cmake -E chdir build cmake \
1111
-DCUKE_ENABLE_BOOST_TEST=on \
1212
-DCUKE_ENABLE_GTEST=on \
1313
-DCUKE_ENABLE_QT_6=on \
14-
-DCUKE_ENABLE_QT_5=off \
1514
-DCUKE_ENABLE_EXAMPLES=on \
1615
-DCUKE_TESTS_UNIT=on \
1716
-DCUKE_CODE_COVERAGE=on \

run-windows.ps1

+20-40
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ $cmake_params += "-DCMAKE_CXX_STANDARD=${cpp_standard}"
5050

5151
$cmake_params += "-DCUKE_ENABLE_BOOST_TEST=OFF"
5252
$cmake_params += "-DCUKE_ENABLE_GTEST=ON"
53-
$cmake_params += "-DCUKE_ENABLE_QT_6=OFF"
54-
$cmake_params += "-DCUKE_ENABLE_QT_5=ON"
53+
$cmake_params += "-DCUKE_ENABLE_QT_6=ON"
5554
$cmake_params += "-DCUKE_ENABLE_EXAMPLES=ON"
5655
$cmake_params += "-DCUKE_TESTS_UNIT=ON"
5756
$cmake_params += "-DCUKE_CODE_COVERAGE=OFF"
@@ -72,51 +71,32 @@ Invoke-CMake "--build","build","--config","Release","--target","RUN_TESTS"
7271

7372
$CalcTests = @("build\examples\Calc\Release\GTestCalculatorSteps.exe",
7473
"build\examples\Calc\Release\BoostCalculatorSteps.exe",
75-
"build\examples\Calc\Release\FuncArgsCalculatorSteps.exe")
76-
77-
If ((Get-Command "qmake.exe" -ErrorAction SilentlyContinue) -ne $null)
78-
{
79-
$CalcTests += "build\examples\Calc\Release\QtTestCalculatorSteps.exe"
80-
}
74+
"build\examples\Calc\Release\FuncArgsCalculatorSteps.exe",
75+
"build\examples\Calc\Release\QtTestCalculatorSteps.exe")
8176

8277
For ($i=0; $i -lt $CalcTests.Length; $i++) {
83-
If (Test-Path -path $CalcTests[$i] -PathType Leaf) {
84-
Write-Host "Start Test $($CalcTests[$i])" -f Green
85-
Start-Process -NoNewWindow $CalcTests[$i]
86-
Start-Sleep -Seconds 1.0
87-
Set-Location -Path 'examples/Calc'
88-
Start-Process cucumber -NoNewWindow -Wait
89-
set-Location -Path $PSScriptRoot
90-
} Else {
91-
Write-Host "Skipping $($CalcTests[$i]): file not exisiting" -f Yellow
92-
}
78+
Write-Host "Start Test $($CalcTests[$i])" -f Green
79+
Start-Process -NoNewWindow $CalcTests[$i]
80+
Start-Sleep -Seconds 1.0
81+
Set-Location -Path 'examples/Calc'
82+
Start-Process cucumber -NoNewWindow -Wait
83+
set-Location -Path $PSScriptRoot
9384
}
9485
#
9586
# Execute QtCalc examples
9687
#
9788

98-
If ((Get-Command "qmake.exe" -ErrorAction SilentlyContinue) -eq $null)
99-
{
100-
Write-Host "Qt not found in PATH, skipping QtCalc Tests" -f Yellow
101-
}
102-
Else
103-
{
104-
$QtCalcTests = @("build\examples\CalcQt\Release\GTestCalculatorQtSteps.exe",
105-
"build\examples\CalcQt\Release\QtTestCalculatorQtSteps.exe",
106-
"build\examples\CalcQt\Release\BoostCalculatorQtSteps.exe")
107-
108-
For ($i=0; $i -lt $QtCalcTests.Length; $i++) {
109-
If (Test-Path -path $QtCalcTests[$i] -PathType Leaf) {
110-
Write-Host "Start Test $($QtCalcTests[$i])" -f Green
111-
Start-Process -NoNewWindow $QtCalcTests[$i]
112-
Start-Sleep -Seconds 1.0
113-
Set-Location -Path 'examples/CalcQt'
114-
Start-Process cucumber -NoNewWindow -Wait
115-
set-Location -Path $PSScriptRoot
116-
} Else {
117-
Write-Host "Skipping $($QtCalcTests[$i]): file not exisiting" -f Yellow
118-
}
119-
}
89+
$QtCalcTests = @("build\examples\CalcQt\Release\GTestCalculatorQtSteps.exe",
90+
"build\examples\CalcQt\Release\QtTestCalculatorQtSteps.exe",
91+
"build\examples\CalcQt\Release\BoostCalculatorQtSteps.exe")
92+
93+
For ($i=0; $i -lt $QtCalcTests.Length; $i++) {
94+
Write-Host "Start Test $($QtCalcTests[$i])" -f Green
95+
Start-Process -NoNewWindow $QtCalcTests[$i]
96+
Start-Sleep -Seconds 1.0
97+
Set-Location -Path 'examples/CalcQt'
98+
Start-Process cucumber -NoNewWindow -Wait
99+
set-Location -Path $PSScriptRoot
120100
}
121101

122102
Invoke-CMake "--build","build","--config","Release","--target","INSTALL"

tests/CMakeLists.txt

+1-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ target_include_directories(utils INTERFACE
1414
function(cuke_set_environment environment)
1515
set(options)
1616
set(oneValueArgs )
17-
set(multiValueArgs RUNPATH BINPATH)
17+
set(multiValueArgs RUNPATH)
1818

1919
cmake_parse_arguments(CUKE_ENV "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
2020

@@ -32,13 +32,6 @@ function(cuke_set_environment environment)
3232
set(RUNPATH "$<IF:$<PLATFORM_ID:Windows>,PATH,LD_LIBRARY_PATH>")
3333
list(APPEND environment "$<IF:$<PLATFORM_ID:Windows>,PATH,LD_LIBRARY_PATH>=path_list_prepend:$<SHELL_PATH:${CUKE_ENV_RUNPATH}>")
3434
endif()
35-
if( NOT "${CUKE_ENV_BINPATH}" STREQUAL "")
36-
if(WIN32)
37-
string(REPLACE ";" "\;" CUKE_ENV_BINPATH "${CUKE_ENV_BINPATH}")
38-
endif()
39-
list(APPEND environment "PATH=path_list_prepend:$<SHELL_PATH:${CUKE_ENV_BINPATH}>")
40-
endif()
41-
4235
set(${environment} ${${environment}} PARENT_SCOPE)
4336
endfunction()
4437

0 commit comments

Comments
 (0)