[llvm] 2fdf49d - [llvm-rc] Handle Windows line endings in tag-html test (#113000)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 09:54:35 PDT 2024


Author: Daniel Paoliello
Date: 2024-10-22T09:54:32-07:00
New Revision: 2fdf49db7562eadbe01b18f0d01a955cd41b94ea

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

LOG: [llvm-rc] Handle Windows line endings in tag-html test (#113000)

The tag-html.test has been failing for me and [in
CI](https://buildkite.com/llvm-project/github-pull-requests/builds/111277#0192a122-c5c9-4e4e-bc5b-7532fec99ae4)
if Git happens to decide to check out the baseline file with Windows
line endings.

This fix for this is to call `tr` to strip Windows newlines when copying
the baselines files to the test output directory before embedding them.

Added: 
    

Modified: 
    llvm/test/tools/llvm-rc/tag-html.test

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-rc/tag-html.test b/llvm/test/tools/llvm-rc/tag-html.test
index 3620fe954ba1c8..e0fe2e659dd0ee 100644
--- a/llvm/test/tools/llvm-rc/tag-html.test
+++ b/llvm/test/tools/llvm-rc/tag-html.test
@@ -1,5 +1,7 @@
 ; RUN: rm -rf %t && mkdir %t && cd %t
-; RUN: cp %p/Inputs/webpage*.html .
+; Remove `\r` in case Git on Windows decided to checkout with Windows newlines.
+; RUN: tr -d '\r' <%p/Inputs/webpage1.html > ./webpage1.html
+; RUN: tr -d '\r' <%p/Inputs/webpage2.html > ./webpage2.html
 ; RUN: llvm-rc -no-preprocess /FO %t/tag-html.res -- %p/Inputs/tag-html.rc
 ; RUN: llvm-readobj %t/tag-html.res | FileCheck %s --check-prefix HTML
 


        


More information about the llvm-commits mailing list