[llvm] 4d29bda - [readtapi][tests] add descriptions to tests (#73576)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 07:23:36 PST 2023
Author: Cyndy Ishida
Date: 2023-11-28T07:23:31-08:00
New Revision: 4d29bdabab5cc953e21603f7f8c127a7f7540ed0
URL: https://github.com/llvm/llvm-project/commit/4d29bdabab5cc953e21603f7f8c127a7f7540ed0
DIFF: https://github.com/llvm/llvm-project/commit/4d29bdabab5cc953e21603f7f8c127a7f7540ed0.diff
LOG: [readtapi][tests] add descriptions to tests (#73576)
Added:
Modified:
llvm/test/tools/llvm-readtapi/command-line.test
llvm/test/tools/llvm-readtapi/extract-invalid.test
llvm/test/tools/llvm-readtapi/merge-invalid.test
llvm/test/tools/llvm-readtapi/remove.test
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-readtapi/command-line.test b/llvm/test/tools/llvm-readtapi/command-line.test
index f12e1da70ec4239..1006bfe9cc25374 100644
--- a/llvm/test/tools/llvm-readtapi/command-line.test
+++ b/llvm/test/tools/llvm-readtapi/command-line.test
@@ -1,6 +1,8 @@
; RUN: llvm-readtapi --help 2>&1 | FileCheck %s
; RUN: llvm-readtapi -help 2>&1 | FileCheck %s
+// Check mutually exclusive options.
; RUN: not llvm-readtapi -merge -compare -compact %t/tmp.tbd %t/tmp2.tbd 2>&1 | FileCheck %s --check-prefix MULTI_ACTION
+// Check unsupported file output format.
; RUN: not llvm-readtapi -merge -compact %t/tmp.tbd %t/tmp2.tbd --filetype=tbd-v2 2>&1 | FileCheck %s --check-prefix FILE_FORMAT
CHECK: OVERVIEW: LLVM TAPI file reader and manipulator
diff --git a/llvm/test/tools/llvm-readtapi/extract-invalid.test b/llvm/test/tools/llvm-readtapi/extract-invalid.test
index 026b782eb00c122..3e0dae07f68d6be 100644
--- a/llvm/test/tools/llvm-readtapi/extract-invalid.test
+++ b/llvm/test/tools/llvm-readtapi/extract-invalid.test
@@ -1,7 +1,10 @@
; RUN: rm -rf %t
; RUN: split-file %s %t
+// Check readtapi only accepts one file.
; RUN: not llvm-readtapi -extract %t/libfoo.tbd %t/libbar.tbd 2>&1 | FileCheck %s --allow-empty --check-prefix EXTRA
+// Check missing argument.
; RUN: not llvm-readtapi -extract %t/libfoo.tbd 2>&1 | FileCheck %s --allow-empty --check-prefix MISSING
+// Check that TBD file manipulation was not valid and error propagated as expected.
; RUN: not llvm-readtapi -arch x86_64 -extract %t/libfoo.tbd 2>&1 | FileCheck %s --allow-empty --check-prefix MISMATCH
; EXTRA: error: extract only supports one input file
diff --git a/llvm/test/tools/llvm-readtapi/merge-invalid.test b/llvm/test/tools/llvm-readtapi/merge-invalid.test
index f66bfbe8998158e..d97db79b8c44250 100644
--- a/llvm/test/tools/llvm-readtapi/merge-invalid.test
+++ b/llvm/test/tools/llvm-readtapi/merge-invalid.test
@@ -1,6 +1,8 @@
; RUN: rm -rf %t
; RUN: split-file %s %t
+// Check invalid tbd file contents was propagated as error.
; RUN: not llvm-readtapi -merge %t/libfoo.tbd %t/libbar.tbd 2>&1 | FileCheck %s --allow-empty --check-prefix DIFF
+// Check missing input.
; RUN: not llvm-readtapi -merge %t/libfoo.tbd 2>&1 | FileCheck %s --allow-empty --check-prefix INPUT
; DIFF: install names do not match
diff --git a/llvm/test/tools/llvm-readtapi/remove.test b/llvm/test/tools/llvm-readtapi/remove.test
index 673634762f3823f..92a46b499c5d06e 100644
--- a/llvm/test/tools/llvm-readtapi/remove.test
+++ b/llvm/test/tools/llvm-readtapi/remove.test
@@ -1,5 +1,7 @@
; RUN: rm -rf %t
; RUN: split-file %s %t
+// Check that arch removal is accepted with tbdv5 and various inlined contents.
+
; RUN: llvm-readtapi --remove -arch x86_64h %t/libfat.tbd -o %t/libslim.tbd 2>&1 | FileCheck --allow-empty %s
; RUN: llvm-readtapi --compare %t/libslim.tbd %t/libslim_expected.tbd
More information about the llvm-commits
mailing list