OSDN Git Service

Relax shtest-run-at-line.py
authorHans Wennborg <hans@hanshq.net>
Wed, 6 Jun 2018 14:53:03 +0000 (14:53 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 6 Jun 2018 14:53:03 +0000 (14:53 +0000)
commitc4f3d9f40dfc8d77d4a365554227ac0a4c719793
tree89ac5cdcff60399c48cd834abdbac2febdd4617d
parentb439319a25cd36c0c8a4dc8159e74a993ab8936a
Relax shtest-run-at-line.py

The test was failing on Windows machines which had bash.exe on PATH (but
not in the so called lit tools dir, containing cmp.exe, grep.exe etc.).

The problem was that the outer lit invocation would load LLVMConfig
from utils/lit/lit/llvm/config.py, which looks up the tools path with
getToolsPath(). That has a surprising side effect of also setting
bashPath, in our case setting it to empty.

The outer lit invocation would thus configure the pdbg0 and pdbg1
substitutions based on not running with bash.

But the inner lit invocation would not load LLVMConfig, so bash
would be found on PATH, that would be used as external shell,
and so the output wouldn't match pdbg0 and pdbg1.

It seems weird to me that getBashPath() will return different results
depending on whether getToolsPath() has been called before, but I
also don't know how to fix it properly.

This commit just relaxes the test case, because there doesn't seem
to be much point in testing for the exact syntax of the run file
as long as it works.

(See https://crbug.com/850023)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334100 91177308-0d34-0410-b5e6-96231b3b80d8
utils/lit/tests/lit.cfg
utils/lit/tests/shtest-run-at-line.py