tree: 6550bc407b5910e63fa37ed1d7a2e3762e995b6f [path history] [tgz]
  3. api/
  4. bot_code/
  5. client/
  6. config/
  13. unittest.cfg

Swarming bot code

Contains the code to run on the bots. This code has to be resilient enough to be able to self-update in case of partial destruction.

The server optionally has its own that will replace the file in this directory. This script provides domain specific dimensions and should self-register the bot on startup if desired.

The server replaces config.json with server-specific details.


When the bot starts, the first thing it looks up is if it is the primary copy. If so, it immediately sets itself as Then it starts up itself. When running as and it needs to upgrade, it switches to On the next upgrade, it goes back to

Code layout

This directory contains the main entry point to the bot and symlinks to useful directories (eg to the “client” directory, which contains the Isolated clients used by the bot). The three key subdirectories are:

  • api: code usable by both the bot config hooks and by the Swarming code.
  • bot_code: the actual Swarming bot code. Implements the main bot process and the task runner process. This code cannot be accessed by the bot config hooks; it is responsible for calling those hooks.
  • config: a default implementation of the bot config, including a default implementation of every hook.