Unit tests working on generated projects
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set SCRIPT_DIR=%~dp0
|
||||
set BUILD_DIR=%SCRIPT_DIR%build
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
:: %~dp0 always ends with \ which breaks cmake quoting ("path\" escapes the quote)
|
||||
set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%"
|
||||
set "BUILD_DIR=%SCRIPT_DIR%\build"
|
||||
|
||||
if "%1"=="--clean" (
|
||||
if exist "%BUILD_DIR%" (
|
||||
@@ -12,10 +14,12 @@ if "%1"=="--clean" (
|
||||
)
|
||||
|
||||
if not exist "%BUILD_DIR%\CMakeCache.txt" (
|
||||
echo Configuring (first run will fetch Google Test)...
|
||||
echo Configuring test build. First run will fetch Google Test...
|
||||
cmake -S "%SCRIPT_DIR%" -B "%BUILD_DIR%" -DCMAKE_BUILD_TYPE=Debug
|
||||
if errorlevel 1 (
|
||||
echo FAIL: cmake configure failed
|
||||
echo FAIL: cmake configure failed.
|
||||
echo cmake is required for host-side tests.
|
||||
echo Run 'anvil doctor' to see install instructions.
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
@@ -39,4 +43,4 @@ if errorlevel 1 (
|
||||
)
|
||||
|
||||
echo.
|
||||
echo PASS: All tests passed.
|
||||
echo PASS: All tests passed.
|
||||
Reference in New Issue
Block a user