running clang compiler test suite from within macports infrastructure?

Ken Cunningham ken.cunningham.webuse at gmail.com
Fri Jun 30 15:37:09 UTC 2017


Thanks, Jack.

There appear to be different ways to test clang. I thought the testing would all happen in during or related to the build, but this does not appear to be exactly so.

At any rate, there is a "test-suite" of 400+ tests for each version of clang, which is one way to test it. It is unrelated to the clang-3.8 build, it appears. Just for fun, there are at least three different ways to run it :>

I went through the steps for one of the ways to test, and here is what worked:


Install lit:

From the source directory of clang-3.8 on macports:
clang-3.8/work/llvm-3.8.1.src/utils/lit
sudo python setup.py install


install and build the test-suite matching your version of clang. For clang381, this is:
svn co http://llvm.org/svn/llvm-project/test-suite/tags/RELEASE_381/final/ test-suite
mkdir test-suite-build
cd test-suite-build
cmake ../test-suite
make

Then run the tests:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/lit -v -j 1 . -o results.json


Some time later, you will get final results

Ken


More information about the macports-dev mailing list