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

Add copyright header to all tests #4859

Merged
merged 1 commit into from Aug 10, 2017

Conversation

Projects
None yet
6 participants
@geky
Member

geky commented Aug 4, 2017

Short story short: Make @0xc0170 happy : )

Short story long: At some point, some test was introduced without a copyright header, and through the test templates being copy-pasted, has proliferated the mbed OS codebase.

Now, every time someone contributes a test, they get asked to add the copyright header. Since most of our current tests lack this header, it can be a bit disengaging.

for n in $(grep -L Copyright $(find -regex '.*TESTS.*main.cpp')) ; do vim $n +'0r!sed -n "1,/\*\//{s/(c) [0-9-]*/(c) '$(date +%Y)'/;p}" mbed.h' +wq ; done
@Nodraak

This comment has been minimized.

Contributor

Nodraak commented Aug 5, 2017

Header says Copyright (c) 2006-2013 ARM Limited, should not this be 2017?

PS: your vim command is awesome!

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 6, 2017

/morph test

1 similar comment
@studavekar

This comment has been minimized.

Collaborator

studavekar commented Aug 7, 2017

/morph test

@0xc0170

0xc0170 approved these changes Aug 7, 2017

Just that year might be 2017 as most of these tests were touched recently.

Very nice script, and this is good to have ! 👍

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Aug 7, 2017

@geky geky added the needs: work label Aug 7, 2017

@geky geky force-pushed the geky:tests-copyrights branch to 4cad764 Aug 7, 2017

@geky geky removed the needs: work label Aug 7, 2017

@geky

This comment has been minimized.

Member

geky commented Aug 7, 2017

Ah thanks for pointing that out! Now that we're in sed changing the date is easy. Script updated 👍

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 8, 2017

/morph test-nightly

@mbed-bot

This comment has been minimized.

mbed-bot commented Aug 8, 2017

Result: SUCCESS

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

/morph test-nightly

Output

mbed Build Number: 961

All builds and test passed!

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Aug 8, 2017

@theotherjimmy theotherjimmy merged commit 59f313b into ARMmbed:master Aug 10, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test-nightly Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment