Skip to content

Generate GNU ARM Eclipse .mbedignore file with jinja2 #4168

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 1 commit into from
Apr 19, 2017

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Apr 11, 2017

Descritpion

There are subtleties about where the exporters generate files when using
the online exporers-as-a-service. Simply calling open does not do the
correct thing in this environment. The self.gen_file method can be used
instead to account for these differences.

I saw an exception generated by the online build system recently.
This was the traceback:

IOError: [Errno 13] Permission denied: '.mbedignore'
  File "django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/vary.py", line 21, in inner_func
    response = func(*args, **kwargs)
  File "piston/resource.py", line 190, in __call__
    result = self.error_handler(e, request, meth, em_format)
  File "piston/resource.py", line 188, in __call__
    result = meth(request, *args, **kwargs)
  File "mbed/api/api_misc.py", line 262, in create
    inc_repos=request.POST.get('inc_repos'))
  File "mbed_compiler/export.py", line 149, in export
    notify=notify
  File "tools/project_api.py", line 222, in export_project
    macros=macros)
  File "tools/project_api.py", line 89, in generate_project_files
    exporter.generate()
  File "tools/export/gnuarmeclipse/__init__.py", line 281, in generate
    with open('.mbedignore', 'w') as f:

How to reproduce

Export a project to gnuarmeclipse on the online exporters-as-a-service.

New behavior

It should be resolved with this change, and export correctly

Testing

  • /morph export-build

@theotherjimmy theotherjimmy force-pushed the gnuarmeclipse-more-templates branch from 6e6671a to b340509 Compare April 11, 2017 19:11
@theotherjimmy theotherjimmy force-pushed the gnuarmeclipse-more-templates branch from b340509 to 6fa1de2 Compare April 11, 2017 19:12
@theotherjimmy
Copy link
Contributor Author

/morph export-build

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph export-build

Output

mbed Build Number: 160

All exports and builds passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 12, 2017

retest uvisor

@theotherjimmy
Copy link
Contributor Author

@0xc0170 All green!

@sg- sg- merged commit de6cce7 into ARMmbed:master Apr 19, 2017
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.

4 participants