Skip to content

Commit

Permalink
UDK CI fail debug printing
Browse files Browse the repository at this point in the history
  • Loading branch information
tuokri committed Nov 13, 2023
1 parent d49ec6d commit f437ccb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
1 change: 1 addition & 0 deletions tests/UDKTests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
httpx==0.25.0
psutil==5.9.6
py7zr==0.20.6
tqdm==4.66.1
udk_configparser==1.1.1
Expand Down
40 changes: 33 additions & 7 deletions tests/UDKTests/setup_udk_build_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from typing import IO

import httpx
import psutil
import py7zr
import tqdm
import watchdog.events
Expand Down Expand Up @@ -260,14 +261,20 @@ async def run_udk_build(
if use_shell:
proc = await asyncio.create_subprocess_shell(
cmd=f'powershell.exe Start-Process -NoNewWindow -FilePath "{udk_exe}" '
f'-ArgumentList "make","-useunpublished","-silent","-UNATTENDED","LOG=Launch.log",'
f'"-VERBOSE","-WAITFORDEBUGSERVER","-NOPAUSE","-FORCELOGFLUSH","-DEBUG",'
f'"-INSTALLFW","-AUTO"',
f'-ArgumentList "make","-useunpublished","-UNATTENDED","LOG=Launch.log",'
f'"-VERBOSE","-NOPAUSE","-FORCELOGFLUSH","-DEBUG",'
f'"-AUTO"',
)
else:
proc = await asyncio.create_subprocess_exec(
udk_exe,
*["make", "-useunpublished", "-log", "-UNATTENDED"],
*[
"make",
"-useunpublished",
"-log",
"-UNATTENDED",
"-FORCELOGFLUSH",
],
)

print(f"proc: {proc}")
Expand Down Expand Up @@ -312,9 +319,9 @@ async def run_udk_server(
if use_shell:
test_proc = await asyncio.create_subprocess_shell(
cmd=f'powershell.exe Start-Process -NoNewWindow -FilePath "{udk_exe}" '
f'-ArgumentList "server","{udk_args}","-silent","-UNATTENDED","LOG=Launch.log",'
f'"-VERBOSE","-WAITFORDEBUGSERVER","-NOPAUSE","-FORCELOGFLUSH","-DEBUG",'
f'"-INSTALLFW","-AUTO"',
f'-ArgumentList "server","{udk_args}","-UNATTENDED","LOG=Launch.log",'
f'"-VERBOSE","-NOPAUSE","-FORCELOGFLUSH","-DEBUG",'
f'"-AUTO"',
)
else:
test_proc = await asyncio.create_subprocess_exec(
Expand All @@ -324,6 +331,7 @@ async def run_udk_server(
udk_args,
"-UNATTENDED",
"-log",
"-FORCELOGFLUSH",
],
)

Expand All @@ -349,6 +357,17 @@ async def run_udk_server(
return test_ec


def print_udk_processes():
while True:
sleep_time = 0.01
for proc in psutil.process_iter():
if "udk" in proc.name().lower():
print(f"\t{'#' * 4} {proc}")
sleep_time = 0.5

time.sleep(sleep_time)


async def main():
global UDK_TEST_TIMEOUT

Expand Down Expand Up @@ -508,6 +527,11 @@ async def main():
testing_event = threading.Event()
poker_event = threading.Event()

udk_print_spam_thread = threading.Thread(
target=print_udk_processes,
)
udk_print_spam_thread.start()

obs = watchdog.observers.Observer()
watcher = LogWatcher(building_event, testing_event, log_file)

Expand Down Expand Up @@ -578,6 +602,8 @@ async def main():
if ec != 0:
raise RuntimeError(f"UDK.exe error (sum of all exit codes): {ec}")

udk_print_spam_thread.join()

print(f"finished with {len(watcher.warnings)} warnings")
print(f"finished with {len(watcher.errors)} errors")

Expand Down

0 comments on commit f437ccb

Please sign in to comment.