This is an archive of the discontinued LLVM Phabricator instance.

[test-suite] Signal error if llvm-lit was not found
AbandonedPublic

Authored by lebedev.ri on Apr 1 2019, 1:09 PM.

Details

Summary

I'm not sure if that was intentional or not?
I found it quite surprising when trying to integrate a new external project.

Diff Detail

Repository
rL LLVM

Event Timeline

lebedev.ri created this revision.Apr 1 2019, 1:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2019, 1:09 PM
Herald added a subscriber: mgorny. · View Herald Transcript
hfinkel accepted this revision.Jun 25 2019, 4:26 PM

LGTM

This revision is now accepted and ready to land.Jun 25 2019, 4:26 PM
This revision was automatically updated to reflect the committed changes.

This seems to have broken test-suite build bots?

http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/13870

CMake Error at CMakeLists.txt:220 (message):
  llvm-lit not found.

  Make sure it is in your path or specify it via -DTEST_SUITE_LIT:FILEPATH=""

The test suite seems to have executed correctly before this change brought in this error message ...

lebedev.ri marked an inline comment as done.Jun 26 2019, 9:53 AM

This seems to have broken test-suite build bots?

http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/13870

CMake Error at CMakeLists.txt:220 (message):
  llvm-lit not found.

  Make sure it is in your path or specify it via -DTEST_SUITE_LIT:FILEPATH=""

The test suite seems to have executed correctly before this change brought in this error message ...

Uhm, that makes no sense.
How is that test runs, not via check target?

test-suite/trunk/CMakeLists.txt
317–318

that is created here?

As discussed in IRC, the test-suite builds invoke lit manually; so it was always "broken".
I'll revert this for a bit, but please fix the configs.
Encountering it when trying to run check target after successful cmake configure was not pleasant at all.

Uhm, that makes no sense.
How is that test runs, not via check target?

The builder is created by this rule:

'factory' : ClangBuilder.getClangCMakeBuildFactory(jobs=4,
                                                   clean=False,
                                                   checkout_lld=False,
                                                   useTwoStage=False,
                                                   runTestSuite=True,
                                                   stage1_config='Release',
                                                   testsuite_flags=['--threads=4', '--build-threads=4'],
                                                   extra_cmake_args=["-DLLVM_ENABLE_ASSERTIONS=ON"]),

That code seems to pass in the pass to llvm-lit via the "--use-lit" argument to "lnt":

lit = WithProperties('%(workdir)s/'+stage1_build+'/bin/llvm-lit')
test_suite_cmd = [python, lnt, 'runtest', 'test-suite',
                  '--no-timestamp',
                  '--sandbox', sandbox,
                  '--test-suite', test_suite_dir,
                  '--cc', cc,
                  '--cxx', cxx,
                  '--use-lit', lit]

This code is from zorg/buildbot/builders/ClangBuilder.py in http://llvm.org/svn/llvm-project/zorg/trunk ... is this not how it's supposed to be used?

lebedev.ri added a comment.EditedJun 26 2019, 10:09 AM

Reverted in rL364448, thanks.
I have never touched bot configs, so i'm not the one to fix the phenomenon, so please address it.

Reverted in rL364448, thanks.
I have never touched bot configs, so i'm not the one to fix the phenomenon, so please address it.

I think that the point is that you can configure and build the test suite without lit, and if lnt knows there lit is, then cmake doesn't need to know. Is that right?

lebedev.ri reopened this revision.Jun 26 2019, 10:43 AM
This revision is now accepted and ready to land.Jun 26 2019, 10:43 AM

Oh i see, LNT itself does not propagate it's --use-lit to test-suite's TEST_SUITE_LIT.

lebedev.ri abandoned this revision.Jun 26 2019, 11:01 AM