summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-12-29 06:51:10 +0000
committerAlp Toker <alp@nuanti.com>2013-12-29 06:51:10 +0000
commite395023eabadd520e5823d2d1da8c33ad5752039 (patch)
tree40fa31059a8703eabb7f4423f527866a2ff593a5 /llvm/utils/lit
parent967951de22baf345cf94a731642f3375d79fe09c (diff)
downloadbcm5719-llvm-e395023eabadd520e5823d2d1da8c33ad5752039.tar.gz
bcm5719-llvm-e395023eabadd520e5823d2d1da8c33ad5752039.zip
Python compatibility fix for r198150
Remove the stat call error reporting for now. It wasn't essential so silent fallback should be fine here. llvm-svn: 198155
Diffstat (limited to 'llvm/utils/lit')
-rwxr-xr-xllvm/utils/lit/lit/main.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py
index 86db3d8f5ac..a2486193e36 100755
--- a/llvm/utils/lit/lit/main.py
+++ b/llvm/utils/lit/lit/main.py
@@ -118,16 +118,13 @@ def update_incremental_cache(test):
fname = test.getFilePath()
os.utime(fname, None)
-def sort_by_incremental_cache(run, litConfig):
+def sort_by_incremental_cache(run):
def sortIndex(test):
- index = 0
fname = test.getFilePath()
try:
- index = -os.path.getmtime(fname)
- except OSError as e:
- if litConfig.debug:
- litConfig.note(e)
- return index
+ return -os.path.getmtime(fname)
+ except:
+ return 0
run.tests.sort(key = lambda t: sortIndex(t))
def main(builtinParameters = {}):
@@ -319,7 +316,7 @@ def main(builtinParameters = {}):
if opts.shuffle:
random.shuffle(run.tests)
elif opts.incremental:
- sort_by_incremental_cache(run, litConfig)
+ sort_by_incremental_cache(run)
else:
run.tests.sort(key = lambda t: t.getFullName())
OpenPOWER on IntegriCloud