aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Eric Le Bihan <eric.le.bihan.dev@free.fr>2018-04-29 00:14:13 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-04-30 23:37:41 +0200
commit692e9d1a62847cb4bc6f9f5714c65fa676e9124f (patch)
treee5ce11ba1ad9e1d938cdf7eb62643284ba3addc9
parentc6f7fe46fc054318349c7721e19aa6cdce069798 (diff)
downloadbuildroot-692e9d1a62847cb4bc6f9f5714c65fa676e9124f.tar.gz
buildroot-692e9d1a62847cb4bc6f9f5714c65fa676e9124f.tar.bz2
support/testing: set $USER in rust tests
When the run-time tests to build rust and rust-bin packages are run via Docker, the $USER environment variable is not set, which makes cargo fail when initializing the test project. So add it to make cargo happy. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 09a5eb427a6d9160e74ab56941640c02334eabf1) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--support/testing/tests/package/test_rust.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/support/testing/tests/package/test_rust.py b/support/testing/tests/package/test_rust.py
index e6c0de2214..2dc814f99d 100644
--- a/support/testing/tests/package/test_rust.py
+++ b/support/testing/tests/package/test_rust.py
@@ -21,6 +21,7 @@ class TestRustBase(infra.basetest.BRTest):
def build_test_prog(self):
hostdir = os.path.join(self.builddir, 'host')
env = os.environ.copy()
+ env["USER"] = "br-user"
env["PATH"] = "{}:".format(os.path.join(hostdir, 'bin')) + env["PATH"]
env["CARGO_HOME"] = os.path.join(hostdir, 'usr', 'share', 'cargo')
env["RUST_TARGET_PATH"] = os.path.join(hostdir, 'etc', 'rustc')