Skip to content
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

Fix scons tests #448

Merged
merged 7 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
steps: [
{
name: checkout,
uses: actions/checkout@v2,
uses: actions/checkout@v4,
with: { submodules: true }
},
{
Expand Down Expand Up @@ -49,7 +49,7 @@
steps: [
{
name: checkout,
uses: actions/checkout@v2,
uses: actions/checkout@v4,
with: { submodules: true }
},
{
Expand Down Expand Up @@ -77,7 +77,7 @@
},
{
name: checkout,
uses: actions/checkout@v2,
uses: actions/checkout@v4,
with: { submodules: true }
},
{
Expand Down Expand Up @@ -106,7 +106,7 @@
},
{
name: checkout,
uses: actions/checkout@v2,
uses: actions/checkout@v4,
with: { submodules: true }
},
{
Expand Down Expand Up @@ -139,7 +139,7 @@
},
{
name: checkout,
uses: actions/checkout@v2,
uses: actions/checkout@v4,
with: { submodules: true }
},
{
Expand All @@ -155,15 +155,14 @@
name: build and unit test,
run: '.\.github\workflows\scripts\win\scons-build.bat'
},

]
},
# win-mingw: {
# runs-on: windows-2019,
# steps: [
# {
# name: checkout,
# uses: actions/checkout@v2,
# uses: actions/checkout@v4,
# with: { submodules: true }
# },
# {
Expand All @@ -186,7 +185,7 @@
steps: [
{
name: checkout,
uses: actions/checkout@v2,
uses: actions/checkout@v4,
with: { submodules: true }
},
{
Expand All @@ -198,10 +197,10 @@
run: 'sudo ./.github/workflows/scripts/linux/install-tgui.sh'
},
{
name: build and unit test,
run: CCFLAGS=-fdiagnostics-color=always scons
name: build and unit test headless,
run: 'xvfb-run ./.github/workflows/scripts/linux/scons-build.sh'
}
],
]
}
}
}
3 changes: 3 additions & 0 deletions .github/workflows/scripts/linux/scons-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -ve

CCFLAGS=-fdiagnostics-color=always scons
NQNStudios marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 7 additions & 4 deletions test/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ else:
test = env.Program("#build/bin/boe_test", test_sources + party_classes + common_sources)

def run_tests(env,target,source):
import subprocess
app = str(source[0].abspath)
if not subprocess.call(app):
open(target[0].abspath,'w').write("PASSED\n")
app = str(source[0].abspath)
exit_code = subprocess.call(app)
if exit_code == 0:
open(target[0].abspath,'w').write("PASSED\n")
else:
print(f'Unit test failure! Exit code: {exit_code}')
exit(exit_code)

env.Install("#build/test/", test)
if debug_symbols is not None:
Expand Down
Loading