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
1.4 KiB
C
26 lines
1.4 KiB
C
// These tests try to ensure that the driver operates reasonably when run with
|
|
// a strange environment. Unfortunately, it requires a normal shell and the
|
|
// 'env' command that understands arguments, unlike the LIT built-in env.
|
|
//
|
|
// REQUIRES: shell
|
|
// The PATH variable is heavily used when trying to find a linker.
|
|
// RUN: env -i LC_ALL=C LD_LIBRARY_PATH="$LD_LIBRARY_PATH" CLANG_NO_DEFAULT_CONFIG=1 \
|
|
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
// RUN: --rtlib=platform --unwindlib=platform -no-pie \
|
|
// RUN: 2>&1 | FileCheck --check-prefix=CHECK-LD-32 %s
|
|
//
|
|
// RUN: env -i LC_ALL=C PATH="" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" CLANG_NO_DEFAULT_CONFIG=1 \
|
|
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
// RUN: --rtlib=platform --unwindlib=platform -no-pie \
|
|
// RUN: 2>&1 | FileCheck --check-prefix=CHECK-LD-32 %s
|
|
//
|
|
// CHECK-LD-32-NOT: warning:
|
|
// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
// CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/10.2.0{{/|\\\\}}crtbegin.o"
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0"
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/10.2.0/../../../../i386-unknown-linux/lib"
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/lib"
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib"
|