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).
26 lines
813 B
Plaintext
26 lines
813 B
Plaintext
// RUN: FileCheck -input-file %s %s
|
|
|
|
op1 r1
|
|
op2 r1, r2
|
|
; CHECK: op1 [[REG:r[0-9]]]
|
|
; CHECK-NEXT: op2 [[REG]]
|
|
|
|
op3 r16, r18, r21
|
|
op4 r30, r18, r21
|
|
; CHECK: op3 {{r[0-9]+}}, [[REGa:r[0-9]+]], [[REGb:r[0-9]+]]
|
|
; CHECK-NEXT: op4 {{r[0-9]+}}, [[REGa]], [[REGb]]
|
|
|
|
|
|
// RUN: %ProtectFileCheckOutput \
|
|
// RUN: not FileCheck --check-prefixes INVALID-VARNAME --input-file %s %s 2>&1 \
|
|
// RUN: | FileCheck --check-prefix INVALID-VARNAME-MSG --strict-whitespace %s
|
|
|
|
5
|
|
4
|
|
; INVALID-VARNAME: [[X:]]
|
|
; INVALID-VARNAME-NEXT: [[Y:]]
|
|
; INVALID-VARNAME-NEXT: [[X-Y]]
|
|
; INVALID-VARNAME-MSG: simple-var-capture.txt:[[#@LINE-1]]:27: error: invalid name in string variable use
|
|
; INVALID-VARNAME-MSG-NEXT: ; {{I}}NVALID-VARNAME-NEXT: {{\[\[X-Y\]\]}}
|
|
; INVALID-VARNAME-MSG-NEXT: {{^}} ^{{$}}
|