[libcxx] [libcxxabi] [libunwind] [llvm] [libc++][WIP] Move the libc++ test format to Lit (PR #90803)
Mark de Wever via cfe-commits
cfe-commits at lists.llvm.org
Wed May 8 08:42:14 PDT 2024
================
@@ -0,0 +1,355 @@
+# ===----------------------------------------------------------------------===##
+#
+# 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
+#
+# ===----------------------------------------------------------------------===##
+
+import lit
+import os
+import re
+from .base import FileBasedTest
+
+
+def _getSubstitution(substitution, config):
+ """
+ Helper function to get a specific substitution from a config object.
+ """
+ for (orig, replacement) in config.substitutions:
+ if orig == substitution:
+ return replacement
+ raise ValueError("Substitution {} is not in the config.".format(substitution))
+
+
+def _appendToSubstitution(substitutions, key, value):
----------------
mordante wrote:
Should we also add `_prependToSubstitution` which is also in `dsl.py`?
https://github.com/llvm/llvm-project/pull/90803
More information about the cfe-commits
mailing list