Skip to content

Commit 8d467c7

Browse files
authored
Merge pull request #19255 from github/redsun82/rust-setup
Rust: add test setup script
2 parents c4c351c + 25bd0c3 commit 8d467c7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: rust/ql/test/setup.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
# This script is run by the CI to set up the test environment for the Rust QL tests
6+
# 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
7+
# parallel QL tests unless we do the setup prior to launching the tests.
8+
# We do this for each `rust-toolchain.toml` we use in the tests (and the root one in `rust`)
9+
10+
cd "$(dirname "$0")"
11+
12+
rustup install
13+
rustup component add rust-src
14+
15+
find . -name rust-toolchain.toml \
16+
-execdir rustup install \; \
17+
-execdir rustup component add rust-src \;

0 commit comments

Comments
 (0)