mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-23 14:51:31 +02:00
test: Include /sbin to the PATH when creating ext4 disk image
On some distributions the mkfs.ext4 is under /sbin and /sbin is not set for mere users. Include /sbin to the PATH when creating ext4 disk image, so that users won't get a scary traceback from Python. Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
0453411998
commit
9262fe1559
@ -414,6 +414,8 @@ def mk_env_ext4(state_test_env):
|
|||||||
if os.path.exists(persistent):
|
if os.path.exists(persistent):
|
||||||
c.log.action('Disk image file ' + persistent + ' already exists')
|
c.log.action('Disk image file ' + persistent + ' already exists')
|
||||||
else:
|
else:
|
||||||
|
# Some distributions do not add /sbin to the default PATH, where mkfs.ext4 lives
|
||||||
|
os.environ["PATH"] += os.pathsep + '/sbin'
|
||||||
try:
|
try:
|
||||||
u_boot_utils.run_and_log(c, 'dd if=/dev/zero of=%s bs=1M count=16' % persistent)
|
u_boot_utils.run_and_log(c, 'dd if=/dev/zero of=%s bs=1M count=16' % persistent)
|
||||||
u_boot_utils.run_and_log(c, 'mkfs.ext4 %s' % persistent)
|
u_boot_utils.run_and_log(c, 'mkfs.ext4 %s' % persistent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user