mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Python compatibility fix for r198150
Remove the stat call error reporting for now. It wasn't essential so silent fallback should be fine here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198155 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -118,16 +118,13 @@ def update_incremental_cache(test):
|
|||||||
fname = test.getFilePath()
|
fname = test.getFilePath()
|
||||||
os.utime(fname, None)
|
os.utime(fname, None)
|
||||||
|
|
||||||
def sort_by_incremental_cache(run, litConfig):
|
def sort_by_incremental_cache(run):
|
||||||
def sortIndex(test):
|
def sortIndex(test):
|
||||||
index = 0
|
|
||||||
fname = test.getFilePath()
|
fname = test.getFilePath()
|
||||||
try:
|
try:
|
||||||
index = -os.path.getmtime(fname)
|
return -os.path.getmtime(fname)
|
||||||
except OSError as e:
|
except:
|
||||||
if litConfig.debug:
|
return 0
|
||||||
litConfig.note(e)
|
|
||||||
return index
|
|
||||||
run.tests.sort(key = lambda t: sortIndex(t))
|
run.tests.sort(key = lambda t: sortIndex(t))
|
||||||
|
|
||||||
def main(builtinParameters = {}):
|
def main(builtinParameters = {}):
|
||||||
@@ -319,7 +316,7 @@ def main(builtinParameters = {}):
|
|||||||
if opts.shuffle:
|
if opts.shuffle:
|
||||||
random.shuffle(run.tests)
|
random.shuffle(run.tests)
|
||||||
elif opts.incremental:
|
elif opts.incremental:
|
||||||
sort_by_incremental_cache(run, litConfig)
|
sort_by_incremental_cache(run)
|
||||||
else:
|
else:
|
||||||
run.tests.sort(key = lambda t: t.getFullName())
|
run.tests.sort(key = lambda t: t.getFullName())
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user