[llvm] ea5ba47 - [dSYM][NFC] Add error test case for llvm-dwarfdump

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 16 15:23:23 PST 2021


Author: Ellis Hoag
Date: 2021-12-16T15:23:18-08:00
New Revision: ea5ba474074dd4cab90baa8ec6689334ad129d84

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

LOG: [dSYM][NFC] Add error test case for llvm-dwarfdump

Add a test to `llvm-dwarfdump` to simply test that the error messages
make sense when passing bad `.dSYM`s.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D115889

Added: 
    llvm/test/tools/llvm-dwarfdump/errors.test

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-dwarfdump/errors.test b/llvm/test/tools/llvm-dwarfdump/errors.test
new file mode 100644
index 000000000000..54a37f7365ea
--- /dev/null
+++ b/llvm/test/tools/llvm-dwarfdump/errors.test
@@ -0,0 +1,10 @@
+RUN: mkdir -p %t/empty.dSYM/Contents/Resources/DWARF
+RUN: mkdir -p %t/malformed.dSYM/Contents/blah
+
+RUN: not llvm-dwarfdump %t/empty.dSYM 2>&1 | FileCheck %s --check-prefix ERR1
+RUN: not llvm-dwarfdump %t/malformed.dSYM 2>&1 | FileCheck %s --check-prefix ERR2
+
+
+ERR1: error: {{.*}}.dSYM: no objects found in dSYM bundle
+
+ERR2: error: {{.*}}.dSYM: expected directory 'Contents/Resources/DWARF' in dSYM bundle


        


More information about the llvm-commits mailing list