Skip to content

build: fix notifier typo and passing to builds API #6914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2018

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented May 15, 2018

Description

Notifier should be passed to build libs functions, otherwise it's none and fails. To get this in, I would like first to have tests failing for mbed 2 builds to confirm this is fixing it (tested locally, it does build now).

@jeromecoutant This should fix the issue you reported few minutes ago.

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

cmonr
cmonr previously approved these changes May 15, 2018
Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jeromecoutant
Copy link
Collaborator

Hi Martin

This should fix the issue you reported few minutes ago

LGTM, Thx

@jeromecoutant
Copy link
Collaborator

Oups... I made a too quick answer...

$ python tools/build.py -m NUCLEO_F030R8 -t ARM
...
'ARM_STD' object has no attribute 'info'
Build failures:

Notifier should be passed to build libs functions, otherwise it's
none and fails.

Missing notify object in toolchain also fixed.
@0xc0170 0xc0170 force-pushed the fix_build_notifier branch from 58d3de2 to 0bbfc61 Compare May 16, 2018 12:30
@0xc0170
Copy link
Contributor Author

0xc0170 commented May 16, 2018

Fixed, I noticed few self.info in toolchains init file. Fixed now, they invoke it via self.notify.info

@jeromecoutant
Copy link
Collaborator

Seems correction is not complete...

python tools/singletest.py -M muts_test.json -i muts_compilation.json -V -j 4
Traceback (most recent call last):
File "tools/singletest.py", line 262, in
if (singletest_in_cli_mode(single_test)):
File "C:\github\mbed\tools\test_api.py", line 1547, in singletest_in_cli_mode
test_summary, shuffle_seed, test_summary_ext, test_suite_properties_ext, build_report, build_properties = single_test.execute()
File "C:\github\mbed\tools\test_api.py", line 651, in execute
self.execute_thread_slice(q, target, toolchains, clean, test_ids, self.build_report, self.build_properties)
File "C:\github\mbed\tools\test_api.py", line 390, in execute_thread_slice
build_profile=profile)
TypeError: build_mbed_libs() got an unexpected keyword argument 'verbose'

it was removed recently, not used anymore
@0xc0170
Copy link
Contributor Author

0xc0170 commented May 16, 2018

I was after fixing build problem, but as we are on the subject, lets fix the verbose argument that is not there anymore.

Pushed a new commit, removing verbose from build libs as it's not defined anymore

@jeromecoutant
Copy link
Collaborator

File "C:\github\mbed\tools\build_api.py", line 1028, in build_mbed_libs
notify.info("Building library %s (%s, %s)" %
AttributeError: 'NoneType' object has no attribute 'info'

@0xc0170
Copy link
Contributor Author

0xc0170 commented May 18, 2018

Thanks @jeromecoutant . What is the command ? I would like to reproduce the issue. None should not be passed to build functions as notify argument or this needs a bit refactoring.

waiting for @theotherjimmy

@jeromecoutant
Copy link
Collaborator

What is the command ?

python tools/singletest.py --auto --tc ARM -n MBED_2

@@ -197,6 +197,7 @@
name=options.artifact_name,
build_profile=profile,
ignore=options.ignore,
notify = notifier,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces should be removed.

@theotherjimmy
Copy link
Contributor

@0xc0170 Would you like me to fix singletest.py?

@cmonr
Copy link
Contributor

cmonr commented Jun 4, 2018

@0xc0170 ^^^ ?

@theotherjimmy
Copy link
Contributor

theotherjimmy commented Jun 4, 2018

@cmonr Let's get this in. Singletest can come as another PR, if at all.

@cmonr
Copy link
Contributor

cmonr commented Jun 4, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jun 5, 2018

Build : SUCCESS

Build number : 2239
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6914/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jun 5, 2018

@mbed-ci
Copy link

mbed-ci commented Jun 5, 2018

@jeromecoutant
Copy link
Collaborator

jeromecoutant commented Jun 5, 2018

No..
This PR doesn't correct the issue

python tools/singletest.py -M muts_test.json -i muts_compilation.json -V -j 4 -n MBED_2
Traceback (most recent call last):
  File "tools/singletest.py", line 262, in <module>
    if (singletest_in_cli_mode(single_test)):
  File "C:\github\mbed\tools\test_api.py", line 1545, in singletest_in_cli_mode
    test_summary, shuffle_seed, test_summary_ext, test_suite_properties_ext, build_report, build_properties = single_test.execute()
  File "C:\github\mbed\tools\test_api.py", line 649, in execute
    self.execute_thread_slice(q, target, toolchains, clean, test_ids, self.build_report, self.build_properties)
  File "C:\github\mbed\tools\test_api.py", line 389, in execute_thread_slice
    build_profile=profile)
  File "C:\github\mbed\tools\build_api.py", line 1028, in build_mbed_libs
    notify.info("Building library %s (%s, %s)" %
AttributeError: 'NoneType' object has no attribute 'info'

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 5, 2018

@theotherjimmy @cmonr If you can help with this one. I would close this and we fix the issues (@jeromecoutant confirmed even this does not completely fixes it). Thanks!

@theotherjimmy
Copy link
Contributor

@0xc0170 Let's get this in as is and not block one fix waiting on another fix that will affect fewer users

@theotherjimmy
Copy link
Contributor

@jeromecoutant see #7124

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jun 6, 2018

Missing release version, I believe should be 5.9 rc2 - resolves build failures we saw there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants