The "path" recorded for timing purposes is only used as a key into a dictionary. It is never used as an actual path to a filesystem API, therefore we should use '/' as the canonical separator so that Unix and Windows machines can share timing data. This also ensures that the lit testing works across platforms.
Reviewed By: jhenderson, jmorse
Differential Revision: https://reviews.llvm.org/D98767
# The previous test elapsed time, if applicable.
self.previous_elapsed = 0.0
- if os.sep.join(path_in_suite) in suite.test_times:
- time = suite.test_times[os.sep.join(path_in_suite)]
+ if '/'.join(path_in_suite) in suite.test_times:
+ time = suite.test_times['/'.join(path_in_suite)]
self.previous_elapsed = abs(time)
self.previous_failure = time < 0
if not t.suite.exec_root in times_by_suite:
times_by_suite[t.suite.exec_root] = []
time = -t.result.elapsed if t.isFailure() else t.result.elapsed
- times_by_suite[t.suite.exec_root].append((os.sep.join(t.path_in_suite), t.result.elapsed))
+ # The "path" here is only used as a key into a dictionary. It is never
+ # used as an actual path to a filesystem API, therefore we use '/' as
+ # the canonical separator so that Unix and Windows machines can share
+ # timing data.
+ times_by_suite[t.suite.exec_root].append(('/'.join(t.path_in_suite),
+ t.result.elapsed))
for s, value in times_by_suite.items():
try:
# RUN: cp %{inputs}/reorder/.lit_test_times.txt %{inputs}/reorder/.lit_test_times.txt.orig
# RUN: %{lit} -j1 %{inputs}/reorder | FileCheck %s
# RUN: not diff %{inputs}/reorder/.lit_test_times.txt %{inputs}/reorder/.lit_test_times.txt.orig
-# UNSUPPORTED: system-windows
# END.
# CHECK: -- Testing: 3 tests, 1 workers --