Tinderbox/Tbox3 tests

< Tinderbox
Revision as of 00:41, 11 August 2005 by PeterKay (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Tinderbox 3 Builds and Tests

Mozilla specific tests

You shouldn't have much trouble running the supplied tinderclient - it's specifically set up for Mozilla.

Non-mozilla tests

Suppose you want to test building your application on a bunch of platforms and showing the results on Tinderbox. What do you have to do to set up the tests?

First, we assume you're using the tinderclient that was posted in the webtools newsgroup. I'll attach it here sometime.

Setup

In the tinderclient directory, there is a subdirectory TinderClientModules. This directory holds Perl Modules that get called by tinderclient, based on options fed at the command line ("--module ..."). All you need to do is take the Template.pm, copy it to a new name, change the package line of the module to match your name, and add code!

History, or How does Mozilla do it?

The original Mozilla specific tbox3 tinderclient has 4 modules that get run, one after the other: (todo: fill these in with details!)

  • init_tree
  • build
  • distribute
  • tests

Details, Details, Details

$client object

The $client object has a few function calls you'll probably want to use, as they help logging and facilitate using the framework tinderclient sets up for you.

  • get_field ??
  • do_command

The do_command method, in addition to doing a command, also adds it to the logs.

  • eat_command ??
  • print_log

This only adds a message to the log?

TinderClientModules::YourModule::get_config

Not sure what this is used for yet.

TinderClientModules::YourModule::do_action

Here's where your client does it's stuff.

Return Codes

The success or failure of the do_action command is announced by the return code:

  • 100-103: Success!
  • 200-203: Various Failure codes.
  • 301: ???

TinderClientModules::YourModule::finish_build

This is called one *all* of the do_action()s have been completed, and only if no errors were reported.