[libc-commits] [libc] d9a04d1 - [libc] Support running tests for Pigweed

Alex Brachet via libc-commits libc-commits at lists.llvm.org
Thu Feb 16 08:39:17 PST 2023


Author: Alex Brachet
Date: 2023-02-16T16:39:09Z
New Revision: d9a04d1d5453abeba926bbdc0f739876130d22c5

URL: https://github.com/llvm/llvm-project/commit/d9a04d1d5453abeba926bbdc0f739876130d22c5
DIFF: https://github.com/llvm/llvm-project/commit/d9a04d1d5453abeba926bbdc0f739876130d22c5.diff

LOG: [libc] Support running tests for Pigweed

Differential Revision: https://reviews.llvm.org/D144146

Added: 
    libc/test/UnitTest/PigweedTest.h

Modified: 
    libc/test/UnitTest/Test.h

Removed: 
    


################################################################################
diff  --git a/libc/test/UnitTest/PigweedTest.h b/libc/test/UnitTest/PigweedTest.h
new file mode 100644
index 0000000000000..f3b33b76be4bd
--- /dev/null
+++ b/libc/test/UnitTest/PigweedTest.h
@@ -0,0 +1,18 @@
+//===-- Header for setting up the Pigweed tests -----------------*- 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_PIGWEEDTEST_H
+#define LLVM_LIBC_UTILS_UNITTEST_PIGWEEDTEST_H
+
+#include <gtest/gtest.h>
+
+namespace __llvm_libc::testing {
+using Test = ::testing::Test;
+}
+
+#endif // LLVM_LIBC_UTILS_UNITTEST_PIGWEEDTEST_H

diff  --git a/libc/test/UnitTest/Test.h b/libc/test/UnitTest/Test.h
index 60dfcbfa28d4c..19c4149b3ac00 100644
--- a/libc/test/UnitTest/Test.h
+++ b/libc/test/UnitTest/Test.h
@@ -11,6 +11,8 @@
 
 #ifdef LIBC_COPT_TEST_USE_FUCHSIA
 #include "FuchsiaTest.h"
+#elif defined(LIBC_COPT_TEST_USE_PIGWEED)
+#include "PigweedTest.h"
 #else
 #include "LibcTest.h"
 #endif


        


More information about the libc-commits mailing list