Building and Testing

Building and Testing

This section describe the process of building and testing rbXPCOM on a Unix like platform.

Prerequisite

The bulid environment of rbXPCOM depends on the Mozilla's build infrastructure. Following explanation assumes you have already successfully built the xpcom module in the Mozilla source tree.

You can build only xpcom module by specifying --enable-modules=xpcom to configure script.


% ./configure --enable-modules
% make
     

See mozilla's build documentation for more info.

Preparing rbXPCOM Source Tree

The rbXPCOM tar archive contains rbXPCOM-x.x.x/ruby/xpcom directory. Move ruby/xpcom portion to mozilla/extensions/ in the Mozilla source tree.

Building rbXPCOM

Go to the ruby/xpcom directory and type following. With luck everything (including the test) will be build.


% ruby setup.rb
% make
     

If things go wrong, please edit the rules.mk and Makefile(s) to fix the problems. And, please let the auther know about your trouble (and patchs are always welcom).

Testing rbXPCOM

The testcases of rbXPCOM use RubyUnit. You need to obtain and install it before running the tests. RubyUnit is registered to the RAA (Ruby Application Archive). http://www.ruby-lang.org/en/raa-list.rhtml?name=RubyUnit

Go to ruby/xpcom/test/ and type following.


% ruby test.rb

Installation

Warning

make install does not install install rbXPCOM.

Recursively copy ruby/xpcom/ruby/* to your site_ruby/ directory by hand.