[libcxx-commits] [PATCH] D98179: [lit] Sort test start times based on prior test timing data

James Henderson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 12 03:31:29 PST 2021


jhenderson added inline comments.


================
Comment at: llvm/utils/lit/lit/Test.py:217
+                for line in time_file.readlines():
+                    time, path = line.split(' ', 1)
+                    self.test_times[path.strip('\n')] = float(time)
----------------
jhenderson wrote:
> You an probably omit the first argument here, as demonstrated. That will split on the first sequence of whitespace.
There's a typo in my example: it should be `maxsplit=1` (with the `s`). You need to use the argument name as shown. Example usage from my local python instance:
```
>>> s = '123 456 789'
>>> s.split(maxsplit=1)
['123', '456 789']
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98179/new/

https://reviews.llvm.org/D98179



More information about the libcxx-commits mailing list