Archive for September, 2010

Make Tellurium / Selenium work with Firefox and Snow Leopard

Tuesday, September 28th, 2010

TDL’s been playing around with Tellerium / Selenium for functional web-based tests for a little while now. Unfortunately everyone who’s been messing around with it has been running them on Ubuntu and the others of us on the team have OS X. When you run the Tellerium tests on a Mac with Snow Leopard they fail to start Firefox with the following output from the Selenium server:

Preparing Firefox profile...
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/
Reason: Incompatible library version: Security requires version 9.0.0 or 
   later, but libsqlite3.dylib provides version 1.0.0

What is Wrong?

The problem Firefox is complaining about is the version of libsqllite3.dylib found. Snow Leopard ships with a version of libsqllite in /usr/lib and Firefox also provides it’s own version of libsqllite3. Unfortunately there is a bug in Selenium 1.0.1 with how it calls Firefox that was patched in next version 1.0.2, however because of other bugs Tellerium is staying with 1.0.1 for now. You can read more about that decision in the mailing list thread:

The actual problem, at least from an outside view point, is dirt simple. When Selenium calls Firefox it sets up a set of environmental variables, one of which is:


As you can probably see there’s a problem with the path with the “null” that snuck in there. So somewhere in Selenium there’s some place where they forgot to check for a null value. When Firefox starts up it’s not able to find it’s local copy of libsqllight because of the invalid path arguments. But Firefox will happily guess a good set of paths if you forget to set the DYLD_LIBRARY_PATH, so a simple solution is to place a simple bash script in-between Selenium and Firefox that simple removes the corrupted path.


In-place SVN Import

Monday, September 6th, 2010

I discovered an SVN trick today: how to do an in-place import into SVN. Normally when you run “svn import” it will leave the file system alone creating a copy on the repository. Then you have to do an “svn checkout” to pull the files back down under version control.

The import/checkout process normally this is a pain. However there are a few instances where it’s a really big pain such as Unix’s etc/ directory. You can’t just delete etc/ and recheck it out from version control or lots of stuff will break.  The other place I’ve found this usefull is for Xcode when starting new projects. Use the in-place import instead of Apple’s suggestion of creating two projects.

The process is quite simple. First create an empty directory is the repository, then checkout the empty directory into your existing location. Finally, run add the new files and then commit them into the repository.

svn mkdir

svn checkout https//  .

svn add *

svn commit –m “Initial in-place import of directory”