Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5021 from jongwu/clean_rust
Browse files Browse the repository at this point in the history
ci/lib: clean up rust environment before test
  • Loading branch information
GabyCT authored Aug 15, 2022
2 parents f8a93ba + 55e034f commit 37a94df
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .ci/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,16 @@ gen_clean_arch() {

info "Clean transient test data and logs which has been stored under ${KATA_TESTS_BASEDIR}"
[ -d "${KATA_TESTS_BASEDIR}" ] && sudo rm -rf ${KATA_TESTS_BASEDIR}/*

info "Clean rust environment"
[ -f "${HOME}/.cargo/env" ] && source "${HOME}/.cargo/env"
if command -v rustup > /dev/null; then
info "uninstall rust using rustup"
sudo -E env PATH="${HOME}/.cargo/bin":$PATH rustup self uninstall -y
fi
# make sure cargo and rustup home dir are removed
info "remove cargo and rustup home dir"
sudo rm -rf ~/.cargo ~/.rustup
}

check_git_version() {
Expand Down

0 comments on commit 37a94df

Please sign in to comment.