refactor
This commit is contained in:
parent
a1abbaab0d
commit
2bf1cec41b
5 changed files with 25 additions and 60 deletions
19
src/ci/docker/scripts/add_dummy_commit.sh
Executable file
19
src/ci/docker/scripts/add_dummy_commit.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
if [ "$READ_ONLY_SRC" = "0" ]; then
|
||||
# `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that
|
||||
# "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on
|
||||
# compiler and/or library. Here we are adding a dummy commit on compiler and running
|
||||
# that test to make sure we never download CI rustc with a change on the compiler tree.
|
||||
echo "" >> ../compiler/rustc/src/main.rs
|
||||
git config --global user.email "dummy@dummy.com"
|
||||
git config --global user.name "dummy"
|
||||
git add ../compiler/rustc/src/main.rs
|
||||
git commit -m "test commit for rust.download-rustc=if-unchanged logic"
|
||||
DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \
|
||||
-- core::builder::tests::ci_rustc_if_unchanged_logic
|
||||
# Revert the dummy commit
|
||||
git reset --hard HEAD~1
|
||||
fi
|
||||
|
|
@ -2,21 +2,7 @@
|
|||
|
||||
set -ex
|
||||
|
||||
if [ "$READ_ONLY_SRC" = "0" ]; then
|
||||
# `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that
|
||||
# "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on
|
||||
# compiler and/or library. Here we are adding a dummy commit on compiler and running
|
||||
# that test to make sure we never download CI rustc with a change on the compiler tree.
|
||||
echo "" >> ../compiler/rustc/src/main.rs
|
||||
git config --global user.email "dummy@dummy.com"
|
||||
git config --global user.name "dummy"
|
||||
git add ../compiler/rustc/src/main.rs
|
||||
git commit -m "test commit for rust.download-rustc=if-unchanged logic"
|
||||
DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \
|
||||
-- core::builder::tests::ci_rustc_if_unchanged_logic
|
||||
# Revert the dummy commit
|
||||
git reset --hard HEAD~1
|
||||
fi
|
||||
./add_dummy_commit.sh
|
||||
|
||||
# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
|
||||
../x.py --stage 2 test --skip src/tools/tidy
|
||||
|
|
|
|||
|
|
@ -2,21 +2,7 @@
|
|||
|
||||
set -ex
|
||||
|
||||
if [ "$READ_ONLY_SRC" = "0" ]; then
|
||||
# `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that
|
||||
# "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on
|
||||
# compiler and/or library. Here we are adding a dummy commit on compiler and running
|
||||
# that test to make sure we never download CI rustc with a change on the compiler tree.
|
||||
echo "" >> ../compiler/rustc/src/main.rs
|
||||
git config --global user.email "dummy@dummy.com"
|
||||
git config --global user.name "dummy"
|
||||
git add ../compiler/rustc/src/main.rs
|
||||
git commit -m "test commit for rust.download-rustc=if-unchanged logic"
|
||||
DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \
|
||||
-- core::builder::tests::ci_rustc_if_unchanged_logic
|
||||
# Revert the dummy commit
|
||||
git reset --hard HEAD~1
|
||||
fi
|
||||
./add_dummy_commit.sh
|
||||
|
||||
../x.py --stage 2 test \
|
||||
--skip tests \
|
||||
|
|
|
|||
|
|
@ -2,21 +2,9 @@
|
|||
|
||||
set -ex
|
||||
|
||||
if [ "$READ_ONLY_SRC" = "0" ]; then
|
||||
# `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that
|
||||
# "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on
|
||||
# compiler and/or library. Here we are adding a dummy commit on compiler and running
|
||||
# that test to make sure we never download CI rustc with a change on the compiler tree.
|
||||
echo "" >> ../compiler/rustc/src/main.rs
|
||||
git config --global user.email "dummy@dummy.com"
|
||||
git config --global user.name "dummy"
|
||||
git add ../compiler/rustc/src/main.rs
|
||||
git commit -m "test commit for rust.download-rustc=if-unchanged logic"
|
||||
DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \
|
||||
-- core::builder::tests::ci_rustc_if_unchanged_logic
|
||||
# Revert the dummy commit
|
||||
git reset --hard HEAD~1
|
||||
fi
|
||||
./add_dummy_commit.sh
|
||||
|
||||
##### Test stage 2 #####
|
||||
|
||||
../x.py --stage 2 test \
|
||||
--skip compiler \
|
||||
|
|
|
|||
|
|
@ -2,21 +2,7 @@
|
|||
|
||||
set -ex
|
||||
|
||||
if [ "$READ_ONLY_SRC" = "0" ]; then
|
||||
# `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that
|
||||
# "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on
|
||||
# compiler and/or library. Here we are adding a dummy commit on compiler and running
|
||||
# that test to make sure we never download CI rustc with a change on the compiler tree.
|
||||
echo "" >> ../compiler/rustc/src/main.rs
|
||||
git config --global user.email "dummy@dummy.com"
|
||||
git config --global user.name "dummy"
|
||||
git add ../compiler/rustc/src/main.rs
|
||||
git commit -m "test commit for rust.download-rustc=if-unchanged logic"
|
||||
DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \
|
||||
-- core::builder::tests::ci_rustc_if_unchanged_logic
|
||||
# Revert the dummy commit
|
||||
git reset --hard HEAD~1
|
||||
fi
|
||||
./add_dummy_commit.sh
|
||||
|
||||
##### Test stage 1 #####
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue