[flang-commits] [PATCH] D80377: [flang] Google test infrastructure support for unittests
Richard Barton via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue May 26 03:44:56 PDT 2020
richard.barton.arm added a comment.
I think the code to handle the issue that @tskeith points out in clang standalone builds is here https://github.com/llvm/llvm-project/blob/master/clang/CMakeLists.txt#L187. The key is to add a dependency on the utils/unittest directory.
There is also a GTest format that should be set in the lit.cfg https://github.com/llvm/llvm-project/blob/master/clang/test/Unit/lit.cfg.py#L24.
================
Comment at: flang/test/Unit/lit.cfg.py:30
+# Propagate LLVM_SRC_ROOT into the environment.
+config.environment['LLVM_SRC_ROOT'] = config.llvm_src_root
+
----------------
Why is LLVM_SRC_ROOT needed for the tests?
================
Comment at: flang/test/Unit/lit.cfg.py:33
+# Propagate PYTHON_EXECUTABLE into the environment
+config.environment['PYTHON_EXECUTABLE'] = sys.executable
+
----------------
Other sub-projects set this up in top-level CMakeLists using FindPythonInterp. Why do we set it here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80377/new/
https://reviews.llvm.org/D80377
More information about the flang-commits
mailing list