Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions .github/assets/CIScripts/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,21 @@ while read -r file; do

echo "Running $relative"
touch $basedir/errors.log
if ! DreamDaemon $basedir/environment.dmb -once -close -trusted -verbose -invisible; then
echo "TEST FAILED: BYOND CRASHED!"
echo "TEST FAILED: $relative" >> summary.log
if ! DreamDaemon $basedir/environment.dmb -once -close -trusted -verbose -invisible -log errors.log ; then
echo "TEST FAILED:$file:BYOND crashed"
echo "CRASHED: $relative" >> summary.log
byondcrashes=$((byondcrashes+1))
sed -i '/^[[:space:]]*$/d' $basedir/errors.log
cat $basedir/errors.log
rm $basedir/errors.log
testsfailed=$((testsfailed + 1))
continue
continue
fi
if [ -s "$basedir/errors.log" ]; then
if [[ $first_line == "// RUNTIME ERROR"* || $first_line == "//RUNTIME ERROR"* ]] then #expected runtime error, should compile but then fail to run
sed -i '1,3d; /^[[:space:]]*$/d' $basedir/errors.log
if [ -s $basedir/errors.log ]
then
if [[ $first_line == "// RUNTIME ERROR"* || $first_line == "//RUNTIME ERROR"* ]]
then #expected runtime error, should compile but then fail to run
echo "Expected runtime error, test passed"
rm $basedir/errors.log
testspassed=$((testspassed + 1))
Expand All @@ -68,15 +71,25 @@ while read -r file; do
echo "Errors detected!"
sed -i '/^[[:space:]]*$/d' $basedir/errors.log
cat $basedir/errors.log
echo "TEST FAILED: $relative"
echo "TEST FAILED:$file:Unexpected runtime error"
rm $basedir/errors.log
echo "TEST FAILED: $relative" >> summary.log
echo "Failed: $relative" >> summary.log
testsfailed=$((testsfailed + 1))
continue
fi
else
echo "Test passed: $relative"
testspassed=$((testspassed + 1))
if [[ $first_line == "// RUNTIME ERROR"* || $first_line == "//RUNTIME ERROR"* ]]
then #expected runtime error, should compile but then fail to run
echo "TEST FAILED:$file:Expected runtime error, but none found!"
rm $basedir/errors.log
echo "Failed: $relative" >> summary.log
testsfailed=$((testsfailed + 1))
continue
else
echo "Test passed: $relative"
testspassed=$((testspassed + 1))
rm $basedir/errors.log
fi
fi
done < test_file_diffs

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/check-test-parity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Fetch master for diffing
run: |
git fetch origin master:master --depth=1

- name: Check for test changes
id: changed-files
run: |
git diff --diff-filter=ACMR --name-only HEAD^1 HEAD Content.Tests/DMProject/Tests/**/*.dm Content.Tests/DMProject/BrokenTests/**/*.dm >> test_file_diffs
git diff --diff-filter=ACMR --name-only origin/master...HEAD 'Content.Tests/DMProject/Tests/**/*.dm' 'Content.Tests/DMProject/BrokenTests/**/*.dm' >> test_file_diffs
echo "changed_files_count=$(wc -l < test_file_diffs)" >> $GITHUB_OUTPUT

- name: Add Architecture
Expand Down
2 changes: 1 addition & 1 deletion Content.Tests/DMProject/environment.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
/world/New()
spawn(300)
Del() // just in case
world.log = file("errors.log")

RunTest()
Del()
Loading