Ticket #419 (new defect)

Opened 4 years ago

Last modified 3 months ago

No tests for buildbot.changes.hgbuildbot.py ?

Reported by: marcusl Owned by: marcusl
Priority: patches-accepted Milestone: 0.8.+
Version: 0.7.9 Keywords: hg simple sprint
Cc:

Description

As we did some changes to add support for inrepo branches, it is probably a good thing to have some tests for this, to see that everything runs smoothly.

Change History

comment:1 Changed 4 years ago by dustin

  • Owner set to marcusl
  • Milestone changed from undecided to 0.7.+

yep :)

comment:2 Changed 3 years ago by dustin

  • Milestone changed from 0.8.+ to 0.8.1

comment:3 Changed 3 years ago by dustin

  • Keywords hg added; mercurial removed

comment:4 Changed 3 years ago by dustin

  • Keywords tests added
  • Milestone changed from 0.8.2 to 0.8.3

comment:5 Changed 2 years ago by dustin

  • Milestone changed from 0.8.3 to 0.8.+

It's not actually part of buildbot - it is a module that gets imported into hg. It really should be in contrib/, but its module path is in buildbot.changes.

So it would be nice to test it, but it will require an hg install and some knowledge of how hg internals work.

comment:6 Changed 15 months ago by dustin

Given the problems with this file - it has trouble mixing the hg and Twisted runtimes - I wonder if we shouldn't split it up into a simple hg hook and a more complex Buildbot-specific portion. That would at least allow the latter to be tested.

comment:7 Changed 15 months ago by tom.prince

One particular issue with the hg/twisted interaction, is that this will try to start the reactor multiple times in a long-running hg process. It would probably be best to implement this using buildbot sendchange or contrib/post_build_request.py. #2227 would obviate the need to spawn an new process for this.

comment:8 Changed 3 months ago by dustin

  • Keywords simple sprint added; tests removed
  • Priority changed from major to patches-accepted

In fact, master/buildbot/changes/hgbuildbot.py is now a hook only. It should be moved to contrib, and documentation updated accordingly. This would make a good project to exercise someone's git skills.

Files in contrib don't need unit tests, so there's no need to add tests. This will, however, need a careful mention in the release notes.

Note: See TracTickets for help on using tickets.