Skip to content
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

Shed diff report #305

Merged
merged 7 commits into from
Sep 25, 2015
Merged

Shed diff report #305

merged 7 commits into from
Sep 25, 2015

Conversation

hexylena
Copy link
Member

This produces a (fake) XUnit report for the shed_diff command. It's not complete as-is, but it'll provide essential functionality immediately. The XUnit reports will tell you if a shed diff returned a repository as being identical, different (failure), or if the diff command failed (error). It will not show a copy of the diff as I couldn't figure out how to cleanly extract that.

@jmchilton if you have suggestions for how this should be better implemented, please let me know. I see that most of the commands are pretty small and most of that functionality is tucked away in planemo.shed and friends, but here I went with the implementation I was comfortable with. If you have suggestions how I should get at the diff output I'd be happy to make another PR with those (or update this one).

(I branched off of that branch, I didn't want to deal with merge issues since these both needed common changes to the code, blargh.)

By using the to_json filter in jinja, we don't need
to manually render to a json string
@hexylena
Copy link
Member Author

Ping @martenson, this will make the shed tests much easier to read. :)

@hexylena
Copy link
Member Author

Will get failing test cases figured out presently.

@jmchilton
Copy link
Member

Let me know if you need help with the test cases, otherwise this looks very good to me. Thanks @erasche.

@hexylena
Copy link
Member Author

@jmchilton got my issue figured out :) Also adding test cases for new shed_diff xunit report. Will push shortly.

@hexylena
Copy link
Member Author

Okay, I'm at a loss for why my tests are still failing when they aren't locally. I'll attack this some more tomorrow.

@jmchilton
Copy link
Member

Yeah, they work locally for me too. Pushed a small tweak to the test cases that should improve the assertion error message reporting.

@hexylena
Copy link
Member Author

(TIL you can run individual tox tests with tox -e py27 -- -s --tests tests.test_shed_diff. Also will squash before this gets merged due to unnecessary number of commits because of Travis)

@jmchilton apparently os.walk is nondeterministic. I believe This was
causing the repositories to be discovered in varying orders on Travis's
machines (as opposed to ours), and thus when the XML results were
compared to the static files, cat2 would be before cat1, *sometimes*.

From https://docs.python.org/2/library/os.html#os.walk

> impose a specific order of visiting

found via http://stackoverflow.com/a/9062668
@hexylena
Copy link
Member Author

It finally passes! Whuuuu! @jmchilton haha. Sorry, just been wrestling with this for days and to find out it was all because of stupid non-deterministic library methods...

@jmchilton
Copy link
Member

Brilliant, thanks a bunch @erasche.

jmchilton added a commit that referenced this pull request Sep 25, 2015
@jmchilton jmchilton merged commit 65de593 into master Sep 25, 2015
@jmchilton jmchilton deleted the shed-diff-report branch September 25, 2015 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants