From 495380b6d20227dc6975c4062d2065f41209a5e8 Mon Sep 17 00:00:00 2001 From: Python1320 Date: Fri, 15 Oct 2021 00:36:43 +0300 Subject: [PATCH] check for existence of leakfile --- test.cmd | 5 +++-- vbspautotest/vbspautotest.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test.cmd b/test.cmd index 711444a..ba0fcfb 100644 --- a/test.cmd +++ b/test.cmd @@ -10,8 +10,8 @@ @set leakfile=%mapfolder%\ci.lin @del /Q /F "%targetvmf%" 2>nul >nul @del /Q /F "%targetbsp%" 2>nul >nul -@rem The mappers need this :p -@rem del /Q /F "%leakfile%" + +del /Q /F "%leakfile%" @COPY "%mapfolder%\%mapfile%.vmf" "%targetvmf%" >nul @if ERRORLEVEL 1 goto failed @@ -21,6 +21,7 @@ extras\vmfii "%targetvmf%" "%targetvmf%" --fgd "%FGDS%" > nul "%compilers_dir%\vbsp.exe" %VBSPEXTRAS% -allowdynamicpropsasstatic -leaktest -low "%targetvmf%" @if ERRORLEVEL 1 goto failed @if NOT exist "%targetbsp%" goto failed +@if exist "%leakfile%" goto failed "%compilers_dir%\vvis.exe" -fast -low "%targetvmf%" @if ERRORLEVEL 1 goto failed "%compilers_dir%\vrad.exe" -low %VRADLDR% -noskyboxrecurse -bounce 1 -noextra -fastambient -fast -ldr "%targetvmf%" diff --git a/vbspautotest/vbspautotest.py b/vbspautotest/vbspautotest.py index 290a23b..cb924af 100644 --- a/vbspautotest/vbspautotest.py +++ b/vbspautotest/vbspautotest.py @@ -123,8 +123,8 @@ def dofail(ret): if cilog.exists(): print("Found log file") with cilog.open("rb") as f: - f.seek(-512, os.SEEK_END) - if b"LEAKED" in f.read(): + f.seek(-512, os.SEEK_END) #TODO IMPROVE!!! Find the last "Loading .*\.vmf" + if b"LEAKED" in f.read() or b"Areaportal leak" in f.read(): print("LEAK DETECT") notify.notify("Map leaked!", "Hammer CI",