All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tools: binman: main.py: add build-sandbox in sys.path
@ 2022-01-27 14:03 Philippe Reynes
  2022-01-27 14:03 ` [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path Philippe Reynes
  2022-02-26 18:36 ` [PATCH 1/2] tools: binman: main.py: add build-sandbox in sys.path Simon Glass
  0 siblings, 2 replies; 6+ messages in thread
From: Philippe Reynes @ 2022-01-27 14:03 UTC (permalink / raw)
  To: sjg; +Cc: u-boot, Philippe Reynes

Adds build-sandbox in sys.path to look for libfdt,
otherwise py_test can't use binman.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 tools/binman/main.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/binman/main.py b/tools/binman/main.py
index 35944f314a..f62394043d 100755
--- a/tools/binman/main.py
+++ b/tools/binman/main.py
@@ -40,6 +40,7 @@ from patman import test_util
 # Bring in the libfdt module
 sys.path.insert(2, 'scripts/dtc/pylibfdt')
 sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
+sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
 sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
 
 # When running under python-coverage on Ubuntu 16.04, the dist-packages
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path
  2022-01-27 14:03 [PATCH 1/2] tools: binman: main.py: add build-sandbox in sys.path Philippe Reynes
@ 2022-01-27 14:03 ` Philippe Reynes
  2022-01-27 15:06   ` Simon Glass
  2022-02-26 18:36 ` [PATCH 1/2] tools: binman: main.py: add build-sandbox in sys.path Simon Glass
  1 sibling, 1 reply; 6+ messages in thread
From: Philippe Reynes @ 2022-01-27 14:03 UTC (permalink / raw)
  To: sjg; +Cc: u-boot, Philippe Reynes

Adds /tmp/sandbox to sys.path to look for libfdt,
otherwise ci is broken if a py_test uses binman.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---
 tools/binman/main.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/binman/main.py b/tools/binman/main.py
index f62394043d..7d52482c0c 100755
--- a/tools/binman/main.py
+++ b/tools/binman/main.py
@@ -42,6 +42,7 @@ sys.path.insert(2, 'scripts/dtc/pylibfdt')
 sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
 sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
 sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
+sys.path.insert(2, os.path.join(srctree, '/tmp/sandbox/scripts/dtc/pylibfdt'))
 
 # When running under python-coverage on Ubuntu 16.04, the dist-packages
 # directories are dropped from the python path. Add them in so that we can find
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path
  2022-01-27 14:03 ` [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path Philippe Reynes
@ 2022-01-27 15:06   ` Simon Glass
  2022-01-27 15:15     ` Philippe REYNES
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2022-01-27 15:06 UTC (permalink / raw)
  To: Philippe Reynes; +Cc: U-Boot Mailing List

Hi Philippe,

On Thu, 27 Jan 2022 at 07:03, Philippe Reynes
<philippe.reynes@softathome.com> wrote:
>
> Adds /tmp/sandbox to sys.path to look for libfdt,
> otherwise ci is broken if a py_test uses binman.
>
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
> ---
>  tools/binman/main.py | 1 +
>  1 file changed, 1 insertion(+)

Which test uses /tmp/sandbox to build U-Boot? We might need to use
--toolpath for this, or set PYTHONPATH in the caller?

>
> diff --git a/tools/binman/main.py b/tools/binman/main.py
> index f62394043d..7d52482c0c 100755
> --- a/tools/binman/main.py
> +++ b/tools/binman/main.py
> @@ -42,6 +42,7 @@ sys.path.insert(2, 'scripts/dtc/pylibfdt')
>  sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
>  sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
>  sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
> +sys.path.insert(2, os.path.join(srctree, '/tmp/sandbox/scripts/dtc/pylibfdt'))
>
>  # When running under python-coverage on Ubuntu 16.04, the dist-packages
>  # directories are dropped from the python path. Add them in so that we can find
> --
> 2.17.1
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path
  2022-01-27 15:06   ` Simon Glass
@ 2022-01-27 15:15     ` Philippe REYNES
  2022-02-26 18:36       ` Simon Glass
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe REYNES @ 2022-01-27 15:15 UTC (permalink / raw)
  To: Simon Glass; +Cc: U-Boot Mailing List

Hi Simon,

Le 27/01/2022 à 16:06, Simon Glass a écrit :
> Hi Philippe,
>
> On Thu, 27 Jan 2022 at 07:03, Philippe Reynes
> <philippe.reynes@softathome.com> wrote:
>> Adds /tmp/sandbox to sys.path to look for libfdt,
>> otherwise ci is broken if a py_test uses binman.
>>
>> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
>> ---
>>   tools/binman/main.py | 1 +
>>   1 file changed, 1 insertion(+)
> Which test uses /tmp/sandbox to build U-Boot? We might need to use
> --toolpath for this, or set PYTHONPATH in the caller?


I have added a test that use binman in vboot (for global image signature,
a header added before the image). This path should be added for the CI,
otherwise tests "sandbox test.pyt " and "sandbox with clan test.py" fail.


>> diff --git a/tools/binman/main.py b/tools/binman/main.py
>> index f62394043d..7d52482c0c 100755
>> --- a/tools/binman/main.py
>> +++ b/tools/binman/main.py
>> @@ -42,6 +42,7 @@ sys.path.insert(2, 'scripts/dtc/pylibfdt')
>>   sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
>>   sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
>>   sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
>> +sys.path.insert(2, os.path.join(srctree, '/tmp/sandbox/scripts/dtc/pylibfdt'))
>>
>>   # When running under python-coverage on Ubuntu 16.04, the dist-packages
>>   # directories are dropped from the python path. Add them in so that we can find
>> --
>> 2.17.1
>>
> Regards,
> Simon
Regards,
Philippe




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] tools: binman: main.py: add build-sandbox in sys.path
  2022-01-27 14:03 [PATCH 1/2] tools: binman: main.py: add build-sandbox in sys.path Philippe Reynes
  2022-01-27 14:03 ` [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path Philippe Reynes
@ 2022-02-26 18:36 ` Simon Glass
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Glass @ 2022-02-26 18:36 UTC (permalink / raw)
  To: Philippe Reynes; +Cc: U-Boot Mailing List

Hi Philippe

On Thu, 27 Jan 2022 at 07:03, Philippe Reynes
<philippe.reynes@softathome.com> wrote:
>
> Adds build-sandbox in sys.path to look for libfdt,
> otherwise py_test can't use binman.
>
> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
> ---
>  tools/binman/main.py | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

>
> diff --git a/tools/binman/main.py b/tools/binman/main.py
> index 35944f314a..f62394043d 100755
> --- a/tools/binman/main.py
> +++ b/tools/binman/main.py
> @@ -40,6 +40,7 @@ from patman import test_util
>  # Bring in the libfdt module
>  sys.path.insert(2, 'scripts/dtc/pylibfdt')
>  sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
> +sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
>  sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
>
>  # When running under python-coverage on Ubuntu 16.04, the dist-packages
> --
> 2.17.1
>

The build-sandbox_spl path should be enough though, shouldn't it? Have
you not built that?

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path
  2022-01-27 15:15     ` Philippe REYNES
@ 2022-02-26 18:36       ` Simon Glass
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2022-02-26 18:36 UTC (permalink / raw)
  To: Philippe REYNES; +Cc: U-Boot Mailing List

Hi Philippe,

On Thu, 27 Jan 2022 at 08:15, Philippe REYNES
<philippe.reynes@softathome.com> wrote:
>
> Hi Simon,
>
> Le 27/01/2022 à 16:06, Simon Glass a écrit :
> > Hi Philippe,
> >
> > On Thu, 27 Jan 2022 at 07:03, Philippe Reynes
> > <philippe.reynes@softathome.com> wrote:
> >> Adds /tmp/sandbox to sys.path to look for libfdt,
> >> otherwise ci is broken if a py_test uses binman.
> >>
> >> Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
> >> ---
> >>   tools/binman/main.py | 1 +
> >>   1 file changed, 1 insertion(+)
> > Which test uses /tmp/sandbox to build U-Boot? We might need to use
> > --toolpath for this, or set PYTHONPATH in the caller?
>
>
> I have added a test that use binman in vboot (for global image signature,
> a header added before the image). This path should be added for the CI,
> otherwise tests "sandbox test.pyt " and "sandbox with clan test.py" fail.

But the tests should run in the board directory provided to pytest.

I will have to look at your test.

>
>
> >> diff --git a/tools/binman/main.py b/tools/binman/main.py
> >> index f62394043d..7d52482c0c 100755
> >> --- a/tools/binman/main.py
> >> +++ b/tools/binman/main.py
> >> @@ -42,6 +42,7 @@ sys.path.insert(2, 'scripts/dtc/pylibfdt')
> >>   sys.path.insert(2, os.path.join(srctree, 'scripts/dtc/pylibfdt'))
> >>   sys.path.insert(2, os.path.join(srctree, 'build-sandbox/scripts/dtc/pylibfdt'))
> >>   sys.path.insert(2, os.path.join(srctree, 'build-sandbox_spl/scripts/dtc/pylibfdt'))
> >> +sys.path.insert(2, os.path.join(srctree, '/tmp/sandbox/scripts/dtc/pylibfdt'))
> >>
> >>   # When running under python-coverage on Ubuntu 16.04, the dist-packages
> >>   # directories are dropped from the python path. Add them in so that we can find
> >> --
> >> 2.17.1
> >>
> > Regards,
> > Simon
> Regards,
> Philippe
>
>
> -- This message and any attachments herein are confidential, intended solely for the addressees and are SoftAtHome’s ownership. Any unauthorized use or dissemination is prohibited. If you are not the intended addressee of this message, please cancel it immediately and inform the sender.

Is this supposed to be sent on the mailing list?

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-26 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27 14:03 [PATCH 1/2] tools: binman: main.py: add build-sandbox in sys.path Philippe Reynes
2022-01-27 14:03 ` [PATCH 2/2] tools: binman: main.py: add /tmp/sandbox sys.path Philippe Reynes
2022-01-27 15:06   ` Simon Glass
2022-01-27 15:15     ` Philippe REYNES
2022-02-26 18:36       ` Simon Glass
2022-02-26 18:36 ` [PATCH 1/2] tools: binman: main.py: add build-sandbox in sys.path Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.