[llvm] [readtapi][tests] add descriptions to tests (PR #73576)
Cyndy Ishida via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 14:27:14 PST 2023
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/73576
None
>From 08963853ddc04f3f8463e8001ce941539e2c5a47 Mon Sep 17 00:00:00 2001
From: Cyndy Ishida <cyndy_ishida at apple.com>
Date: Mon, 27 Nov 2023 12:59:06 -0800
Subject: [PATCH] [readtapi][tests] add descriptions to tests
---
llvm/test/tools/llvm-readtapi/command-line.test | 2 ++
llvm/test/tools/llvm-readtapi/extract-invalid.test | 3 +++
llvm/test/tools/llvm-readtapi/merge-invalid.test | 2 ++
llvm/test/tools/llvm-readtapi/remove.test | 2 ++
4 files changed, 9 insertions(+)
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