cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
21 lines
889 B
LLVM
21 lines
889 B
LLVM
; Test that we can recurse, at least a little bit. The -time-passes flag here
|
|
; is a hack to make sure that neither echo nor the shell expands the response
|
|
; file for us. Tokenization with quotes is tested in unittests.
|
|
; On Windows, paths contain \ characters, which are escape characters in
|
|
; GNU-style response files. So replace \ with \\ to make the tests work there.
|
|
; RUN: echo %s | sed -e 's:\\:\\\\:g' > %t.list1
|
|
; RUN: echo "-time-passes @%t.list1" | sed -e 's:\\:\\\\:g' > %t.list2
|
|
; RUN: llvm-as @%t.list2 -o %t.bc
|
|
; RUN: llvm-nm %t.bc 2>&1 | FileCheck %s
|
|
|
|
; When the response file begins with UTF8 BOM sequence, we shall remove them.
|
|
; Neither command below should return a "Could not open input file" error.
|
|
; RUN: llvm-as @%S/Inputs/utf8-response > /dev/null
|
|
; RUN: llvm-as @%S/Inputs/utf8-bom-response > /dev/null
|
|
|
|
; CHECK: T foobar
|
|
|
|
define void @foobar() {
|
|
ret void
|
|
}
|