-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression tests configuration for f18 repository #861
Regression tests configuration for f18 repository #861
Conversation
README.md
Outdated
be defined at cmake command line: | ||
|
||
LLVM_EXTERNAL_LIT=<LLVM_INSTALLATION_DIR>/bin/llvm-lit | ||
LLVM_TOOLS_BINARY_DIR= <LLVM_INSTALLATION_DIR>/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: stray space here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the cmake file be changed to use LLVM_INSTALLATION_DIR as a cmake variable and then infer the values for LLVM_DIR, LLVM_EXTERNAL_LIT and LLVM_TOOLS_BINARY_DIR from the value of LLVM_INSTALLATION_DIR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that LLVM_EXTERNAL_LIT needs to belong in the cmake command. I've tried in the CMakeLists.txt and it did not worked very well. llvm-lit file was not being found properly
test-lit/unit/lit.local.cfg
Outdated
@@ -0,0 +1 @@ | |||
config.suffixes = ['.f90', '.F90'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some tests in the test/ directory that use '.f' and '.F' as well, do those need to be included as suffixes here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably yes, I only add the bare minimum. I believe as the tests are being added to the test-lit this file should reflect this change as well as the others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add them now and save some poor soul in the future from having to figure this out again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation/OptionComparison.md has a list of file suffixes that other compilers accept, e.g. Cray accepts .f03 and .ftn. There's also a list in tools/f18.cc: "f", "F", "f18", "F18", "f90", "F90", "f95", "F95", "ff", "ff18", "ff90", and "ff95". The NAG compiler accept the 'ff' suffixes too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This pull request looks fine. Using the lit infrastructure is fine. However, when writing tests for compiler-emitted messages, my (perhaps outdated) understanding is that lit and its associated tools are unable to check for the precise location and number of error messages without, for example, hard-coding line numbers into the expected output. Clang has a different tool for checking the content and placement of messages. Clang's system is documented here: https://clang.llvm.org/doxygen/classclang_1_1VerifyDiagnosticConsumer.html#details Flang, like clang, has its own set of tools for precise checking of emitted messages, found in the shell scripts in the test subdirectories. (Python might be a better choice for portability, but that's a different topic.) |
Re @sscalpone
There is the [[#LINE + offset]] and [[#LINE - offset]] FileCheck syntax which allows you to avoid hard-coding line numbers in FileCheck tests: http://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-pseudo-numeric-variables See, e.g: https://github.com/llvm/llvm-project/blob/396d18aeb6cb4409ed71ff4c331748ce1c530f33/clang/test/SemaCXX/warn-max-unsigned-zero.cpp#L13-L14, which uses both |
In the same line of thought I believe that DiagnosticConsumer would be implemented by Flang Driver. |
@peterwaller-arm Thanks for the pointers. That looks pretty good to me. @CarolineConcatto What is the advantage of --verify over FileCheck? |
test-lit/CMakeLists.txt
Outdated
@@ -0,0 +1,32 @@ | |||
# Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this Nvidia copyright?
Also, do you want to use the new licensing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem of C&P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LLVM convention has removed the requirement for copyright. @gklimowicz is working on updating the f18 files with the new header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks that in llvm CMakeLists.txt does not have a header like the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
test-lit/unit/version_test.f90
Outdated
! Check that lit configuration works by checking the compiler version | ||
|
||
! RUN: f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s | ||
! VERSION-DAG: f18 compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a DAG check? Isn't DAG used when there are more than one check and the ordering is not significant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
test-lit/lit.cfg.py
Outdated
# tools that might happen to be in the user's PATH. | ||
tool_dirs = [config.flang_tools_dir, config.llvm_tools_dir] | ||
|
||
tools = ['flang', 'f18', 'opt'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is opt required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is not required. ATM I am replacing by :
tools = ['%flang' ,'%f18']
But don't know if this is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
README.md
Outdated
be defined at cmake command line: | ||
|
||
LLVM_EXTERNAL_LIT=<LLVM_INSTALLATION_DIR>/bin/llvm-lit | ||
LLVM_TOOLS_BINARY_DIR= <LLVM_INSTALLATION_DIR>/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the cmake file be changed to use LLVM_INSTALLATION_DIR as a cmake variable and then infer the values for LLVM_DIR, LLVM_EXTERNAL_LIT and LLVM_TOOLS_BINARY_DIR from the value of LLVM_INSTALLATION_DIR?
Hi Steve as I understand they do different stuff. |
@kiranchandramohan , how much is ok to change the CMakeLists.txt |
I do not know what is acceptable here? @sscalpone can answer this I guess. Can the cmake file be changed to use LLVM_INSTALLATION_DIR as a cmake variable and then infer the values for LLVM_DIR (existing), LLVM_EXTERNAL_LIT (new) and LLVM_TOOLS_BINARY_DIR (new) from the value of LLVM_INSTALLATION_DIR? |
When and why are the values of these macros different? What's the convention in the llvm makefiles? |
It looks like |
How do you run the lit tests? |
@tskeith I've updated the patch. After that only by doing |
I don't think you need LLVM_EXTERNAL_LIT on the cmake command if you set it like this:
|
@tskeith I believe you are right! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loads of comments, but aside from a few small errors (I think) we are well into the details now and I think this patch is almost ready.
I assume before submitting you will squash the commits together into one commit?
Also - typo in the commit message of this patch - prunning should be pruning.
CMakeLists.txt
Outdated
@@ -58,6 +58,10 @@ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION} in ${LLVM_DIR}") | |||
list(APPEND CMAKE_MODULE_PATH ${LLVM_DIR}) | |||
|
|||
include(AddLLVM) | |||
|
|||
set(LLVM_TOOLS_BINARY ${LLVM_INSTALLATION_DIR}/bin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be LLVM_TOOLS_BINARY_DIR.
Also - what is this used for? It seems like it is not used elsewhere in the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in case LLVM_DIR has LLVM which has LLVM=$LLVM_PATH/lib/cmake/llvm
In README we should build f18 as:
LLVM=<LLVM_INSTALLATION_DIR>/lib/cmake/llvm cmake -DLLVM_DIR=$LLVM.
where is this LLVM_INSTALLATION_DIR defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using now LLVM variables
CMakeLists.txt
Outdated
@@ -135,8 +140,8 @@ add_subdirectory(include/flang) | |||
add_subdirectory(lib) | |||
add_subdirectory(runtime) | |||
add_subdirectory(test) | |||
add_subdirectory(test-lit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked it in the previous location, why the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed because the CMakeLists.txt inside tools was needed for test-lit
README.md
Outdated
@@ -81,7 +81,7 @@ where llvm is installed. | |||
|
|||
### LLVM dependency for lit Regression tests | |||
|
|||
There are lit tests for the flang driver instance, these tests rely on the | |||
There are lit tests for the flang driver instance, these tests rely on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is not future proof. I hope that in a the near-term future there will be more testing done with llvm-lit than just for the flang driver. We should re-word this to be something like "F18 has tests that use the lit framework, these tests rely on ...."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@@ -81,7 +81,7 @@ where llvm is installed. | |||
|
|||
### LLVM dependency for lit Regression tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that with this patch anyone building F18 and running make check will encounter an error unless LLVM_EXTERNAL_LIT, etc. is specified in the make check line? If I have understood that correctly, then I think it would benefit the docs to have one example make line for F18 that includes both -DLLVM_DIR and -DLLVM_EXTERNAL_LIT. Perhaps put this at the bottom of this section?
You also need to add a note here about defining -DLLVM_INSTALL_UTILS=On to the part about building LLVM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need to set DLLVM_EXTERNAL_LIT if we do not want.
test-lit/lit.cfg.py
Outdated
|
||
llvm_config.use_default_substitutions() | ||
|
||
# excludes: A list of directories to exclude from the testsuite. The 'Inputs' | ||
# subdirectories contain auxiliary inputs for various tests in their parent | ||
# directories. | ||
config.excludes = ['Inputs', 'CMakeLists.txt', 'README.txt', 'LICENSE.txt', 'debuginfo-tests'] | ||
config.excludes = ['CMakeLists.txt', 'README.txt', 'LICENSE.txt'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep Inputs in this list. Sure we don't need it for any tests in the initial patch, but it is a well-understood feature of LLVM lit tests to have this directory so we should support it. Plus, your comment still talks about it despite it being removed from the list. Agree with removing debuginfo-tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@@ -3,8 +3,6 @@ | |||
import sys | |||
|
|||
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - now I think I understand the LLVM_TOOLS_BINARY_DIR need. I think you have used LLVM_TOOLS_BINARY_DIR and LLVM_TOOLS_DIR somewhat interchangeably in this patchset but, unless I am misunderstanding things, they mean to be the same thing. I think if you make it all line up this should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
test-lit/unit/lit.local.cfg
Outdated
@@ -1 +1,2 @@ | |||
config.suffixes = ['.f90', '.F90'] | |||
config.suffixes = [ '.f', '.F', '.f18', '.F18', '.f90', '.F90', '.f95', '.F95', '.ff', '.ff18', '.ff90', '.ff95'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to just set the global config.suffixes to all the fortran input file extensions F18 know about (earlier comment of mine) and then you don't need to set this here and the lit.local.cfg file can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
test-lit/unit/version_test.f90
Outdated
@@ -1,4 +1,4 @@ | |||
! Check that lit configuration works by checking the compiler version | |||
|
|||
! RUN: f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s | |||
! VERSION-DAG: f18 compiler | |||
! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like 'unit' as a test subdirectory name. I think it should be driver, as that is what this test is testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would still not catch lots of bad cases. All of the below version outputs would pass this test.
echo "f18 compiler (under development) foo" | FileCheck --check-prefix=VERSION version_test.f90
echo "foo f18 compiler (under development)" | FileCheck --check-prefix=VERSION version_test.f90
echo "f18 compiler (under development)foo" | FileCheck --check-prefix=VERSION version_test.f90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
test-lit/unit/version_test.f90
Outdated
! RUN: f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s | ||
! VERSION-DAG: f18 compiler | ||
! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s | ||
! VERSION: f18 compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run this I get
f18 compiler (under development)
Presumably this test is a demo of what the new framework can do rather than some placeholder for a real test. Therefore I think we may as well make this first lit test a proper test of functionality. -V is a great candidate and I expect that in the fullness of time the output might have some sort of sensible version number in it that we might check the format of with a regex in our test. For now it says this message, so regex is too much, but I think we should match the whole string in this test to be sure and also check there is no additional output after this line.
Put it another way, of we accidentally changed the message to something silly like "f18 compiler (foo bar wibble)" then this test wouldn't catch that for us would it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
CMakeLists.txt
Outdated
@@ -59,8 +59,8 @@ list(APPEND CMAKE_MODULE_PATH ${LLVM_DIR}) | |||
|
|||
include(AddLLVM) | |||
|
|||
set(LLVM_TOOLS_BINARY ${LLVM_INSTALLATION_DIR}/bin) | |||
set(LLVM_LIT_TOOLS_DIR$ ${LLVM_INSTALLATION_DIR}/bin) | |||
set(LLVM_LIT_TOOLS_DIR ${LLVM_INSTALATION_DIR} CACHE STRING "Command used to spawn lit") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of these STRING values is wrong (both variables can't do the same thing surely?) and I assume it is this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
test-lit/unit/version_test.f90
Outdated
@@ -1,4 +1,4 @@ | |||
! Check that lit configuration works by checking the compiler version | |||
|
|||
! RUN: f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s | |||
! VERSION-DAG: f18 compiler | |||
! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would still not catch lots of bad cases. All of the below version outputs would pass this test.
echo "f18 compiler (under development) foo" | FileCheck --check-prefix=VERSION version_test.f90
echo "foo f18 compiler (under development)" | FileCheck --check-prefix=VERSION version_test.f90
echo "f18 compiler (under development)foo" | FileCheck --check-prefix=VERSION version_test.f90
CMakeLists.txt
Outdated
@@ -60,7 +60,7 @@ list(APPEND CMAKE_MODULE_PATH ${LLVM_DIR}) | |||
include(AddLLVM) | |||
|
|||
set(LLVM_LIT_TOOLS_DIR ${LLVM_INSTALATION_DIR} CACHE STRING "Command used to spawn lit") | |||
set(LLVM_EXTERNAL_LIT ${LLVM_INTALATION_DIR}/llvm-lit CACHE STRING "Command used to spawn lit") | |||
set(LLVM_EXTERNAL_LIT ${LLVM_INTALATION_DIR}/llvm-lit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos here - should be LLVM_INSTALLATION_DIR on this and line 62 (surprised everything still worked despite this!)
It still seems wrong to me. LLVM_LIT_TOOLS_DIR is surely a directory rather than a command so I think the cached string there is the one that needed changing. I can believe that LLVM_EXTERNAL_LIT pointing to llvm-lit executable is a "Command used to spawn lit". What does LLVM_LIT_TOOLS_DIR do? That should be the cached string.
It also seems a shame not to use it in line 63 to define LLVM_EXTERNAL_LIT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now our regression tests uses LLVM variables.
LLVM_EXTERNAL_LIT is in cache because LLVM does not cache this variable.
test-lit/driver/version_test.f90
Outdated
@@ -1,5 +1,7 @@ | |||
! Check that lit configuration works by checking the compiler version | |||
|
|||
! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s | |||
! VERSION: {{[[:space:]]}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test will still pass with the following incorrect output from f18 -V
:
This is a bug
This is also a bug
f18 compiler (under development) This too
And this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The task to check if there is nothing else before the expected text is not trivial with FileCheck.
These discussions show how to implement a check of space with regression tests.
https://reviews.llvm.org/D28896 https://reviews.llvm.org/D29122
There is also the command CHECK-EMPTY but it cannot be used in the beginning of the checks
The task is also difficult to check the end of the file for nothing ever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the benefit of the review, Carol and I had a face-to-face conversation about this and agreed that as it is not trivial to make this test more robust using FileCheck and that our main aim with this simple test is just to prove the infrastructure she has added for FileCheck and lit works that it is not worth the trouble of making the test super robust at this point. We should revisit how best to make this test hardened at a later date. We may yet tweak the format of the version output and the new output might be more amenable to robust testing using FileCheck, so we might not hit this issue. We might also consider contributing further changes to FileCheck to make this test easier to write.
CMakeLists.txt
Outdated
@@ -65,7 +69,7 @@ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION} in ${LLVM_DIR}") | |||
# components (default is 'all') can be obtained with | |||
# | |||
# llvm-config --libs --link-static [component ...] | |||
# | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This stray space should be deleted.
test-lit/driver/version_test.f90
Outdated
@@ -1,5 +1,7 @@ | |||
! Check that lit configuration works by checking the compiler version | |||
|
|||
! RUN: %f18 -V 2>&1 | FileCheck -check-prefix=VERSION %s | |||
! VERSION: {{[[:space:]]}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the benefit of the review, Carol and I had a face-to-face conversation about this and agreed that as it is not trivial to make this test more robust using FileCheck and that our main aim with this simple test is just to prove the infrastructure she has added for FileCheck and lit works that it is not worth the trouble of making the test super robust at this point. We should revisit how best to make this test hardened at a later date. We may yet tweak the format of the version output and the new output might be more amenable to robust testing using FileCheck, so we might not hit this issue. We might also consider contributing further changes to FileCheck to make this test easier to write.
I think this is about ready to land. Remove the stray space and I will accept. |
@RichBarton-Arm extra space removed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Carol. This all LGTM and I think we are ready to land.
@sscalpone can you merge it please?
@CarolineConcatto Please squash & update. Then I'll merge this PR. Thanks! |
The configuration for the tests are in lit.* files. The lit tests rely on the presence of llvm-lit,FileCheck, not and count. When building LLVM add: -DLLVM_INSTALL_UTILS=On at the cmake command. LLVM_LIT is found by setting LLVM_EXTERNAL_LIT in f18 CMakeLists.txt. This patch: * Uses LLVM_EXTERNAL_LIT * Adds regression tests configurations * Adds a proof of concept regression test The regression test needs to have the Utils build in LLVM. This is done by adding: -DLLVM_INSTALL_UTILS=On to the LLVM build cmake. Signed-off-by: Caroline Concatto <caroline.concatto@arm.com>
ea37582
to
1049aeb
Compare
@sscalpone can you check if that is what you need in order to merge? |
…iler/f18#861) The configuration for the tests are in lit.* files. The lit tests rely on the presence of llvm-lit,FileCheck, not and count. When building LLVM add: -DLLVM_INSTALL_UTILS=On at the cmake command. LLVM_LIT is found by setting LLVM_EXTERNAL_LIT in f18 CMakeLists.txt. This patch: * Uses LLVM_EXTERNAL_LIT * Adds regression tests configurations * Adds a proof of concept regression test The regression test needs to have the Utils build in LLVM. This is done by adding: -DLLVM_INSTALL_UTILS=On to the LLVM build cmake. Signed-off-by: Caroline Concatto <caroline.concatto@arm.com> Original-commit: flang-compiler/f18@a58c606 Reviewed-on: flang-compiler/f18#861
…iler/f18#861) The configuration for the tests are in lit.* files. The lit tests rely on the presence of llvm-lit,FileCheck, not and count. When building LLVM add: -DLLVM_INSTALL_UTILS=On at the cmake command. LLVM_LIT is found by setting LLVM_EXTERNAL_LIT in f18 CMakeLists.txt. This patch: * Uses LLVM_EXTERNAL_LIT * Adds regression tests configurations * Adds a proof of concept regression test The regression test needs to have the Utils build in LLVM. This is done by adding: -DLLVM_INSTALL_UTILS=On to the LLVM build cmake. Signed-off-by: Caroline Concatto <caroline.concatto@arm.com> Original-commit: flang-compiler/f18@a58c606 Reviewed-on: flang-compiler/f18#861
The configuration for the regression tests are in lit.* files. These tests rely on the
presence of llvm-lit and FileCheck, as long as F18 is not a part of the
monorepo it needs requires -DLLVM_EXTERNAL_LIT to be defined at cmake
configuration time to point to /bin/llvm-lit from an LLVM build.
This patch:
lit.cfg.py and lit.site.cfg.py.in to make a simple version lit test to work
Signed-off-by: Caroline Concatto caroline.concatto@arm.com