[PATCH] D87211: [llvm-objcopy] Consolidate and unify version tests

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 6 14:26:57 PDT 2020


alexshap created this revision.
alexshap added reviewers: jhenderson, MaskRay, smeenai.
Herald added subscribers: abrachet, emaste.
Herald added a reviewer: espindola.
Herald added a reviewer: rupprecht.
Herald added a project: LLVM.
alexshap requested review of this revision.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87211

Files:
  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
  llvm/test/tools/llvm-objcopy/tool-version.test


Index: llvm/test/tools/llvm-objcopy/tool-version.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-objcopy/tool-version.test
@@ -0,0 +1,10 @@
+# RUN: llvm-objcopy --version | FileCheck %s
+# RUN: llvm-objcopy -V | FileCheck %s
+
+# RUN: llvm-strip --version | FileCheck %s
+# RUN: llvm-strip -V | FileCheck %s
+
+# RUN: llvm-install-name-tool --version | FileCheck %s
+# RUN: llvm-strip -V | FileCheck %s
+
+# CHECK: {{ version }}
Index: llvm/test/tools/llvm-objcopy/MachO/install-name-tool-version.test
===================================================================
--- 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 }}
Index: llvm/test/tools/llvm-objcopy/ELF/strip-version.test
===================================================================
--- 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
Index: llvm/test/tools/llvm-objcopy/ELF/objcopy-version.test
===================================================================
--- 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 }}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87211.290151.patch
Type: text/x-patch
Size: 1490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200906/94735c89/attachment.bin>


More information about the llvm-commits mailing list