mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
last test
This commit is contained in:
parent
dc2812f36e
commit
192250cc7c
3 changed files with 21 additions and 14 deletions
2
.github/workflows/cmake.yml
vendored
2
.github/workflows/cmake.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest, macos-latest ]
|
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ forwardDef(TORQUE_BASIC_LIGHTING)
|
||||||
set(TORQUE_SDL ON) # we need sdl to do our platform interop
|
set(TORQUE_SDL ON) # we need sdl to do our platform interop
|
||||||
forwardDef(TORQUE_SDL)
|
forwardDef(TORQUE_SDL)
|
||||||
|
|
||||||
|
if(TORQUE_TESTING)
|
||||||
|
forwardDef(TORQUE_TESTS_ENABLED)
|
||||||
|
endif()
|
||||||
|
|
||||||
# On Windows we disable CRT Security warnings - this comes from recommendations to use non-portable functions.
|
# On Windows we disable CRT Security warnings - this comes from recommendations to use non-portable functions.
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(TORQUE_COMPILE_DEFINITIONS ${TORQUE_COMPILE_DEFINITIONS} _CRT_SECURE_NO_WARNINGS WIN32)
|
set(TORQUE_COMPILE_DEFINITIONS ${TORQUE_COMPILE_DEFINITIONS} _CRT_SECURE_NO_WARNINGS WIN32)
|
||||||
|
|
@ -212,7 +216,7 @@ endif (UNIX AND NOT APPLE)
|
||||||
|
|
||||||
if(TORQUE_TESTING)
|
if(TORQUE_TESTING)
|
||||||
torqueAddSourceDirectories("testing")
|
torqueAddSourceDirectories("testing")
|
||||||
set(TORQUE_COMPILE_DEFINITIONS ${TORQUE_COMPILE_DEFINITIONS} TORQUE_SHARED SDL_MAIN_HANDLED TORQUE_TESTS_ENABLED)
|
set(TORQUE_COMPILE_DEFINITIONS ${TORQUE_COMPILE_DEFINITIONS} TORQUE_SHARED SDL_MAIN_HANDLED)
|
||||||
endif(TORQUE_TESTING)
|
endif(TORQUE_TESTING)
|
||||||
|
|
||||||
# Add the collected files to our engine group
|
# Add the collected files to our engine group
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <execinfo.h>
|
|
||||||
#include "console/engineAPI.h"
|
#include "console/engineAPI.h"
|
||||||
#include "core/util/journal/process.h"
|
#include "core/util/journal/process.h"
|
||||||
#ifndef TORQUE_DEDICATED
|
#ifndef TORQUE_DEDICATED
|
||||||
|
|
@ -60,17 +59,21 @@ static void CheckExitCode(S64 exitCode)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
static void SignalHandler(int sigtype)
|
static void SignalHandler(int sigtype)
|
||||||
{
|
{
|
||||||
void* array[10];
|
if (sigtype == SIGSEGV || sigtype == SIGTRAP)
|
||||||
size_t size;
|
{
|
||||||
|
signal(SIGSEGV, SIG_DFL);
|
||||||
signal(sigtype, SIG_DFL);
|
signal(SIGTRAP, SIG_DFL);
|
||||||
|
// restore the signal handling to default so that we don't get into
|
||||||
size = backtrace(array, 10);
|
// a crash loop with ImmediateShutdown
|
||||||
|
ImmediateShutdown(-sigtype, sigtype);
|
||||||
dPrintf("Error: signal: % d\n", sigtype);
|
}
|
||||||
backtrace_symbols_fd(array, size, STDERR_FILENO);
|
else
|
||||||
// exit to be safe
|
{
|
||||||
ImmediateShutdown(1);
|
signal(sigtype, SIG_DFL);
|
||||||
|
dPrintf("Unknown signal caught by SignalHandler: %d\n", sigtype);
|
||||||
|
// exit to be safe
|
||||||
|
ImmediateShutdown(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue