return false;
}
+#ifdef ENABLE_SUBPROCESS_TESTS
+
bool Test::testProcessKilled(testutils::FunctionCaller *Func, int Signal,
const char *LHSStr, const char *RHSStr,
const char *File, unsigned long Line) {
return false;
}
+#endif // ENABLE_SUBPROCESS_TESTS
} // namespace testing
} // namespace __llvm_libc
// This file can only include headers from utils/CPP/ or utils/testutils. No
// other headers should be included.
+#include "PlatformDefs.h"
+
#include "utils/CPP/TypeTraits.h"
#include "utils/testutils/ExecuteFunction.h"
#include "utils/testutils/StreamWrapper.h"
if (!EXPECT_FALSE(VAL)) \
return
+#ifdef ENABLE_SUBPROCESS_TESTS
+
#define EXPECT_EXITS(FUNC, EXIT) \
this->testProcessExits(__llvm_libc::testing::Test::createCallable(FUNC), \
EXIT, #FUNC, #EXIT, __FILE__, __LINE__)
#define __CAT(a, b) __CAT1(a, b)
#define UNIQUE_VAR(prefix) __CAT(prefix, __LINE__)
+#endif // ENABLE_SUBPROCESS_TESTS
+
#define EXPECT_THAT(MATCH, MATCHER) \
do { \
auto UNIQUE_VAR(__matcher) = (MATCHER); \
--- /dev/null
+//===-- Platform specific defines for the unittest library ------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_UTILS_UNITTEST_PLATFORMDEFS_H
+#define LLVM_LIBC_UTILS_UNITTEST_PLATFORMDEFS_H
+
+#if !(defined(_WIN32) || defined(_WIN64))
+#define ENABLE_SUBPROCESS_TESTS
+#endif
+
+#endif // LLVM_LIBC_UTILS_UNITTEST_PLATFORMDEFS_H