OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
Loading...
Searching...
No Matches
msvc_run_test Namespace Reference

Functions

 missing (log)
 verdict (gone, crashes)
 kill_command (win_exe)
 win (path)
 main ()

Variables

 ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
str TEST_ROOT = '/mnt/e/opencod2-msvc-test'
 MSVC_SRC = os.environ.get('COD2_MSVC_SRC', '/mnt/e/opencod2-msvc-src')
str GAME = r'E:\Servers\COD2'
str MAP = 'mp_toujane'
list MARKERS
 DRAW = re.compile(r'\‍[rbdiag\] .*\bdraw=([1-9]\d*)')

Detailed Description

Runs a Windows client into a local game on Windows (from WSL) and checks it got there.

    python3 scripts/msvc_run_test.py --exe build/check-msvc-client/cod2_win32.exe [--seconds 90]

Copies the exe (with SDL2.dll when the MSVC-ABI build needs it) to
E:\\opencod2-msvc-test\\<build dir name>, starts it with +devmap mp_toujane on
the game data in E:\\Servers\\COD2 and a home of its own, and waits until its
console (consola.txt) shows the map loaded by the local server, the client's
cgame up, the gametype script talking to the client and frames drawn, lets it
play --linger seconds more, then kills it. Exits 1 naming what never showed, or
when the game died or wrote a crash report.

Function Documentation

◆ kill_command()

msvc_run_test.kill_command ( win_exe)
Ends the copy under test only: the user may be playing another cod2_win32.exe.

◆ main()

msvc_run_test.main ( )

◆ missing()

msvc_run_test.missing ( log)
What a console log does not show yet, in MARKERS order, then frames.

◆ verdict()

msvc_run_test.verdict ( gone,
crashes )
What failed: the lines that never showed, then any crash report.

◆ win()

msvc_run_test.win ( path)

Variable Documentation

◆ DRAW

msvc_run_test.DRAW = re.compile(r'\‍[rbdiag\] .*\bdraw=([1-9]\d*)')

◆ GAME

str msvc_run_test.GAME = r'E:\Servers\COD2'

◆ MAP

str msvc_run_test.MAP = 'mp_toujane'

◆ MARKERS

list msvc_run_test.MARKERS
Initial value:
1= [
2 ('the local server starts the map', f'Server: {MAP}'),
3 ('the map loads', f'LOADING... maps/mp/{MAP}.d3dbsp'),
4 ("the client's cgame starts", 'CL_InitCGame:'),
5 ("the gametype script talks to the client", "script menu 'serverinfo_dm'"),
6]

◆ MSVC_SRC

msvc_run_test.MSVC_SRC = os.environ.get('COD2_MSVC_SRC', '/mnt/e/opencod2-msvc-src')

◆ ROOT

msvc_run_test.ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

◆ TEST_ROOT

str msvc_run_test.TEST_ROOT = '/mnt/e/opencod2-msvc-test'