[test-suite] r254747 - [test-suite/LNTBased/SPEC] Simplify code using enumerate()
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 4 11:04:25 PST 2015
Author: anemet
Date: Fri Dec 4 13:04:24 2015
New Revision: 254747
URL: http://llvm.org/viewvc/llvm-project?rev=254747&view=rev
Log:
[test-suite/LNTBased/SPEC] Simplify code using enumerate()
Modified:
test-suite/trunk/LNTBased/lib/spec.py
Modified: test-suite/trunk/LNTBased/lib/spec.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LNTBased/lib/spec.py?rev=254747&r1=254746&r2=254747&view=diff
==============================================================================
--- test-suite/trunk/LNTBased/lib/spec.py (original)
+++ test-suite/trunk/LNTBased/lib/spec.py Fri Dec 4 13:04:24 2015
@@ -235,13 +235,11 @@ class TestModule(nt.TestModule):
status = PASS
exec_time = 0
- file_index = 0
- for cmd in run_cmds:
+ for (file_index, cmd) in enumerate(run_cmds):
(result, time) = self.run_safely(cmd, cwd=self.OBJROOT, shell=True, file_index=file_index)
if result != 0:
status = FAIL
exec_time += time
- file_index += 1
os.environ['PATH'] += ':' + os.path.join(self.OBJROOT, 'tools')
for cmd in self.ref_cmp_cmds:
More information about the llvm-commits
mailing list