4 RUN: mkdir -p %t/debuginfod-cache
5 RUN: %python %S/Inputs/capture_req.py llvm-debuginfod-find --debuginfo 0 \
6 RUN: | FileCheck --check-prefix NO-HEADERS %s
7 RUN: env DEBUGINFOD_CACHE=%t/debuginfod-cache DEBUGINFOD_HEADERS_FILE=bad %python %S/Inputs/capture_req.py \
8 RUN: llvm-debuginfod-find --debuginfo 0 \
9 RUN: | FileCheck --check-prefix NO-HEADERS %s
10 RUN: rm -rf %t/debuginfod-cache/*
11 RUN: env DEBUGINFOD_CACHE=%t/debuginfod-cache DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers %python %S/Inputs/capture_req.py \
12 RUN: llvm-debuginfod-find --debuginfo 0 \
13 RUN: | FileCheck --check-prefix HEADERS %s
14 RUN: rm -rf %t/debuginfod-cache/*
15 RUN: env DEBUGINFOD_CACHE=%t/debuginfod-cache DEBUGINFOD_HEADERS_FILE=%S/Inputs/headers DEBUGINFOD_URLS=fake not llvm-debuginfod-find --debuginfo 0 2>&1 \
16 RUN: | FileCheck --check-prefix ERR -DHEADER_FILE=%S/Inputs/headers %s
18 NO-HEADERS: Accept: */*
19 NO-HEADERS-NEXT: Accept-Encoding: {{.*}}
23 HEADERS-NEXT: Accept-Encoding: {{.*}}
27 HEADERS-NEXT: hi!$: j k
30 ERR: warning: could not parse debuginfod header: [[HEADER_FILE]]:3
31 ERR-NEXT: warning: could not parse debuginfod header: [[HEADER_FILE]]:4
32 ERR-NEXT: warning: could not parse debuginfod header: [[HEADER_FILE]]:5
33 ERR-NEXT: warning: could not parse debuginfod header: [[HEADER_FILE]]:6