mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-03-02 14:27:19 +00:00
ci: integration tests: print clippy run output and set LD_LIBRARY_PATH to rustc sysroot
This commit is contained in:
parent
c3079a9856
commit
12b63f5c35
2 changed files with 10 additions and 1 deletions
7
.github/workflows/clippy_bors.yml
vendored
7
.github/workflows/clippy_bors.yml
vendored
|
@ -232,6 +232,11 @@ jobs:
|
||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
run: rustup show active-toolchain
|
run: rustup show active-toolchain
|
||||||
|
|
||||||
|
- name: Set LD_LIBRARY_PATH
|
||||||
|
run: |
|
||||||
|
SYSROOT=$(rustc --print sysroot)
|
||||||
|
echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
- name: Download target dir
|
- name: Download target dir
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
|
@ -246,7 +251,7 @@ jobs:
|
||||||
- name: Test ${{ matrix.integration }}
|
- name: Test ${{ matrix.integration }}
|
||||||
run: |
|
run: |
|
||||||
RUSTUP_TOOLCHAIN="$(rustup show active-toolchain | grep -o -E "nightly-[0-9]{4}-[0-9]{2}-[0-9]{2}")" \
|
RUSTUP_TOOLCHAIN="$(rustup show active-toolchain | grep -o -E "nightly-[0-9]{4}-[0-9]{2}-[0-9]{2}")" \
|
||||||
$CARGO_TARGET_DIR/debug/integration
|
$CARGO_TARGET_DIR/debug/integration --show-output
|
||||||
env:
|
env:
|
||||||
INTEGRATION: ${{ matrix.integration }}
|
INTEGRATION: ${{ matrix.integration }}
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,10 @@ fn integration_test() {
|
||||||
.expect("unable to run clippy");
|
.expect("unable to run clippy");
|
||||||
|
|
||||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||||
|
|
||||||
|
// debug:
|
||||||
|
eprintln!("{stderr}");
|
||||||
|
|
||||||
if let Some(backtrace_start) = stderr.find("error: internal compiler error") {
|
if let Some(backtrace_start) = stderr.find("error: internal compiler error") {
|
||||||
static BACKTRACE_END_MSG: &str = "end of query stack";
|
static BACKTRACE_END_MSG: &str = "end of query stack";
|
||||||
let backtrace_end = stderr[backtrace_start..]
|
let backtrace_end = stderr[backtrace_start..]
|
||||||
|
|
Loading…
Add table
Reference in a new issue