Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions rust/ql/test/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -euo pipefail

# This script is run by the CI to set up the test environment for the Rust QL tests
# We run this as rustup is not meant to be run in parallel, and will this setup will be run by rust-analyzer in the
# parallel QL tests unless we do the setup prior to launching the tests.
# We do this for each `rust-toolchain.toml` we use in the tests (and the root one in `rust`)

cd "$(dirname "$0")"

rustup install
rustup component add rust-src

find . -name rust-toolchain.toml \
-execdir rustup install \; \
-execdir rustup component add rust-src \;
Comment on lines +12 to +17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@redsun82 Perhaps this is better to ensure the version of the rust-toolchain.toml file in the toplevel folder is always installed last.

Suggested change
rustup install
rustup component add rust-src
find . -name rust-toolchain.toml \
-execdir rustup install \; \
-execdir rustup component add rust-src \;
find . -name rust-toolchain.toml \
-execdir rustup install \; \
-execdir rustup component add rust-src \;
rustup install
rustup component add rust-src