testPlan(): select isolated network configuration for QSRV

This commit is contained in:
Michael Davidsaver
2023-02-21 07:17:39 -08:00
parent 93e4d3eef3
commit cf4b568e64
4 changed files with 18 additions and 1 deletions
+10
View File
@@ -4,6 +4,8 @@
* in file LICENSE that is included with this distribution.
*/
#include <atomic>
#include "pvxs/version.h"
#if !defined(GCC_VERSION) || GCC_VERSION>VERSION_INT(4,9,0,0)
@@ -29,6 +31,8 @@
namespace pvxs {
static std::atomic<bool> thisIsATest{false};
void testSetup()
{
#ifdef _WIN32
@@ -39,9 +43,15 @@ void testSetup()
if(prev)
testDiag("SetErrorMode() disables 0x%x\n", (unsigned)prev);
#endif
thisIsATest = true;
}
namespace impl {
bool inUnitTest()
{
return thisIsATest;
}
loc_bad_alloc::loc_bad_alloc(const char *file, int line)
{
if(auto sep = strrchr(file, '/')) {