This is an archive of the discontinued LLVM Phabricator instance.

Fix for lldb unit tests: TestAnonymous.py, et al., when using ccache
AbandonedPublic

Authored by vharron on Oct 27 2014, 4:30 PM.

Details

Summary

This patch fixes the following unit tests when the lldb unit tests are run on ubuntu

TestAnonymous.py
TestSharedLib.py
TestSharedLibStrippedSymbols.py
TestUniqueTypes.py

The unit tests fail when lldb is configured/built with ccache or when the individual unit tests are built with ccache. Under these conditions, the "compiler" variable in lldbtest.py's getCompilerVersion() contains the ccache prefix or compiler options in addition to the compiler name. The which() function in lldbutil does not handle multiple words well and returns "None" - even though clang is embedded in the compiler name.

This patch strips off any prefixes and/or options by looking for the last word in the compiler variable that appears to be an executable and then discarding everything else.

Doug

Diff Detail

Event Timeline

DougSnyder updated this revision to Diff 15505.Oct 27 2014, 4:30 PM
DougSnyder retitled this revision from to Fix for lldb unit test: TestAnonymous.py, et al., when using ccache.
DougSnyder updated this object.
DougSnyder edited the test plan for this revision. (Show Details)
DougSnyder added a reviewer: dmalea.
DougSnyder updated this object.
DougSnyder added a subscriber: Unknown Object (MLST).
DougSnyder retitled this revision from Fix for lldb unit test: TestAnonymous.py, et al., when using ccache to Fix for lldb unit tests: TestAnonymous.py, et al., when using ccache.Oct 27 2014, 4:33 PM
vharron edited reviewers, added: sivachandra; removed: dmalea.Jan 15 2015, 8:50 PM

Siva, can you review & test? If it's still valuable, please get reviewed by someone at Apple and submit.

"Submitted D6007 to reviews.llvm.org, a patch to fix TestAnonymous.py, et al. This patch fixes unit tests when ccache is used to build lldb, by stripping off compiler arguments from the compiler name when sending the compiler name to which in lldbtest.py." - Doug Snyder

vharron commandeered this revision.Jan 15 2015, 8:53 PM
vharron added a reviewer: DougSnyder.

from Doug Snyder

vharron abandoned this revision.May 9 2015, 11:58 PM

ccache is just not supported for now