- 1 Tinderbox 3 Builds and Tests
- 1.1 Mozilla specific tests
- 1.2 Non-mozilla tests
- 1.2.1 Setup
- 1.2.2 History, or How does Mozilla do it?
- 1.2.3 Details, Details, Details
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.
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.
Please do! It's also missing from the Tinderbox:Tbox3_Setup page.
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:
- Pulls the code from CVS and prepares to build. If there are new changes that require a build, then
SHOULD_BUILDis set; otherwise, it's left 0, so only the tests run continuoulsy if no one checks in code (this may be an oversight).
SHOULD_BUILDis set, it will call "make" to make the build.
- The distribute module looks at the argument (or Var) distribute, which defaults to "build_zip". Then for each module, if
SHOULD_BUILD, it calls the module (which does a "make packager", or creates some other zip file), and then scps the build to the server.
- The tests module looked at the argument (or Var) "tests" (which defaults to "Tp,Ts,Txul") Then tests calls each of the arguments as a module (so TinderClient::Modules::Tp gets called, TinderClient::Modules::Ts, etc)
Details, Details, Details
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.
- do_command($command, $grep, $timeout)
- The do_command method, in addition to doing a command, also adds it to the logs.
$command is the command to run
$grep is an optional subroutine to parse the output of $command
If the command has run for $timeout and is not giving output, it is assumed to have hung.
The tinderbox server will show the logs in various formats. The Summary format will only include things that start with ---> and %lt;---. These are used to add or remove tabs for the summary as well.
Commands whose results that show up in the summary include:
- do_command (via start/end section)
- This only adds a message to the log.
Not sure what this is used for yet.
Here's where your client does it's stuff.
The success or failure of the do_action command is announced by the return code:
- 100-103: Success!
- 200-203: Various Failure codes.
- 301: ???
This is called one *all* of the do_action()s have been completed, and only if no errors were reported.