Skip to content

Commit

Permalink
check for existence of leakfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Python1320 committed Oct 14, 2021
1 parent ea193f5 commit 495380b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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%"
Expand Down
4 changes: 2 additions & 2 deletions vbspautotest/vbspautotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 495380b

Please sign in to comment.