Spider and Firefox automation

Spider has been updated to version 0.0.2.4. This update includes minor changes to the default output messages Spider issues as well as the ability to load browser chrome in addition to normal web pages. I’ve made a kludgey attempt to automate Firefox which simultaneously illustrates the possibilities and pitfalls of this approach. If you are a XUL hacker and have suggestions on how to improve this approach, I would really appreciate your feedback.

/bc

A little help please

DANGER! Will Robinson! DANGER!

If you are not comfortable using beta software, do not know how to back up your profile or don’t know what bugzilla is, then please do not download nightly builds for testing!

Every little bit helps…

One of the strengths of the Mozilla community which has helped make Firefox such a success are the people who love Firefox who also help to make it better. Many people have filed bugs on issues they have discovered and I would like to ask those people for a little bit of help.

Mozilla developers have been working hard to fix bugs for the releases of Firefox 2 and Thunderbird 2 later this year. So far, there have been 3331 bugs fixed on the 1.8 branch from which Firefox 2 and Thunderbird 2 will be released. Unfortunately, only 341 have been verified as fixed so far.

Crashes and Hangs

211 bugs which cause crashes or hangs have been fixed but not verified.

Regressions

327 bugs which cause regressions have been fixed but not verified.

If you filed one of the bugs on these lists, it would be very helpful if you could download a nightly build of Firefox 2 or Thunderbird 2 and verify that the bug you filed is actually fixed. Please comment in the bug and add me (bclary at bclary dot com) to the cc list.

Tip: You can easily find the bugs you filed by clicking on one of the above links and after the query loads, clicking the “Edit Search” link at the bottom of the page. Then under Email and Numbering, click the reporter check box under Any of of: and add your bugzilla email address to the field below the contains select box.

Thanks to Brian J Polidoro for bringing this to my attention.

Better now than never!

If you are a developer for a commercial web site or web application and Firefox compatibility is important to you, your employer and your customers, please begin testing your content and applications with the nightly builds of Firefox 2! The code is very quickly being locked down so that it is becoming increasingly difficult to get changes made before the release of Firefox 2. If you don’t report a problem with your site or application soon, it may be impossible to get the fix into the next release. The most important things to look for are regressions where something that worked in Firefox 1.5 is now broken in Firefox 2. This month marks the sixth year I have been a member of the Mozilla Community and it has never failed that someone from a major web site or application developer waits until the last minute to test their content with the upcoming release. Don’t be the grasshopper! Test today not tomorrow!

Firefox 1.5.0.5 released!

Firefox 1.5.0.5 was released today and every Firefox user should update today.

I have updated the ua sidebar to include the new user agent strings for those of you who are still doing user agent string browser detection.

I have also blocked access to this site and the archive for users of out of date versions of Firefox (who have JavaScript enabled). If you notice that an up to date Gecko-based browser is incorrectly blocked, please contact me and let me know the details including the user agent string.

/bc

pipefail – testing pipeline exit codes

The problem

In bash, running test programs which indicate their pass or fail status via an exit code can be problematic when they are run as part of a pipeline in Linux, Mac OS X or Cygwin since the reported exit code of a pipeline is normally the exit code of the last program in the pipeline. If the test program is not the last program in the pipeline, then its exit code will be hidden by the exit code of the last program.

The solution

bash version 3 introduced an option which changes the exit code behavior of pipelines and reports the exit code of the pipeline as the exit code of the last program to return a non-zero exit code. So long as none of the programs following the test program report a non-zero exit code, the pipeline will report its exit code to be that of the test program. To enable this option, simply execute:

set -o pipefail

in the shell where the test program will execute.

Caveat Emptor

The pipefail option was introduced in bash version 3 which is supported in current Linux, Mac OS X, Cygwin releases of bash but is not supported by the default bash shipped on Mac OS X 10.4 and earlier..

To work around this lagging version on Mac OS X 10.4, you can simply download, build and install the latest version of bash from http://ftp.gnu.org/gnu/bash/ into your /usr/local/bin directory. Then code your shell scripts to use the shebang !#/usr/local/bin/bash instead of the normal /bin/bash. For systems such as Linux or Cygwin which already provide a pipefail capable version of bash, simply create a hard link from /usr/local/bin/bash to the system version /bin/bash.

ln /bin/bash /usr/local/bin/bash

Updated April 20, 2011 to show Mac OS X 10.5 and later support pipefail. Hat tip to Ben Denckla for the updated Mac OS X support.