[Buildroot] [PATCH v4 4/4] autobuild-run: do reproducible builds tests if BR2_REPRODUCIBLE=y

Yann E. MORIN yann.morin.1998 at free.fr
Fri Jun 14 20:28:45 UTC 2019


Atharva, All,

On 2019-06-14 16:25 +0530, Atharva Lele spake thusly:
> Signed-off-by: Atharva Lele <itsatharva at gmail.com>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>

Reviewed-by: Yann E. MORIN <yann.morin.1998 at free.fr>

Regards,
Yann E. MORIN.

> ---
> Changes v3 -> v4:
>   - Fix indentation level for if-else, otherwise file still remains open
>     for the duration of the build.
> 
> Changes v2 -> v3:
>   - use reproducible flag so that .config is not kept open for the entire
>     build duration. (suggested by arnout)
>   - remove reduntant logging (suggested by arnout)
> 
> Changes v1 -> v2:
>   - add trailing newline character to BR2_REPRODUCIBLE=y (suggested by arnout)
> ---
>  scripts/autobuild-run | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/autobuild-run b/scripts/autobuild-run
> index b641694..6426c9e 100755
> --- a/scripts/autobuild-run
> +++ b/scripts/autobuild-run
> @@ -727,7 +727,14 @@ def run_instance(**kwargs):
>              log_write(kwargs['log'], "WARN: failed to generate configuration")
>              continue
>  
> -        ret = do_build(**kwargs)
> +        # Check if the build test is supposed to be a reproducible test
> +        outputdir = os.path.abspath(os.path.join(idir, "output"))
> +        with open(os.path.join(outputdir, ".config"), "r") as fconf:
> +            reproducible = "BR2_REPRODUCIBLE=y\n" in fconf.read()
> +        if reproducible:
> +            ret = do_reproducible_build(**kwargs)
> +        else:
> +            ret = do_build(**kwargs)
>  
>          send_results(ret, **kwargs)
>  
> -- 
> 2.20.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list