[Buildroot] [PATCH] utils/test-pkg: clean output dir for successful builds
Arnout Vandecappelle
arnout at mind.be
Tue Feb 5 16:55:20 UTC 2019
On 05/02/2019 17:16, Thomas De Schampheleire wrote:
> From: Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
>
> test-pkg will use gigabytes of space when testing all toolchains.
> Nevertheless, you are normally only interested in the actual build / host
> tree when there is a build failure.
Well, except in the situation where you're iteratively fixing the package and
re-testing with the -p option, no? Then your subsequent attempt would be happy
to reuse the build results of all dependencies...
So, I think it's better to make this optional - perhaps with a -k,--keep option
similar to run-tests.
Regards,
Arnout
>
> Do a 'make clean' for successful builds to save disk space.
> Note that the logfile and configuration is still retained for inspection.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
> ---
> utils/test-pkg | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/utils/test-pkg b/utils/test-pkg
> index 1995fa8578..1e40ad7b75 100755
> --- a/utils/test-pkg
> +++ b/utils/test-pkg
> @@ -161,6 +161,10 @@ build_one() {
> if ! make O="${dir}" legal-info >> "${dir}/logfile" 2>&1; then
> return 3
> fi
> +
> + # if we get here, the build was successful.
> + # Clean up the build/host directories to save disk space
> + make O="${dir}" clean >> "${dir}/logfile" 2>&1
> }
>
> help() {
>
More information about the buildroot
mailing list