[llvm] 10af5ba - [llvm-objcopy] Consolidate and unify version tests

Alexander Shaposhnikov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 18:44:49 PDT 2020


Author: Alexander Shaposhnikov
Date: 2020-09-07T18:44:32-07:00
New Revision: 10af5bad443dd15b79876fbad66d836ab9e9a4ed

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

LOG: [llvm-objcopy] Consolidate and unify version tests

In this diff the tests which verify version printing functionality are refactored.
Since they are not specific to a particular format we move them into tool-version.test
and slightly unify (similarly to tool-name.test and tool-help-message.test).

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D87211

Added: 
    llvm/test/tools/llvm-objcopy/tool-version.test

Modified: 
    

Removed: 
    llvm/test/tools/llvm-objcopy/ELF/objcopy-version.test
    llvm/test/tools/llvm-objcopy/ELF/strip-version.test
    llvm/test/tools/llvm-objcopy/MachO/install-name-tool-version.test


################################################################################
diff  --git a/llvm/test/tools/llvm-objcopy/ELF/objcopy-version.test b/llvm/test/tools/llvm-objcopy/ELF/objcopy-version.test
deleted file mode 100644
index 7494ccd2866d..000000000000
--- a/llvm/test/tools/llvm-objcopy/ELF/objcopy-version.test
+++ /dev/null
@@ -1,4 +0,0 @@
-# RUN: llvm-objcopy --version | FileCheck %s
-# RUN: llvm-objcopy -V | FileCheck %s
-
-# CHECK: {{ version }}

diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-version.test b/llvm/test/tools/llvm-objcopy/ELF/strip-version.test
deleted file mode 100644
index 4b2f137ce2aa..000000000000
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-version.test
+++ /dev/null
@@ -1,5 +0,0 @@
-# RUN: llvm-strip --version | FileCheck %s
-# RUN: llvm-strip -V | FileCheck %s
-
-# CHECK-DAG: {{ version }}
-# CHECK-DAG: GNU strip

diff  --git a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-version.test b/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-version.test
deleted file mode 100644
index 295e57356101..000000000000
--- a/llvm/test/tools/llvm-objcopy/MachO/install-name-tool-version.test
+++ /dev/null
@@ -1,2 +0,0 @@
-# RUN: llvm-install-name-tool --version | FileCheck %s
-# CHECK: {{ version }}

diff  --git a/llvm/test/tools/llvm-objcopy/tool-version.test b/llvm/test/tools/llvm-objcopy/tool-version.test
new file mode 100644
index 000000000000..5fe33eb8e717
--- /dev/null
+++ b/llvm/test/tools/llvm-objcopy/tool-version.test
@@ -0,0 +1,15 @@
+# RUN: llvm-objcopy --version | FileCheck --check-prefix=OBJCOPY %s
+# RUN: llvm-objcopy -V | FileCheck --check-prefix=OBJCOPY %s
+
+# RUN: llvm-strip --version | FileCheck --check-prefix=STRIP %s
+# RUN: llvm-strip -V | FileCheck --check-prefix=STRIP %s
+
+# RUN: llvm-install-name-tool --version | FileCheck %s
+
+# OBJCOPY-DAG: {{ version }}
+# OBJCOPY-DAG: GNU objcopy
+
+# STRIP-DAG: {{ version }}
+# STRIP-DAG: GNU strip
+
+# CHECK: {{ version }}


        


More information about the llvm-commits mailing list