blob: aaf20d44e31791085a2fd1781d1e02b7295ef91e [file] [log] [blame]
REQUIRES: curl
RUN: %python %S/Inputs/capture_req.py llvm-debuginfod-find --debuginfo 0 \
RUN: | FileCheck --check-prefix NO-HEADERS %s
RUN: env DEBUGINFOD_HEADERS_FILE=bad %python %S/Inputs/capture_req.py \
RUN: llvm-debuginfod-find --debuginfo 0 \
RUN: | FileCheck --check-prefix NO-HEADERS %s
RUN: env DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers %python %S/Inputs/capture_req.py \
RUN: llvm-debuginfod-find --debuginfo 0 \
RUN: | FileCheck --check-prefix HEADERS %s
RUN: env DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers DEBUGINFOD_URLS=fake not llvm-debuginfod-find --debuginfo 0 2>&1 \
RUN: | FileCheck --check-prefix ERR -DHEADER_FILE=%S/Inputs/headers %s
NO-HEADERS: Accept: */*
NO-HEADERS-NOT: {{.}}
HEADERS: Accept: */*
HEADERS-NEXT: A: B
HEADERS-NEXT: C: D
HEADERS-NEXT: E: F
HEADERS-NEXT: hi!$: j k
HEADERS-NOT: {{.}}
ERR: warning: could not parse debuginfod header: [[HEADER_FILE]]:3
ERR-NEXT: warning: could not parse debuginfod header: [[HEADER_FILE]]:4
ERR-NEXT: warning: could not parse debuginfod header: [[HEADER_FILE]]:5
ERR-NEXT: warning: could not parse debuginfod header: [[HEADER_FILE]]:6