mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +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}}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest ]
|
||||
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ forwardDef(TORQUE_BASIC_LIGHTING)
|
|||
set(TORQUE_SDL ON) # we need sdl to do our platform interop
|
||||
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.
|
||||
if (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)
|
||||
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)
|
||||
|
||||
# Add the collected files to our engine group
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <execinfo.h>
|
||||
#include "console/engineAPI.h"
|
||||
#include "core/util/journal/process.h"
|
||||
#ifndef TORQUE_DEDICATED
|
||||
|
|
@ -60,17 +59,21 @@ static void CheckExitCode(S64 exitCode)
|
|||
//-----------------------------------------------------------------------------
|
||||
static void SignalHandler(int sigtype)
|
||||
{
|
||||
void* array[10];
|
||||
size_t size;
|
||||
|
||||
signal(sigtype, SIG_DFL);
|
||||
|
||||
size = backtrace(array, 10);
|
||||
|
||||
dPrintf("Error: signal: % d\n", sigtype);
|
||||
backtrace_symbols_fd(array, size, STDERR_FILENO);
|
||||
// exit to be safe
|
||||
ImmediateShutdown(1);
|
||||
if (sigtype == SIGSEGV || sigtype == SIGTRAP)
|
||||
{
|
||||
signal(SIGSEGV, SIG_DFL);
|
||||
signal(SIGTRAP, SIG_DFL);
|
||||
// restore the signal handling to default so that we don't get into
|
||||
// a crash loop with ImmediateShutdown
|
||||
ImmediateShutdown(-sigtype, sigtype);
|
||||
}
|
||||
else
|
||||
{
|
||||
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