From 5ea70ec2028373b4a758279b6869dcf27ebe5869 Mon Sep 17 00:00:00 2001 From: Tuomo Kriikkula Date: Mon, 13 Nov 2023 13:07:14 +0200 Subject: [PATCH] Upgrade to UDK-Lite 1.0.1 --- .github/workflows/udk-tests.yaml | 31 +++------------------------ tests/UDKTests/defaults.py | 2 +- tests/UDKTests/setup_udk_build_env.py | 11 +++++----- 3 files changed, 10 insertions(+), 34 deletions(-) diff --git a/.github/workflows/udk-tests.yaml b/.github/workflows/udk-tests.yaml index 85ce016..58a3302 100644 --- a/.github/workflows/udk-tests.yaml +++ b/.github/workflows/udk-tests.yaml @@ -5,7 +5,7 @@ on: [ workflow_call ] # TODO: unify GH env vars with local UDKTests env vars somehow. env: UDK_LITE_CACHE: ${{ github.workspace }}/tests/UDKTests/.cache/ - UDK_LITE_TAG: 1.0.0 + UDK_LITE_TAG: 1.0.1 # Timeout for individual steps in the test script. Not a total timeout. UDK_TEST_TIMEOUT: 300 PYTHONUNBUFFERED: 1 @@ -50,33 +50,8 @@ jobs: - run: python --version - name: Run UDK build and test script - timeout-minutes: 2 - run: python .\tests\UDKTests\setup_udk_build_env.py --use-shell - - - name: TODO TEST - timeout-minutes: 2 - if: always() - run: .\tests\UDKTests\UDK-Lite\Binaries\Win64\UDK.exe make -useunpublished - - - name: Print Application Event Log - shell: powershell - run: Get-EventLog -LogName Application | format-table -wrap - if: always() - - - name: Print System Event Log - shell: powershell - run: Get-EventLog -LogName Application | format-table -wrap - if: always() - - - name: Print Windows PowerShell Event Log - shell: powershell - run: Get-EventLog -LogName Windows PowerShell | format-table -wrap - if: always() - - - name: Print Security Event Log - shell: powershell - run: Get-EventLog -LogName Security | format-table -wrap - if: always() + timeout-minutes: 5 + run: python .\tests\UDKTests\setup_udk_build_env.py - name: Archive UDK build and test logs uses: actions/upload-artifact@v3 diff --git a/tests/UDKTests/defaults.py b/tests/UDKTests/defaults.py index 7b47d6a..cc56bba 100644 --- a/tests/UDKTests/defaults.py +++ b/tests/UDKTests/defaults.py @@ -13,7 +13,7 @@ # along with this program. If not, see . UDK_TEST_TIMEOUT = 300 -UDK_LITE_TAG = "1.0.0" +UDK_LITE_TAG = "1.0.1" UDK_LITE_ROOT = "./UDK-Lite/" UDK_LITE_RELEASE_URL = (f"https://github.com/tuokri/UDK-Lite/releases/download/{UDK_LITE_TAG}/UDK" f"-Lite-{UDK_LITE_TAG}.7z") diff --git a/tests/UDKTests/setup_udk_build_env.py b/tests/UDKTests/setup_udk_build_env.py index b75a8e6..94e83ab 100644 --- a/tests/UDKTests/setup_udk_build_env.py +++ b/tests/UDKTests/setup_udk_build_env.py @@ -254,7 +254,7 @@ async def run_udk_build( ) -> int: print("starting UDK build phase") - udk_exe = (udk_lite_root / "Binaries/Win64/UDK.exe").resolve() + udk_exe = (udk_lite_root / "Binaries/Win64/UDK.com").resolve() watcher.state = State.BUILDING @@ -313,7 +313,7 @@ async def run_udk_server( ) -> int: print("starting UDK testing phase") - udk_exe = (udk_lite_root / "Binaries/Win64/UDK.exe").resolve() + udk_exe = (udk_lite_root / "Binaries/Win64/UDK.com").resolve() watcher.state = State.TESTING if use_shell: @@ -357,8 +357,8 @@ async def run_udk_server( return test_ec -def print_udk_processes(): - while True: +def print_udk_processes(event: threading.Event): + while not event.is_set(): sleep_time = 0.01 for proc in psutil.process_iter(): if "udk" in proc.name().lower(): @@ -529,6 +529,7 @@ async def main(): udk_print_spam_thread = threading.Thread( target=print_udk_processes, + args=(poker_event,), ) udk_print_spam_thread.start() @@ -602,7 +603,7 @@ async def main(): if ec != 0: raise RuntimeError(f"UDK.exe error (sum of all exit codes): {ec}") - udk_print_spam_thread.join() + udk_print_spam_thread.join(timeout=5) print(f"finished with {len(watcher.warnings)} warnings") print(f"finished with {len(watcher.errors)} errors")