[PATCH] Revert r221183 to unbreak test-suite on OpenBSD / Bitrig
rafael.espindola at gmail.com
Tue Jan 13 09:10:21 PST 2015
Are you able to run check-all with no errors with this patch?
On 12 January 2015 at 22:48, Brad Smith <brad at comstyle.com> wrote:
> On Mon, Jan 12, 2015 at 09:00:15PM -0500, Rafael Esp??ndola wrote:
>> >> A list of additional, user-specified, ELF shared libraries to be
>> >> loaded before all others. The items of the list can be separated by
>> >> spaces or colons.
>> >> so "" is just an empty list.
>> > "" is not valid. It is considered poor scripting.
>> Maybe the proper fix then is to replace
>> environment[var] = os.environ.get(var, '')
>> val = os.environ.get(var, '')
>> if val != '':
>> environment[var] = var
>> or whatever the canonical way of doing that in python is.
>> We should also have a comment saying why '' is explicitly avoided.
> I don't know any Python but looking around this seems
> to be what is desired.
> Index: utils/lit/lit/TestingConfig.py
> --- utils/lit/lit/TestingConfig.py (revision 225756)
> +++ utils/lit/lit/TestingConfig.py (working copy)
> @@ -26,7 +26,12 @@
> 'LD_PRELOAD', 'ASAN_OPTIONS', 'UBSAN_OPTIONS',
> for var in pass_vars:
> - environment[var] = os.environ.get(var, '')
> + val = os.environ.get(var, '')
> + # Check for empty string as some variables such as
> + # LD_PRELOAD cannot be empty ('') for OS's such as
> + # OpenBSD.
> + if val:
> + environment[var] = val
> if sys.platform == 'win32':
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
More information about the llvm-commits