Unresolved tests when trying to run Swift tests with lit

Hi everyone.

What I have done so far:

  • Build Swift using utils/build-script --xcode --debug so I can use Xcode
  • Let Xcode build and run the "All Build" target

So far everything built successfully but I wanted to run the tests as well to assert that everything works but every time all my tests fail with the error "unresolved tests".

Lit also gives me warnings:

  • warning: couldn't find 'sil-opt' program, try setting SIL_OPT in your environment
  • warning: couldn't find 'sil-func-extractor' program, try setting SIL_FUNC_EXTRACTOR in your environment
  • ... and so on

Python version: 2.7.10
macOS: 10.14.5
Xcode: 11-beta 2

Would be cool if anyone knew what the problem here is, I really want to work on my first contribution.

I work with it on Ubuntu, so I can't really test, but it says in Readme that:

The generated Xcode project does not integrate with the test runner, but the tests can be run with the 'check-swift' target.

So perhaps you tried to run check-swift target? Did you also make sure you downloaded all other repos aside from apple/swift?

It may not solve your immediate problem, but I would highly recommend setting up a parallel build of the compiler using ninja in the release configuration. This will allow you to use lit to run tests as described in the docs, but perhaps more importantly will run the tests ~10x faster than a debug build (20 min. vs 2.5 hours on my machine).

This thread also has a lot of really useful information about finding a build setup tailored to your needs, depending on which part of the project you'd like to work on.

Thanks, will check it out!

Terms of Service

Privacy Policy

Cookie Policy