github: What to do when unittests fail?

Jonathan M Davis jmdavisProg at gmx.com
Tue May 24 10:52:01 PDT 2011


> On 5/24/11, David Nadlinger <see at klickverbot.at> wrote:
> > master, then create a feature branch for your pull request (»git
> > checkout -b spiffy-new-feature«).
> 
> Ok, but what about the errors in my original post? I should make sure
> all unittests pass when I make a pull request, right?
> 
> If that's required I think I'd have to first checkout an older commit.
> But I'm not sure which one. There's a bunch of them for dates May 16th
> and older listed here:
> http://d.puremagic.com/test-results/platform-history.ghtml?os=Win_32
> 
> E.g. this one:
> http://d.puremagic.com/test-results/test_data.ghtml?dataid=62436 It says:
> From git://github.com/D-Programming-Language/phobos
> 3b628ae..d1d8124 master -> origin/master
> 
> I'm not sure what 3b628ae..d1d8124 means, should I do "git checkout
> d1d8124" or something similar to get this commit?

Pull requests should generally be based on the latest code. Just because it 
passed when dealing with the older code doesn't mean that your changes will 
pass with the newer code. If the autotester is failing, I'd suggest simply 
waiting until it's fixed before doing a pull request unless you're certain 
that your fix is completely unrelated to its failure. If the current code in 
git is failing, it should generally be fixed fairly quickly. The tests are 
currently fully passing on Windows. They're failing on the other OSes because 
of a compiler change which affected std.datetime (due to a bug which causes 
dmd to run out of memory when compiling the full unit tests with std.datetime 
included, std.datetime's unit tests aren't currently run on Windows, which is 
why they're not failing). If you're using dmd 2.053, that shouldn't be a 
problem, and Don has a fix prepared for the bug, so the autotester should be 
passing again soon.

Regardless, I wouldn't advise making changes based on old code. They're less 
likely to be correct and more likely to cause merge issues.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list