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
llvm/test/tools/UpdateTestChecks/update_cc_test_checks use clang but don't depend on clang #44143
Comments
The tests should be checking for the presence of clang and be UNSUPPORTED if it's not avilable: https://github.com/llvm/llvm-project/blob/master/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/lit.local.cfg I checked that the tests don't run if I delete bin/clang from the build directory. This seems like your build directory contains a broken clang? /builddirs/llvm-project/build-Clang9-unknown/./bin/clang: symbol lookup error: /builddirs/llvm-project/build-Clang9-unknown/bin/../lib/libclangCodeGen.so.11git: undefined symbol: _ZN4llvm20RemarkSetupFileError2IDE |
I am not sure if it's possible to add a cmake dependency just for those tests since the clang target is probably not defined when they run? |
|
Yes sorry, I realized after posting that comment what the real issue is. I've posted https://reviews.llvm.org/D74051 which should fix it. I am not sure if this is desirable, but I can't see a better solution that allows incremental check-llvm to work. |
Shouldn't this test live in clangtest/tools/UpdateTestChecks/update_cc_test_checks or similar? |
D74051 landed at rG61dd0603bd8a, moving the tests into clang\test\utils\update_cc_test_checks |
Extended Description
$ ninja check-llvm
[1/295] Generating VCSRevision.h
-- Found Git: /usr/bin/git (found version "2.25.0")
[294/295] Running the LLVM regression tests
FAIL: LLVM :: tools/UpdateTestChecks/update_cc_test_checks/def-and-decl.test (33391 of 35753)
******************** TEST 'LLVM :: tools/UpdateTestChecks/update_cc_test_checks/def-and-decl.test' FAILED ********************
Script:
: 'RUN: at line 3'; cp /repositories/llvm-project/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/def-and-decl.c /builddirs/llvm-project/build-Clang9-unknown/test/tools/UpdateTestChecks/update_cc_test_checks/Output/def-and-decl.test.tmp.c && '/usr/bin/python' /repositories/llvm-project/llvm/utils/update_cc_test_checks.py --clang /builddirs/llvm-project/build-Clang9-unknown/./bin/clang --opt /builddirs/llvm-project/build-Clang9-unknown/./bin/opt /builddirs/llvm-project/build-Clang9-unknown/test/tools/UpdateTestChecks/update_cc_test_checks/Output/def-and-decl.test.tmp.c
: 'RUN: at line 4'; diff -u /repositories/llvm-project/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/def-and-decl.c.expected /builddirs/llvm-project/build-Clang9-unknown/test/tools/UpdateTestChecks/update_cc_test_checks/Output/def-and-decl.test.tmp.c
: 'RUN: at line 6'; '/usr/bin/python' /repositories/llvm-project/llvm/utils/update_cc_test_checks.py --clang /builddirs/llvm-project/build-Clang9-unknown/./bin/clang --opt /builddirs/llvm-project/build-Clang9-unknown/./bin/opt /builddirs/llvm-project/build-Clang9-unknown/test/tools/UpdateTestChecks/update_cc_test_checks/Output/def-and-decl.test.tmp.c
: 'RUN: at line 7'; diff -u /repositories/llvm-project/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/def-and-decl.c.expected /builddirs/llvm-project/build-Clang9-unknown/test/tools/UpdateTestChecks/update_cc_test_checks/Output/def-and-decl.test.tmp.c
Exit Code: 1
Command Output (stdout):
$ ":" "RUN: at line 3"
$ "cp" "/repositories/llvm-project/llvm/test/tools/UpdateTestChecks/update_cc_test_checks/Inputs/def-and-decl.c" "/builddirs/llvm-project/build-Clang9-unknown/test/tools/UpdateTestChecks/update_cc_test_checks/Output/def-and-decl.test.tmp.c"
$ "/usr/bin/python" "/repositories/llvm-project/llvm/utils/update_cc_test_checks.py" "--clang" "/builddirs/llvm-project/build-Clang9-unknown/./bin/clang" "--opt" "/builddirs/llvm-project/build-Clang9-unknown/./bin/opt" "/builddirs/llvm-project/build-Clang9-unknown/test/tools/UpdateTestChecks/update_cc_test_checks/Output/def-and-decl.test.tmp.c"
command stderr:
/builddirs/llvm-project/build-Clang9-unknown/./bin/clang: symbol lookup error: /builddirs/llvm-project/build-Clang9-unknown/bin/../lib/libclangCodeGen.so.11git: undefined symbol: _ZN4llvm20RemarkSetupFileError2IDE
WARNING: Could not determine clang builtins directory, some tests might not update correctly.
/builddirs/llvm-project/build-Clang9-unknown/./bin/clang: symbol lookup error: /builddirs/llvm-project/build-Clang9-unknown/bin/../lib/libclangCodeGen.so.11git: undefined symbol: _ZN4llvm20RemarkSetupFileError2IDE
Traceback (most recent call last):
File "/repositories/llvm-project/llvm/utils/update_cc_test_checks.py", line 304, in
sys.exit(main())
File "/repositories/llvm-project/llvm/utils/update_cc_test_checks.py", line 265, in main
get_function_body(args, filename, clang_args, extra_commands, prefixes, triple_in_cmd, func_dict)
File "/repositories/llvm-project/llvm/utils/update_cc_test_checks.py", line 161, in get_function_body
raw_tool_output = common.invoke_tool(args.clang, clang_args, filename)
File "/repositories/llvm-project/llvm/utils/UpdateTestChecks/common.py", line 50, in invoke_tool
stdout = subprocess.check_output([exe] + cmd_args, stdin=ir_file)
File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/builddirs/llvm-project/build-Clang9-unknown/./bin/clang', '-cc1', '-triple', 'x86_64-unknown-linux-gnu', '/builddirs/llvm-project/build-Clang9-unknown/test/tools/UpdateTestChecks/update_cc_test_checks/Output/def-and-decl.test.tmp.c', '-emit-llvm', '-o', '-']' returned non-zero exit status 127
error: command failed with exit status: 1
--
Testing Time: 702.24s
Failing Tests (1):
LLVM :: tools/UpdateTestChecks/update_cc_test_checks/def-and-decl.test
Expected Passes : 35113
Expected Failures : 149
Unsupported Tests : 490
Unexpected Failures: 1
FAILED: test/CMakeFiles/check-llvm
cd /builddirs/llvm-project/build-Clang9-unknown/test && /usr/bin/python /builddirs/llvm-project/build-Clang9-unknown/./bin/llvm-lit -sv /builddirs/llvm-project/build-Clang9-unknown/test
ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered: