marionette
marionette copied to clipboard
Fix up geckodriver
Trying out marionette for a project, I ran into some problems with geckodriver.
First off, it would just hang rather than exit. Tracked that down to a sleep 1000
.
That cut the waiting down to 30 seconds. Apparently geckodriver doesn't support the shutdown command (https://github.com/mozilla/geckodriver/issues/771#issuecomment-307411488), so rather than waiting for it, skip directly to sending it signals.
And fix the build badge.
Doesn't solve all my problems though, seems that geckodriver spawns three other geckodriver processes when it's launched, which doesn't get killed when marionette closes it down, so I'm left with extra processes.
Experimenting a bit, I found out that killing the process group would take care of the extra geckodriver processes, but has the nasty sideeffect of also killing the Crystal process (as the geckodrivers are just added to its process group). Fixing that would involve making a special launcher for geckodriver that changes the process group before launching geckodriver, but that's a bit involved, so I can live with calling killall geckodriver
for the time being.