[PATCH] D38442: [lit] Fix running lit tests in unconfigured source dir

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 30 18:25:14 PDT 2017


Lgtm
On Sat, Sep 30, 2017 at 2:17 PM Michał Górny via Phabricator <
reviews at reviews.llvm.org> wrote:

> mgorny created this revision.
> Herald added a reviewer: modocache.
>
> Fix llvm_tools_dir attribute access not to fail when the variable is not
> present. This directory is not really necessary to run lit tests,
> and the code already accounts for it being None.
>
> The reference was added in https://reviews.llvm.org/rL313407, and it
> breaks the stand-alone lit
> package in Gentoo.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D38442
>
> Files:
>   utils/lit/tests/lit.cfg
>
>
> Index: utils/lit/tests/lit.cfg
> ===================================================================
> --- utils/lit/tests/lit.cfg
> +++ utils/lit/tests/lit.cfg
> @@ -65,6 +65,6 @@
>      config.available_features.add('windows')
>
>  # Add llvm tools directory if this config is being loaded indirectly
> -if config.llvm_tools_dir is not None:
> +if getattr(config, 'llvm_tools_dir', None) is not None:
>      path = os.path.pathsep.join((config.llvm_tools_dir,
> config.environment['PATH']))
>      config.environment['PATH'] = path
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171001/360318ab/attachment.html>


More information about the llvm-commits mailing list