* [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail
@ 2013-10-09 20:28 Stephen Warren
2013-10-09 20:28 ` [U-Boot] [PATCH 2/2] buildman: make board selector argument a regex Stephen Warren
2013-10-09 22:24 ` [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail Simon Glass
0 siblings, 2 replies; 8+ messages in thread
From: Stephen Warren @ 2013-10-09 20:28 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
When a toolchain invocation fails, an exception is thrown but not caught
which then aborts the entire toolchain detection process. To solve this,
request that exceptions not be thrown, since the toolchain init code
already error-checks the command result. This solves e.g.:
- found '/usr/bin/winegcc'
Traceback (most recent call last):
...
Exception: Error running '/usr/bin/winegcc --version'
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
tools/buildman/toolchain.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index a292338..7effb88 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -39,7 +39,7 @@ class Toolchain:
# As a basic sanity check, run the C compiler with --version
cmd = [fname, '--version']
if test:
- result = command.RunPipe([cmd], capture=True, env=env)
+ result = command.RunPipe([cmd], capture=True, env=env, raise_on_error=False)
self.ok = result.return_code == 0
if verbose:
print 'Tool chain test: ',
--
1.8.1.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] buildman: make board selector argument a regex
2013-10-09 20:28 [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail Stephen Warren
@ 2013-10-09 20:28 ` Stephen Warren
2013-10-09 22:28 ` Simon Glass
2013-10-09 22:24 ` [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail Simon Glass
1 sibling, 1 reply; 8+ messages in thread
From: Stephen Warren @ 2013-10-09 20:28 UTC (permalink / raw)
To: u-boot
From: Stephen Warren <swarren@nvidia.com>
A common use-case is to build all boards for a particular SoC. This can
be achieved by:
./tools/buildman/buildman -b mainline_dev -n tegra20
However, when the SoC is a member of a family of SoCs, and each SoC has
a different name, it would be even more useful to build all boards for
every SoC in that family. This currently isn't possible since buildman's
board selection command-line arguments are compared to board definitions
using pure string equality.
To enable this, compare using a regex match instead. This matches
MAKEALL's handling of command-line arguments. This enables:
(all Tegra)
./tools/buildman/buildman -b mainline_dev -n tegra
(all Tegra)
./tools/buildman/buildman -b mainline_dev -n '^tegra.*$'
(all Tegra114, Tegra30 boards, but not Tegra20)
./tools/buildman/buildman -b mainline_dev -n 'tegra[13]'
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
tools/buildman/board.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tools/buildman/board.py b/tools/buildman/board.py
index 1d3db20..5172a47 100644
--- a/tools/buildman/board.py
+++ b/tools/buildman/board.py
@@ -3,6 +3,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
+import re
+
class Board:
"""A particular board that we can build"""
def __init__(self, status, arch, cpu, soc, vendor, board_name, target, options):
@@ -135,14 +137,22 @@ class Boards:
due to each argument, arranged by argument.
"""
result = {}
+ argres = {}
for arg in args:
result[arg] = 0
+ argres[arg] = re.compile(arg)
result['all'] = 0
for board in self._boards:
if args:
for arg in args:
- if arg in board.props:
+ argre = argres[arg]
+ match = False
+ for prop in board.props:
+ match = argre.match(prop)
+ if match:
+ break
+ if match:
if not board.build_it:
board.build_it = True
result[arg] += 1
--
1.8.1.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail
2013-10-09 20:28 [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail Stephen Warren
2013-10-09 20:28 ` [U-Boot] [PATCH 2/2] buildman: make board selector argument a regex Stephen Warren
@ 2013-10-09 22:24 ` Simon Glass
2013-10-10 15:48 ` Stephen Warren
1 sibling, 1 reply; 8+ messages in thread
From: Simon Glass @ 2013-10-09 22:24 UTC (permalink / raw)
To: u-boot
On Wed, Oct 9, 2013 at 2:28 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> When a toolchain invocation fails, an exception is thrown but not caught
> which then aborts the entire toolchain detection process. To solve this,
> request that exceptions not be thrown, since the toolchain init code
> already error-checks the command result. This solves e.g.:
>
> - found '/usr/bin/winegcc'
> Traceback (most recent call last):
> ...
> Exception: Error running '/usr/bin/winegcc --version'
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] buildman: make board selector argument a regex
2013-10-09 20:28 ` [U-Boot] [PATCH 2/2] buildman: make board selector argument a regex Stephen Warren
@ 2013-10-09 22:28 ` Simon Glass
0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2013-10-09 22:28 UTC (permalink / raw)
To: u-boot
Hi Stephen,
On Wed, Oct 9, 2013 at 2:28 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> A common use-case is to build all boards for a particular SoC. This can
> be achieved by:
>
> ./tools/buildman/buildman -b mainline_dev -n tegra20
>
> However, when the SoC is a member of a family of SoCs, and each SoC has
> a different name, it would be even more useful to build all boards for
> every SoC in that family. This currently isn't possible since buildman's
> board selection command-line arguments are compared to board definitions
> using pure string equality.
>
> To enable this, compare using a regex match instead. This matches
> MAKEALL's handling of command-line arguments. This enables:
>
> (all Tegra)
> ./tools/buildman/buildman -b mainline_dev -n tegra
Do you want the -n here?
>
> (all Tegra)
> ./tools/buildman/buildman -b mainline_dev -n '^tegra.*$'
>
> (all Tegra114, Tegra30 boards, but not Tegra20)
> ./tools/buildman/buildman -b mainline_dev -n 'tegra[13]'
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> tools/buildman/board.py | 12 +++++++++++-
Great addition, will be useful. Would you mind also updating the README please?
Regards,
Simon
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail
2013-10-09 22:24 ` [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail Simon Glass
@ 2013-10-10 15:48 ` Stephen Warren
2013-10-10 15:50 ` Simon Glass
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Warren @ 2013-10-10 15:48 UTC (permalink / raw)
To: u-boot
On 10/09/2013 04:24 PM, Simon Glass wrote:
> On Wed, Oct 9, 2013 at 2:28 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> When a toolchain invocation fails, an exception is thrown but not caught
>> which then aborts the entire toolchain detection process. To solve this,
>> request that exceptions not be thrown, since the toolchain init code
>> already error-checks the command result. This solves e.g.:
>>
>> - found '/usr/bin/winegcc'
>> Traceback (most recent call last):
>> ...
>> Exception: Error running '/usr/bin/winegcc --version'
>>
>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>
> Acked-by: Simon Glass <sjg@chromium.org>
Thanks. Oh. I didn't send this patch directly to any person other than
you, since I thought you collected patches and sent pull requests for
it. Should I resend it to Tom Rini?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail
2013-10-10 15:48 ` Stephen Warren
@ 2013-10-10 15:50 ` Simon Glass
2013-10-10 16:04 ` Stephen Warren
0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2013-10-10 15:50 UTC (permalink / raw)
To: u-boot
Hi Stephen,
On Thu, Oct 10, 2013 at 9:48 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 10/09/2013 04:24 PM, Simon Glass wrote:
>> On Wed, Oct 9, 2013 at 2:28 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> From: Stephen Warren <swarren@nvidia.com>
>>>
>>> When a toolchain invocation fails, an exception is thrown but not caught
>>> which then aborts the entire toolchain detection process. To solve this,
>>> request that exceptions not be thrown, since the toolchain init code
>>> already error-checks the command result. This solves e.g.:
>>>
>>> - found '/usr/bin/winegcc'
>>> Traceback (most recent call last):
>>> ...
>>> Exception: Error running '/usr/bin/winegcc --version'
>>>
>>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>>
>> Acked-by: Simon Glass <sjg@chromium.org>
>
> Thanks. Oh. I didn't send this patch directly to any person other than
> you, since I thought you collected patches and sent pull requests for
> it. Should I resend it to Tom Rini?
Yes I tend to do that. Perhaps this should go into the release? Let me
know - I'll do a little pull request for Tom.
Regards,
Simon
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail
2013-10-10 15:50 ` Simon Glass
@ 2013-10-10 16:04 ` Stephen Warren
2013-10-10 16:42 ` Simon Glass
0 siblings, 1 reply; 8+ messages in thread
From: Stephen Warren @ 2013-10-10 16:04 UTC (permalink / raw)
To: u-boot
On 10/10/2013 09:50 AM, Simon Glass wrote:
> Hi Stephen,
>
> On Thu, Oct 10, 2013 at 9:48 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 10/09/2013 04:24 PM, Simon Glass wrote:
>>> On Wed, Oct 9, 2013 at 2:28 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>> From: Stephen Warren <swarren@nvidia.com>
>>>>
>>>> When a toolchain invocation fails, an exception is thrown but not caught
>>>> which then aborts the entire toolchain detection process. To solve this,
>>>> request that exceptions not be thrown, since the toolchain init code
>>>> already error-checks the command result. This solves e.g.:
>>>>
>>>> - found '/usr/bin/winegcc'
>>>> Traceback (most recent call last):
>>>> ...
>>>> Exception: Error running '/usr/bin/winegcc --version'
>>>>
>>>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>>>
>>> Acked-by: Simon Glass <sjg@chromium.org>
>>
>> Thanks. Oh. I didn't send this patch directly to any person other than
>> you, since I thought you collected patches and sent pull requests for
>> it. Should I resend it to Tom Rini?
>
> Yes I tend to do that. Perhaps this should go into the release? Let me
> know - I'll do a little pull request for Tom.
At least patch 1 sounds like a good idea for the release since it's a
bug-fix, yes.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail
2013-10-10 16:04 ` Stephen Warren
@ 2013-10-10 16:42 ` Simon Glass
0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2013-10-10 16:42 UTC (permalink / raw)
To: u-boot
Hi Stephen,
On Thu, Oct 10, 2013 at 10:04 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 10/10/2013 09:50 AM, Simon Glass wrote:
>> Hi Stephen,
>>
>> On Thu, Oct 10, 2013 at 9:48 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 10/09/2013 04:24 PM, Simon Glass wrote:
>>>> On Wed, Oct 9, 2013 at 2:28 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>>>> From: Stephen Warren <swarren@nvidia.com>
>>>>>
>>>>> When a toolchain invocation fails, an exception is thrown but not caught
>>>>> which then aborts the entire toolchain detection process. To solve this,
>>>>> request that exceptions not be thrown, since the toolchain init code
>>>>> already error-checks the command result. This solves e.g.:
>>>>>
>>>>> - found '/usr/bin/winegcc'
>>>>> Traceback (most recent call last):
>>>>> ...
>>>>> Exception: Error running '/usr/bin/winegcc --version'
>>>>>
>>>>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>>>>
>>>> Acked-by: Simon Glass <sjg@chromium.org>
>>>
>>> Thanks. Oh. I didn't send this patch directly to any person other than
>>> you, since I thought you collected patches and sent pull requests for
>>> it. Should I resend it to Tom Rini?
>>
>> Yes I tend to do that. Perhaps this should go into the release? Let me
>> know - I'll do a little pull request for Tom.
>
> At least patch 1 sounds like a good idea for the release since it's a
> bug-fix, yes.
OK will do. I noticed it should be formatted to 80cols so will tweak that too.
Regards,
Simon
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-10-10 16:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09 20:28 [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail Stephen Warren
2013-10-09 20:28 ` [U-Boot] [PATCH 2/2] buildman: make board selector argument a regex Stephen Warren
2013-10-09 22:28 ` Simon Glass
2013-10-09 22:24 ` [U-Boot] [PATCH 1/2] buildman: don't fail --list-toolchains when toolchains fail Simon Glass
2013-10-10 15:48 ` Stephen Warren
2013-10-10 15:50 ` Simon Glass
2013-10-10 16:04 ` Stephen Warren
2013-10-10 16:42 ` 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.