On Fri, Apr 03, 2020 at 12:13:46PM +0200, Pino Toscano wrote:
Use different directories for the output formats, otherwise any
supermin
--build call after the first will fail to rename the temporary directory
to the designated output directory (as it exists already).
Also make sure that we can remove all the files in the chroot output.
---
tests/test-build-bash.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/test-build-bash.sh b/tests/test-build-bash.sh
index 44a8c89..0b75d8b 100755
--- a/tests/test-build-bash.sh
+++ b/tests/test-build-bash.sh
@@ -27,6 +27,7 @@ tmpdir=`mktemp -d`
d1=$tmpdir/d1
d2=$tmpdir/d2
+d3=$tmpdir/d3
test "$USE_NETWORK" = 1 || USE_INSTALLED=--use-installed
@@ -37,6 +38,8 @@ arch="$(uname -m)"
# Check all supermin-helper formats work.
../src/supermin -v --build -f chroot --host-cpu $arch $d1 -o $d2
-../src/supermin -v --build -f ext2 --host-cpu $arch $d1 -o $d2
+../src/supermin -v --build -f ext2 --host-cpu $arch $d1 -o $d3
+# Need to chmod $d2 since rm -r can't remove unwritable directories.
+chmod -R +w $d2 ||:
rm -rf $tmpdir ||:
ACK
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/