-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use testfiles from origin #19
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,33 @@ | ||||||
# rsync -a deps/rehlds/* . | ||||||
|
||||||
# demo="cstrike-muliplayer-1" | ||||||
# desc="CS: Multiplayer" | ||||||
|
||||||
params=$(cat "testdemos/${demo}.params") | ||||||
|
||||||
echo -e "\e[1;36m${desc} testing...\e[0m" | ||||||
echo -e " - \e[0;33mParameters: $params\e[0m" | ||||||
|
||||||
retVal=0 | ||||||
wine hlds.exe --rehlds-enable-all-hooks --rehlds-test-play "testdemos/${demo}.bin" $params &> result.log || retVal=$? | ||||||
if [ $retVal -ne 777 ] && [ $retVal -ne 9 ]; then | ||||||
echo -e " 🔸 🔸 🔸 🔸 🔸 🔸 🔸 🔸 🔸 🔸" | ||||||
|
||||||
if [ -f rehlds_demo_error.txt ]; then | ||||||
while read line; do | ||||||
echo -e " \e[1;31m$line"; | ||||||
done < rehlds_demo_error.txt | ||||||
else | ||||||
echo -e " \e[1;33mrehlds_demo_error.txt not found, dumping result.log:\e[0m" | ||||||
cat result.log | ||||||
fi | ||||||
echo -e " \e[30;41mExit code: $retVal\e[0m" | ||||||
echo -e "\e[1;36m${desc} testing...\e[1;31m Failed ❌\e[0m" | ||||||
exit 6 # Test demo failed | ||||||
else | ||||||
while read line; do | ||||||
echo -e " \e[0;33m$line" | ||||||
done <<< $(cat result.log | sed '/wine:/d;/./,$!d') | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ Codacy found a minor Performance issue: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. The issue identified by ShellCheck is that the use of Here is the suggested change to fix the issue:
Suggested change
This comment was generated by an experimental AI tool. |
||||||
echo -e " \e[30;43mExit code: $retVal\e[0m" | ||||||
echo -e "\e[1;36m${desc} testing...\e[1;32m Succeed ✔\e[0m" | ||||||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Codacy found a critical Error Prone issue: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
The issue identified by ShellCheck is that the script lacks a shebang line, which specifies the interpreter that should be used to execute the script. Without a shebang, the shell used to run the script is determined by the environment, which can lead to inconsistencies and unexpected behavior if the script is run in different environments. Adding a shebang ensures that the script is executed with the intended shell, making it more portable and less error-prone.
To fix this issue, you should add a shebang line at the top of the script to specify the shell. For example, if you want to use Bash, you can add
#!/bin/bash
as the first line of the script.This comment was generated by an experimental AI tool.