[PATCH] D134034: This patch modifies the testcase to use error substitution so it will pass on all platforms.

Abhina Sree via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 06:15:43 PDT 2022


abhina.sreeskantharajan created this revision.
Herald added a project: All.
abhina.sreeskantharajan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

[test] Use host platform specific error message substitution


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134034

Files:
  llvm/test/tools/llvm-dwp/X86/diagnose_missing_dwos.test
  llvm/test/tools/llvm-tapi-diff/misspelled-tbd.test


Index: llvm/test/tools/llvm-tapi-diff/misspelled-tbd.test
===================================================================
--- llvm/test/tools/llvm-tapi-diff/misspelled-tbd.test
+++ llvm/test/tools/llvm-tapi-diff/misspelled-tbd.test
@@ -1,3 +1,3 @@
-; RUN: not llvm-tapi-diff %S/Inputs/v4A.tbd %S/Inputs/v4.tbd 2>&1 | FileCheck %s
+; RUN: not llvm-tapi-diff %S/Inputs/v4A.tbd %S/Inputs/v4.tbd 2>&1 | FileCheck -DMSG=%errc_ENOENT %s
 
-; CHECK: error: {{.*}}v4.tbd' {{[Nn]}}o such file or directory
+; CHECK: error: {{.*}}v4.tbd' [[MSG]]
Index: llvm/test/tools/llvm-dwp/X86/diagnose_missing_dwos.test
===================================================================
--- llvm/test/tools/llvm-dwp/X86/diagnose_missing_dwos.test
+++ llvm/test/tools/llvm-dwp/X86/diagnose_missing_dwos.test
@@ -3,8 +3,8 @@
 RUN: cd %t
 RUN: cp %p/../Inputs/dwos_list_from_exec/b.dwo b.dwo
 RUN: cp %p/../Inputs/dwos_list_from_exec/main main
-RUN: not llvm-dwp -e binary -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-BIN
-RUN: not llvm-dwp -e main -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-1ST-DWO
+RUN: not llvm-dwp -e binary -o /dev/null 2>&1 | FileCheck -DMSG=%errc_ENOENT %s --check-prefix=CHECK-BIN
+RUN: not llvm-dwp -e main -o /dev/null 2>&1 | FileCheck -DMSG=%errc_ENOENT %s --check-prefix=CHECK-1ST-DWO
 RUN: cp %p/../Inputs/dwos_list_from_exec/a.dwo a.dwo
 RUN: rm b.dwo
 RUN: not llvm-dwp -e main -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-2ND-DWO
@@ -23,6 +23,6 @@
      return 0;
   }
 
-CHECK-BIN: error: 'binary': {{[Nn]}}o such file or directory
-CHECK-1ST-DWO: error: './a.dwo': {{[Nn]}}o such file or directory
-CHECK-2ND-DWO: error: './b.dwo': {{[Nn]}}o such file or directory
+CHECK-BIN: error: 'binary': [[MSG]]
+CHECK-1ST-DWO: error: './a.dwo': [[MSG]]
+CHECK-2ND-DWO: error: './b.dwo': [[MSG]]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134034.460719.patch
Type: text/x-patch
Size: 1831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220916/18c22324/attachment.bin>


More information about the llvm-commits mailing list