next: set rustup/cargo home dirs
As pre_tf_build() call hook is invoked from within a subshell,
environment variables are lost on calling it. Use set_hook_var to set
the {RUSTUP,CARGO}_HOME vars required by cargo/rustup.
Change-Id: Ibb8bcb08e60c4ff08b945861e3bd3f968bbcfad2
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
diff --git a/group/tf-next-build/qemu-next:nil b/group/tf-next-build/qemu-next:nil
index cc22c7f..a6c3e1a 100644
--- a/group/tf-next-build/qemu-next:nil
+++ b/group/tf-next-build/qemu-next:nil
@@ -5,11 +5,8 @@
# SPDX-License-Identifier: BSD-3-Clause
#
pre_tf_build() {
- echo $PATH
- echo $USER
- echo $RUSTUP_HOME
- rustup default stable
- rustup target add --toolchain stable aarch64-unknown-none
+ set_hook_var RUSTUP_HOME /usr/local/rustup
+ set_hook_var CARGO_HOME /usr/local/cargo
make -C "$tf_root/rust"
make -C "$tf_root/rust" clippy
}