Skip to content

Refactor scan resources to account for base_paths #3560

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
Jan 26, 2017

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Jan 10, 2017

Description

Separate the logic for managing the ignores lists from the scan resources calls. Improves the speed of the scan by ignoring all subdirectories of an ignored directory instead of just the files. Allows ignores to be specific to a basepath. This is useful to the online compiler as it can change the basepath to allow ignores to affect imported libraries despite them not being a subdirectory of the project.

Status

READY

Todos

  • Tests
    • /morph test
    • online ecosystem

@theotherjimmy
Copy link
Contributor Author

/morph test

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Just a doc request, everything else looks ok.

@@ -512,6 +512,10 @@ def is_ignored(self, file_path):
return True
return False

def add_ignore_patterns(self, root, base_path, patterns):
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind adding a doc string to this? root and base_path are a bit confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup

@mbed-bot
Copy link

Result: FAILURE

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

/morph test

Output

mbed Build Number: 1376

Example Build failed!

@@ -577,7 +582,7 @@ def _add_dir(self, path, resources, base_path, exclude_paths=None):
# Ignore toolchain that do not match the current TOOLCHAIN
(d.startswith('TOOLCHAIN_') and d[10:] not in labels['TOOLCHAIN']) or
# Ignore .mbedignore files
self.is_ignored(join(dir_path,"")) or
self.is_ignored(join(relpath(root, base_path), d,"")) or
Copy link
Contributor

@bridadan bridadan Jan 10, 2017

Choose a reason for hiding this comment

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

I realize this was here before, but do you know why the path is being joined with ""?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To get that extra "/" on the end.

@theotherjimmy
Copy link
Contributor Author

The failure looks unrelated to the codebase; it looks like a clone failure or something like that.

/morph test

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1377

All builds and test passed!

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

One last nit!

"""Add a series of patterns to the ignored paths

Positional arguments:
root - the path too the ignore location
Copy link
Contributor

Choose a reason for hiding this comment

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

too? 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol. fixing

@theotherjimmy
Copy link
Contributor Author

/morph test

Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

LGTM

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1382

All builds and test passed!

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 12, 2017

Please add more info to the commit msg if possible. In this case, description provided in the first message could be in the first commit message.

Apart from that, LGTM

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 12, 2017

Waiting for CI to be green

@theotherjimmy
Copy link
Contributor Author

@jupe Why does the client-testapp build fail with Replace the file source/identity_dev_security.c with valid developer certificate? That seems like something that the CI should not encounter.

@jupe
Copy link
Contributor

jupe commented Jan 13, 2017

17:07:56 [K64F ARM] [Error] identity_dev_security_systest.c@38,0:  #35: #error directive: "Replace the file source/identity_dev_security.c with valid developer certificate"
17:07:56 
[K64F ARM] [ERROR] "./configs/identity_dev_security_systest.c", line 38: Error:  #35: #error directive: "Replace the file source/identity_dev_security.c with valid developer certificate"
17:07:56 [K64F ARM] ./configs/identity_dev_security_systest.c: 0 warnings, 1 error
17:07:56 [K64F ARM] 
17:07:56 [K64F ARM] [mbed] ERROR: "python" returned error code 1.
17:07:56 [K64F ARM] [mbed] ERROR: Command "python -u /builds/ws/ARMmbed/mbed-client-testapp/master/mbed-client-testapp/mbed-os/tools/make.py -t ARM -m K64F --source . --build ./BUILD/K64F/ARM -c" in "/builds/ws/ARMmbed/mbed-client-testapp/master/mbed-client-testapp"

@teetak01 can you help with this ?

@teetak01
Copy link
Contributor

For some reason mbed-cli is not respecting the .mbedignore. Is the build-environment somehow special?

@jupe
Copy link
Contributor

jupe commented Jan 13, 2017

true, there is mbedignore file with configs/identity_dev_security_systest.c but still it fails.. Smells bug in this PR.

@teetak01
Copy link
Contributor

This rule is no longer in effect with this PR: https://github.com/ARMmbed/mbed-client-testapp/blob/master/.mbedignore#L10

@bridadan
Copy link
Contributor

@theotherjimmy Mind taking a look?

@theotherjimmy
Copy link
Contributor Author

@bridadan I'm already looking.

@theotherjimmy
Copy link
Contributor Author

Sorry guys. I apparently started with the wrong commit. I have updated that commit to the correct one via rebasing. It should work now

/morph test

@theotherjimmy
Copy link
Contributor Author

Cam-CI looks like a Java Error.

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 1398

All builds and test passed!

@theotherjimmy
Copy link
Contributor Author

I restarted Cam-CI. Still a Java error.

@bridadan
Copy link
Contributor

retest uvisor

@bridadan
Copy link
Contributor

/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: 88

All exports and builds passed!

@bridadan
Copy link
Contributor

Looks good to me, final OK is up to you @0xc0170

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.

7 participants