Closed oxr463 closed 3 years ago
Is this Dockerfile used to test proot-rs? And is it related to https://github.com/proot-me/proot-rs/issues/6#issuecomment-846402777 ?
Is this Dockerfile used to test proot-rs? And is it related to #6 (comment) ?
Yes. We can build in the first stage, and then test in the second.
Sorry, there may be a problem with my expression. For testing, I think we can download the busybox rootfs tarball and unzip it into a directory. This way we can use it as a new rootfs for testing proot-rs. Maybe we just need a bash script to do this
Like this.
curl -o $rootfs_tarball -L -C - "https://github.com/docker-library/busybox/raw/dist-${arch}/stable/glibc/busybox.tar.xz"
tar -C $rootfs -xf $rootfs_tarball
proot-rs --rootfs $rootfs /bin/sh # or we can run `cargo test`
Sorry, there may be a problem with my expression. For testing, I think we can download the busybox rootfs tarball and unzip it into a directory. This way we can use it as a new rootfs for testing proot-rs. Maybe we just need a bash script to do this
Like this.
curl -o $rootfs_tarball -L -C - "https://github.com/docker-library/busybox/raw/dist-${arch}/stable/glibc/busybox.tar.xz" tar -C $rootfs -xf $rootfs_tarball proot-rs --rootfs $rootfs /bin/sh # or we can run `cargo test`
That makes sense. Do we need something like this to run the script before running the tests? https://github.com/sagiegurari/cargo-make
Sorry, there may be a problem with my expression. For testing, I think we can download the busybox rootfs tarball and unzip it into a directory. This way we can use it as a new rootfs for testing proot-rs. Maybe we just need a bash script to do this Like this.
curl -o $rootfs_tarball -L -C - "https://github.com/docker-library/busybox/raw/dist-${arch}/stable/glibc/busybox.tar.xz" tar -C $rootfs -xf $rootfs_tarball proot-rs --rootfs $rootfs /bin/sh # or we can run `cargo test`
That makes sense. Do we need something like this to run the script before running the tests? https://github.com/sagiegurari/cargo-make
That's a good idea, I think we can try this
Closes: https://github.com/proot-me/proot-rs/issues/18