Skip to content

Commit

Permalink
vcproj: Fix WML_test execution on debug builds
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
aquileia committed Mar 8, 2015
1 parent 44ec27d commit 4da8eec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
15 changes: 9 additions & 6 deletions projectfiles/VC9/WML_tests.cmd
Expand Up @@ -5,11 +5,10 @@
setlocal enabledelayedexpansion

:: save file paths and command line arguments
set LoadFile=%~p0..\..\wml_test_schedule
set binary=wesnoth.exe
cd ..\..\
set LoadFile=wml_test_schedule
set binary=%~f1%wesnoth.exe
set opt=--log-strict=warning
:: executable path can be set for VC debug configuration, defaults to wesnoth\
if "%1"=="" ( cd ..\..\ ) else ( cd %~p1 )

echo running WML tests:
set tSTART=%time%
Expand All @@ -36,8 +35,12 @@ for /f "eol=# tokens=1,2 delims= " %%G in (%LoadFile%) do (
)
echo(
if not DEFINED fail_num ( set "fail_num=none" )
set /a "minutes = (1%time:~3,2%-100) - (1%tSTART:~3,2%-100)"
set /a "seconds = (1%time:~6,2%-100) - (1%tSTART:~6,2%-100)"
set /a "minutes = 1%time:~3,2% - 1%tSTART:~3,2%"
set /a "seconds = 1%time:~6,2% - 1%tSTART:~6,2%"
if %seconds% LSS 0 (
set /a "seconds+=60"
set /a "minutes-=1"
)
echo %test_num% WML tests completed in %minutes%m %seconds%s, %fail_num% of them failed

:: restore the state before execution
Expand Down
2 changes: 1 addition & 1 deletion projectfiles/VC9/WindowsTimeout.cpp
Expand Up @@ -20,11 +20,11 @@
*/

#if _WIN32_WINNT < 0x0602 //Windows version before Win8
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#include <Processthreadsapi.h>
#endif
// #define WIN32_LEAN_AND_MEAN
#include <stdlib.h>
#include <iostream>

Expand Down
14 changes: 7 additions & 7 deletions projectfiles/VC9/WindowsTimeout.vcproj
Expand Up @@ -18,8 +18,8 @@
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\WindowsTimeout"
OutputDirectory="$(SolutionDir)\..\.."
IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
>
Expand Down Expand Up @@ -88,7 +88,7 @@
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\..\.."
IntermediateDirectory="$(ConfigurationName)\WindowsTimeout"
IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
Expand Down Expand Up @@ -157,8 +157,8 @@
</Configuration>
<Configuration
Name="Debug_with_VLD|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\WindowsTimeout"
OutputDirectory="$(SolutionDir)\..\.."
IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
>
Expand Down Expand Up @@ -225,8 +225,8 @@
</Configuration>
<Configuration
Name="ReleaseDEBUG|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)\WindowsTimeout"
OutputDirectory="$(SolutionDir)\..\.."
IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
Expand Down

0 comments on commit 4da8eec

Please sign in to comment.