Transfer test programs as well for cross-testing

This commit is contained in:
ISSOtm
2022-05-05 18:51:36 +02:00
committed by Eldred Habert
parent 3cfe7800c7
commit 159efe1257
3 changed files with 26 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
// For `execProg` (Windows is its special little snowflake again)
#ifndef _MSC_VER
#if !defined(_MSC_VER) && !defined(__MINGW32__)
#include <sys/stat.h>
#include <sys/wait.h>
@@ -280,7 +280,7 @@ public:
};
static char *execProg(char const *name, char * const *argv) {
#ifndef _MSC_VER
#if !defined(_MSC_VER) && !defined(__MINGW32__)
pid_t pid;
int err = posix_spawn(&pid, argv[0], nullptr, nullptr, argv, nullptr);
if (err != 0) {
@@ -298,7 +298,7 @@ static char *execProg(char const *name, char * const *argv) {
fatal("%s returned with status %d", name, info.si_status);
}
#else /* defined(_MSC_VER) */
#else /* defined(_MSC_VER) || defined(__MINGW32__) */
auto winStrerror = [](DWORD errnum) {
LPTSTR buf;