diff --git a/Dockerfile b/Dockerfile index fe54c34..c406b2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ No newline at end of file +COPY --chmod=755 testdemos_files . diff --git a/testdemos_files/deps/regamedll/cstrike/dlls/mp.dll b/testdemos_files/deps/regamedll/cstrike/dlls/mp.dll new file mode 100644 index 0000000..0f3c62c Binary files /dev/null and b/testdemos_files/deps/regamedll/cstrike/dlls/mp.dll differ diff --git a/testdemos_files/deps/rehlds/valve/dlls/hl.dll b/testdemos_files/deps/rehlds/valve/dlls/hl.dll new file mode 100644 index 0000000..32d8fad Binary files /dev/null and b/testdemos_files/deps/rehlds/valve/dlls/hl.dll differ diff --git a/testdemos_files/deps/rehlds/valve/server.cfg b/testdemos_files/deps/rehlds/valve/server.cfg new file mode 100644 index 0000000..5332d00 --- /dev/null +++ b/testdemos_files/deps/rehlds/valve/server.cfg @@ -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 diff --git a/testdemos_files/runRegamedll.sh b/testdemos_files/runRegamedll.sh new file mode 100755 index 0000000..13c713f --- /dev/null +++ b/testdemos_files/runRegamedll.sh @@ -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 + diff --git a/testdemos_files/runRehlds.sh b/testdemos_files/runRehlds.sh new file mode 100755 index 0000000..5c9fb11 --- /dev/null +++ b/testdemos_files/runRehlds.sh @@ -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 + diff --git a/testdemos_files/runTest.sh b/testdemos_files/runTest.sh old mode 100644 new mode 100755 diff --git a/testdemos_files/test.sh b/testdemos_files/test.sh deleted file mode 100755 index b356c6d..0000000 --- a/testdemos_files/test.sh +++ /dev/null @@ -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