From a4f3847f3d5742cfab7acdc614e7ca54643e0c85 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Thu, 2 Jan 2020 14:53:33 +0000 Subject: [PATCH] [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. --- llvm/test/tools/llvm-ranlib/D-flag.test | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/test/tools/llvm-ranlib/D-flag.test b/llvm/test/tools/llvm-ranlib/D-flag.test index 49f52fa..79c9d5e 100644 --- a/llvm/test/tools/llvm-ranlib/D-flag.test +++ b/llvm/test/tools/llvm-ranlib/D-flag.test @@ -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 -- 2.7.4