[prev in list] [next in list] [prev in thread] [next in thread] 

List:       buildroot
Subject:    Re: [Buildroot] [PATCH 07/16] Makefile: run check-* inside docker image
From:       Ricardo Martincoski <ricardo.martincoski () gmail ! com>
Date:       2022-07-31 14:34:24
Message-ID: 62e692f0d91cc_bff73a78-1a3 () xultri ! mail
[Download RAW message or body]

Hello,

On Wed, Jul 27, 2022 at 10:16 AM, Romain Naour wrote:

[snip]
>> +check_inside_docker := $(shell if [ "`groups`" = 'br-user' ]; then echo y; else echo n; fi)
>> +
>> +# List of target that need to run inside docker image to ensure reproducible results
>> +inside_docker_targets := check-package check-flake8
>> +
>> +ifeq ($(check_inside_docker),n)
>> +$(inside_docker_targets):
>> +	$(Q)utils/docker-run $(MAKE) V=$(V) $@
> 
> While I understand the reproducibility issue, I'm not sure I really wand my make
> check-package command starting starting a docker container.

I really prefer a 'good default' with reproducible results.
Advanced users can always call check-package directly.

But perhaps some developer can hit some corporate policies when developing
patches inside the company:
- can't run docker at all
- can't download docker images from the internet
For that poor souls, I will withdraw this patch and resend. :)

Well... we could instead change de manual to say:

299 ---------------------
300 $ utils/docker-run make check-package
301 ---------------------

> 
> I guess Buildroot user (or CI build machine) can do the same if they want.

CI builds already run inside the same docker image, so no change there.

I was trying to accomplish with this series, among other things, a way to
ensure the same results locally when compared to CI builds.

One interesting reproducibility issue that is already taken into account by this
series, even outside the docker image:
patch 14
file utils/check-package
line 98

I developed outside the docker image and when I run on CI build the python files
were being not tested and ignored by check-package.
See the reason:

$ utils/docker-run python3 -c \
  "import magic;" \
  "print(magic.from_file('utils/brmake', mime=True));" \
  "print(magic.from_file('utils/check-package', mime=True))"; 
text/x-shellscript
text/x-script.python

$ python3 -c \
  "import magic;" \
  "print(magic.from_file('utils/brmake', mime=True));" \
  "print(magic.from_file('utils/check-package', mime=True))"; 
text/x-shellscript
text/x-python

But as I say above, I will withdraw this patch and resend the series.


Regards,
Ricardo

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic