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

Alex Richardson via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 07:00:34 PST 2020


Author: Alex Richardson
Date: 2020-01-02T14:59:48Z
New Revision: a4f3847f3d5742cfab7acdc614e7ca54643e0c85

URL: https://github.com/llvm/llvm-project/commit/a4f3847f3d5742cfab7acdc614e7ca54643e0c85
DIFF: https://github.com/llvm/llvm-project/commit/a4f3847f3d5742cfab7acdc614e7ca54643e0c85.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/test/tools/llvm-ranlib/D-flag.test

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-ranlib/D-flag.test b/llvm/test/tools/llvm-ranlib/D-flag.test
index 49f52fa743c8..79c9d5ec735e 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


        


More information about the llvm-commits mailing list