This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] [NFC] Introduce separate targets for testing the analyzer: check-clang-analyzer and check-clang-analyzer-z3
ClosedPublic

Authored by george.karpenkov on Aug 10 2018, 6:07 PM.

Details

Summary

Current testing setup for analyzer tests with Z3 is rather inconvenient:

  • There's no way to run the analyzer tests separately (I use LIT_FILTER=Analysis ninja check-clang, but a direct target is nicer)
  • When Clang is built with Z3 support, there's no way to *not* run tests with Z3 solver, and this is often desired, as tests with Z3 solver take a very long time.

This patch introduces two extra targets:

  • check-clang-analyzer
  • check-clang-analyzer-z3

which solve those problems.

Diff Detail

Event Timeline

Better variable names, better scoping.

I can't comment on the code but it works correctly for me.

I wish I had it a couple of months ago :)

NoQ accepted this revision.Aug 13 2018, 1:18 PM

Yup, i hope it'll be comfy now.

This revision is now accepted and ready to land.Aug 13 2018, 1:18 PM

The cmake and lit bits all look correct

This revision was automatically updated to reflect the committed changes.
thopre added a subscriber: thopre.Aug 14 2018, 1:10 AM

Hi George,

This commit seems to be causing some testsuite regression on Armv8 (both Aarch64 and ARM) architectures:
http://lab.llvm.org:8011/builders/clang-cmake-armv8-full/builds/5450
http://lab.llvm.org:8011/builders/clang-cmake-armv8-quick/builds/5625

Best regards,

Thomas

yroux added a subscriber: yroux.Aug 14 2018, 3:17 AM

Notice that the affected bots run two times the test cases where one execution passes and one fails, as you can see in (search Analysis/plist-macros.cpp for instance):

http://lab.llvm.org:8011/builders/clang-cmake-armv8-full/builds/5450/steps/ninja%20check%201/logs/stdio

and I think it is due to llvm-lit being invoked with "--param USE_Z3_SOLVER=0 --param USE_Z3_SOLVER=0"

Yes, investigating. Will rollback if not fixed in a few hours.

Should be fixed now.