|
OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
|
Classes | |
| class | Run |
Functions | |
| players (port) | |
| wait_for (cond, timeout, step=2) | |
| wine_path (path) | |
| client (binary, game_dir, home, args, log, wine=None) | |
| main () | |
Variables | |
| ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| dict | DEFAULT_BINARY = {115: 'build/check-linux-10/cod2_linux', 118: 'build/check-linux/cod2_linux'} |
| str | RCON = 'listenpw' |
| str | G_SPEED = '250' |
| PREFERENCES = os.path.expanduser('~/.cod2/preferences') | |
A client hosts a game and another client joins it.
python3 scripts/listen_test.py /path/to/CoD2 --protocol {115|118} [--binary PATH] [--host-binary EXE --host-wine WINE]
Starts one client with +map on tdm (its local server, CoD2rev-Plus's), waits
until it answers getinfo, starts a second client with +connect, and checks
with rcon that the server holds both: the host on loopback and the guest.
Then g_speed set on the host's command line must survive the game's
registration, and after a map_restart, and after a map command to another
map, with the guest connected, the server must hold both again. Both clients must still run and leave no crash report.
With --host-binary and --host-wine the host is another client, a Windows
one (cod2_win32.exe) run by the given wine command, and the guest the Linux
one. The clients need a CD key in ~/.cod2/preferences (codkey): without one the
test is skipped (exit 0, with a message). They open windows. Exits with 0 when
all of that holds.
| listen_test.client | ( | binary, | |
| game_dir, | |||
| home, | |||
| args, | |||
| log, | |||
| wine = None ) |
| listen_test.main | ( | ) |
| listen_test.players | ( | port | ) |
The rows of rcon status, one per connected client.
| listen_test.wait_for | ( | cond, | |
| timeout, | |||
| step = 2 ) |
| listen_test.wine_path | ( | path | ) |
A path as a Windows program under wine sees it (drive Z: is /).
| dict listen_test.DEFAULT_BINARY = {115: 'build/check-linux-10/cod2_linux', 118: 'build/check-linux/cod2_linux'} |
| str listen_test.G_SPEED = '250' |
| listen_test.PREFERENCES = os.path.expanduser('~/.cod2/preferences') |
| str listen_test.RCON = 'listenpw' |
| listen_test.ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |