Repository navigation
Update insert-ignores.sh to current requirements #1450 - #1455
Conversation
sjwarner-bp
left a comment
There was a problem hiding this comment.
Just running it locally for the first time, it looks like this also adds an @Ignore("Remove to run test") to the first test in each suite.
This is not in line with the policy linked in the issue ignore non-initial tests.
The old version of this script skips over the first test in each suite, and only adds @Ignore to subsequent tests.
Does that make sense? 🙂
| sed '1,/@Ignore/s/.*@Ignore//' > "$tempfile" \ | ||
| && mv "$tempfile" "$file" | ||
|
|
||
| #ignoreFound variable will check if already Ignore is imporeted or not. |
There was a problem hiding this comment.
Typo -> imporeted should be imported
| cat $file | sed 's/import org.junit.Test;/import org.junit.Test;\ | ||
| import org.junit.Ignore;/' > $tempfile | ||
| mv "$tempfile" "$file" | ||
| pwd |
There was a problem hiding this comment.
Should this be indented?
|
@sjwarner-bp : thank you for your comments ... I'll update it ... |
e587d99 to
7ef9b90
Compare
|
@sjwarner-bp : updated the script... please validate once... |
sjwarner-bp
left a comment
There was a problem hiding this comment.
This is looking good so far! There are just a couple of tiny things left now.
I've just run it against a clean copy of master here, and from what I can see the import org.junit.Ignore still gets pulled in on test suites where it is not used (for example, it appears in GreeterTest.java - this should probably be conditional based on if we use it or not).
It also looks as though somehow file permissions are changed - the message:
old mode 100755
new mode 100644
seems to be quite common.
Other than that, this is looking good!
|
Also to add to the comment above, it seems like the indentation might be slightly wrong 🙂 |
|
@sjwarner-bp : I'll update the script ... |
7ef9b90 to
098da1e
Compare
|
@sjwarner-bp , I've updated the script with following two changes :
Please let me know if any further changes are needed. |
|
Thanks for all the improvements with this! I'll pull it down and try it out at lunchtime 🙂 |
sjwarner-bp
left a comment
There was a problem hiding this comment.
This look alright to me! I think this works correctly now.
Thanks for getting this done!
|
Thanks @hgvanpariya 🎆 |
Reviewer Resources:
Track Policies