[PATCH] D144638: [lit] Detect Consistent File Access Times
Sam Elliott via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 27 04:05:47 PST 2023
lenary added inline comments.
================
Comment at: llvm/utils/lit/lit/llvm/config.py:171
+ # in the tests that do the same thing.
+ (_, try_touch_err) = self.get_process_output(["touch", "-a", "-t", "199505050555.55", f.name])
+ if try_touch_err != "":
----------------
michaelplatings wrote:
> lenary wrote:
> > michaelplatings wrote:
> > > It looks like this command will be run on Windows. I think it will fail and cause False to be returned, which is the desired result, but this appears to be by accident rather than design. Therefore I'm inclined to agree with @int3 that a hard-coded check would be preferable.
> > I am going to add the hardcoded checks, but I think `touch` is available in windows, it should be in the same directory as all the git binaries.
> This is definitely tangential to the change, but in case it's useful to know: conventionally only `C:\Program Files\Git\bin` is added to the path on Windows, not `C:\Program Files\Git\usr\bin`. `C:\Program Files\Git\bin` only contains `bash.exe`, `git.exe` and `sh.exe`.
Something weirder is happening in `_find_git_windows_unix_tools` (from https://reviews.llvm.org/D84380), but I think it's probably right just to early exit with false on Windows.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144638/new/
https://reviews.llvm.org/D144638
More information about the llvm-commits
mailing list