mirror of
https://github.com/rehlds/testdemos.git
synced 2024-12-25 06:05:49 +03:00
fix rehlds (#20)
* fix cstrike gamedll for rehlds test * rename test script * Dockerfile: copy chmod too & fix chmod for files * remove unused test.sh --------- Co-authored-by: s1lentq <s1lentsk@yandex.ru>
This commit is contained in:
parent
11095d8146
commit
e5c562f603
@ -70,7 +70,4 @@ COPY --from=download_hlds_windows /opt/hlds /opt/HLDS
|
||||
|
||||
WORKDIR /opt/HLDS
|
||||
# Add test depend files
|
||||
COPY testdemos_files .
|
||||
|
||||
# CMD [ "./test.sh" ]
|
||||
# CMD wine hlds.exe --rehlds-enable-all-hooks --rehlds-test-play "testdemos/cstrike-basic-1.bin" -game cstrike -console -port 27039 +map regamedll_test_map_v5
|
||||
COPY --chmod=755 testdemos_files .
|
||||
|
BIN
testdemos_files/deps/regamedll/cstrike/dlls/mp.dll
Normal file
BIN
testdemos_files/deps/regamedll/cstrike/dlls/mp.dll
Normal file
Binary file not shown.
BIN
testdemos_files/deps/rehlds/valve/dlls/hl.dll
Normal file
BIN
testdemos_files/deps/rehlds/valve/dlls/hl.dll
Normal file
Binary file not shown.
28
testdemos_files/deps/rehlds/valve/server.cfg
Normal file
28
testdemos_files/deps/rehlds/valve/server.cfg
Normal file
@ -0,0 +1,28 @@
|
||||
// Use this file to configure your DEDICATED server.
|
||||
// This config file is executed on server startup.
|
||||
|
||||
// disable autoaim
|
||||
sv_aim 0
|
||||
|
||||
// player bounding boxes (collisions, not clipping)
|
||||
sv_clienttrace 3.5
|
||||
|
||||
// disable clients' ability to pause the server
|
||||
pausable 0
|
||||
|
||||
// default server name. Change to "Bob's Server", etc.
|
||||
hostname "Half-Life Test Server [Steam]"
|
||||
|
||||
rcon_password "vH9.ChfusK"
|
||||
sv_minupdaterate 30
|
||||
sv_maxupdaterate 101
|
||||
|
||||
sv_minrate 10000
|
||||
sv_maxupdaterate 50000
|
||||
|
||||
// maximum client movement speed
|
||||
sv_maxspeed 270
|
||||
|
||||
// load ban files
|
||||
exec listip.cfg
|
||||
exec banned.cfg
|
7
testdemos_files/runRegamedll.sh
Executable file
7
testdemos_files/runRegamedll.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo " - Testing ReGameDLL -"
|
||||
rsync -a deps/regamedll/* .
|
||||
|
||||
demo=cstrike-basic-1 desc="CS: Testing jumping, scenarios, shooting etc" ./runTest.sh
|
||||
|
10
testdemos_files/runRehlds.sh
Executable file
10
testdemos_files/runRehlds.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo " - Testing rehlds -"
|
||||
rsync -a deps/rehlds/* .
|
||||
|
||||
demo=cstrike-muliplayer-1 desc="CS: Multiplayer" ./runTest.sh
|
||||
demo=rehlds-phys-single1 desc="Half-Life: Physics singleplayer" ./runTest.sh
|
||||
demo=crossfire-1-multiplayer-1 desc="Half-Life: Multiplayer on crossfire map" ./runTest.sh
|
||||
demo=shooting-hl-1 desc="Half-Life: Shooting with several weapons" ./runTest.sh
|
||||
|
0
testdemos_files/runTest.sh
Normal file → Executable file
0
testdemos_files/runTest.sh
Normal file → Executable file
@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
chown root ~
|
||||
# rsync -a deps/regamedll/* .
|
||||
rsync -a deps/rehlds/* .
|
||||
# mv $GITHUB_WORKSPACE/tests/swds.dll .
|
||||
|
||||
descs=(
|
||||
# "CS: Testing jumping, scenarios, shooting etc"
|
||||
"CS: Multiplayer"
|
||||
# "Half-Life: Physics singleplayer"
|
||||
# "Half-Life: Multiplayer on crossfire map"
|
||||
# "Half-Life: Shooting with several weapons"
|
||||
)
|
||||
demos=(
|
||||
# "cstrike-basic-1"
|
||||
"cstrike-muliplayer-1"
|
||||
# "rehlds-phys-single1"
|
||||
# "crossfire-1-multiplayer-1"
|
||||
# "shooting-hl-1"
|
||||
)
|
||||
retVal=0
|
||||
for i in "${!demos[@]}"; do
|
||||
params=$(cat "testdemos/${demos[i]}.params")
|
||||
echo -e "\e[1m[$((i + 1))/${#demos[@]}] \e[1;36m${descs[i]} testing...\e[0m"
|
||||
echo -e " - \e[0;33mParameters $params\e[0m"
|
||||
wine hlds.exe --rehlds-enable-all-hooks --rehlds-test-play "testdemos/${demos[i]}.bin" $params &> result.log || retVal=$?
|
||||
|
||||
if [ $retVal -ne 777 ] && [ $retVal -ne 9 ]; then
|
||||
# Print with catchy messages
|
||||
while read line; do
|
||||
echo -e " \e[0;33m$line"
|
||||
done <<< $(cat result.log | sed '0,/demo failed/I!d;/wine:/d;/./,$!d')
|
||||
echo " 🔸 🔸 🔸 🔸 🔸 🔸 🔸 🔸 🔸 🔸"
|
||||
|
||||
while read line; do
|
||||
echo -e " \e[1;31m$line";
|
||||
done < rehlds_demo_error.txt
|
||||
|
||||
echo -e " \e[30;41mExit code: $retVal\e[0m"
|
||||
echo -e "\e[1m[$((i + 1))/${#demos[@]}] \e[1;36m${descs[i]} testing...\e[1;31m Failed ❌"
|
||||
exit 6 # Test demo failed
|
||||
else
|
||||
# Print result HLDS console
|
||||
while read line; do
|
||||
echo -e " \e[0;33m$line"
|
||||
done <<< $(cat result.log | sed '/wine:/d;/./,$!d')
|
||||
|
||||
echo -e " \e[30;43mExit code: $retVal\e[0m"
|
||||
echo -e "\e[1m[$((i + 1))/${#demos[@]}] \e[1;36m${descs[i]} testing...\e[1;32m Succeed ✔"
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user