[llvm] r198155 - Python compatibility fix for r198150
Alp Toker
alp at nuanti.com
Sat Dec 28 22:51:11 PST 2013
Author: alp
Date: Sun Dec 29 00:51:10 2013
New Revision: 198155
URL: http://llvm.org/viewvc/llvm-project?rev=198155&view=rev
Log:
Python compatibility fix for r198150
Remove the stat call error reporting for now.
It wasn't essential so silent fallback should be fine here.
Modified:
llvm/trunk/utils/lit/lit/main.py
Modified: llvm/trunk/utils/lit/lit/main.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/main.py?rev=198155&r1=198154&r2=198155&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/main.py (original)
+++ llvm/trunk/utils/lit/lit/main.py Sun Dec 29 00:51:10 2013
@@ -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())
More information about the llvm-commits
mailing list