Commit a4f3847f authored by Alex Richardson's avatar Alex Richardson
Browse files

[llvm-ranlib] Relax D-flag.test to allow it to pass on Windows hosts

It appears that Windows hosts always report rwxrwxrwx even with the
chmod 644 invocation. As this test only cares about the timestamps
and not the permissions, use a regex wildcard instead.
parent 88fc5fde
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
## Important: all `llvm-ar tv` calls must use TZ=UTC to produce identical values
# RUN: yaml2obj %S/../llvm-ar/Inputs/add-lib1.yaml -o %t.o
# RUN: env TZ=UTC touch -t 200001020304 %t.o
# RUN: chmod 644 %t.o
# RUN: rm -f %t.a %t-no-index.a && llvm-ar cqSU %t-no-index.a %t.o

## Check that the intial listing has real values:
@@ -42,5 +41,5 @@
# RUN: not llvm-ranlib -DxD %t.a 2>&1 | FileCheck %s --check-prefix=BAD-OPT-xD
# BAD-OPT-xD: llvm-ranlib: error: Invalid option: '-xD'

# DETERMINISTIC-VALUES: rw-r--r-- 0/0    712 Jan  1 00:00 1970 D-flag.test.tmp.o
# REAL-VALUES: rw-r--r-- {{[0-9]+}}/{{[0-9]+}} 712 Jan  2 03:04 2000 D-flag.test.tmp.o
# DETERMINISTIC-VALUES: {{[rwx-]+}} 0/0    712 Jan  1 00:00 1970 D-flag.test.tmp.o
# REAL-VALUES: {{[rwx-]+}} {{[0-9]+}}/{{[0-9]+}} 712 Jan  2 03:04 2000 D-flag.test.tmp.o