The bootstrap
command installs all the required dependencies for running all the components and copies the config folder to all the project submodules. To use this command, simply run
python butler.py bootstrap
The run_server
command starts the PinguCrew backend server locally, allowing you to run fuzz tests on your own computer. To run the server, follow these steps:
- Start Docker service and run butler command.
- Use the
--skip-install-deps
option to skip installation of dependencies (if desired). - Use the
--storage-path
option to specify the storage path for the local database. - Use the
--log-level
option to specify the logging level for the server.
For example, to start the PinguCrew server with default options, you can run the following command:
python butler.py run_server --skip-install-deps
Alternatively, you can supply additional command-line arguments to specify options such as the bootstrap and clean.
For example, to start the PinguCrew server in your first execution with default options and initialize the database and the deafult buckets, you can run the following command:
python butler.py run_server --bootstrap
In addition, the run_server
command has many more options that you can find in the help
output. Use the python butler run_server --help
command to see the full list of options.
The run_bot
command runs a local instance of your PinguBot app on the current directory. To run the bot, follow these steps:
- Run the butler command specifying a bot installation directory (Eg. test-bot).
- Use the
--config-dir
option to specify the path to the application's config directory. - Use the
--name
option to specify the name of the bot to create. - Use the
--server-storage-path
option to specify the storage path for the local database. - Use the
--android-serial
option to connect to an Android device instead of running normally. - Use the
--testing
option to run tests against the bot.
For example, to create a new bot with default options, you can run the following command including the conmfiguration folder path and the folder path which will be the bot working directory:
python butler run_bot -c configs/test test-bot
In addition, the run_bot
command has many more options that you can find in the help
output. Use the python butler.py run_bot --help
command to see the full list of options.
The run_web
command runs the Pingu frontend server on the current directory. To run the server, follow these steps:
- Start your Butler instance.
- Use the
--Skip-Install-Deps
option to skip installation of dependencies (if desired). - The server will start and begin listening for requests.
For example, to run the server with default options, you can run the following command:
python butler.py run_web
In addition, the run_web
command has many more options that you can find in the help
output. Use the python butler.py run_web --help
command to see the full list of options.
The reproduce
command runs the reproduction process for a discovered testcase. To run the process, follow these steps:
- Start your Butler instance.
- Navigate to the directory where you want to run the reproduction process.
- Use the
--testcase
option to specify the id of the discovered testcase. - Use the
--build-dir
option to specify the path to the build directory containing the target app and dependencies. - Use the
--iterations
option to specify the number of times to attempt reproduction. - Use the
--disable-xvfb
option to disable running the testcase in a virtual frame buffer. - Use the
--disable-android-setup
option to skip setting up an Android device for reproduction. - Use the
--verbose
option to print additional log messages while running. - Use the
--emulator
option to run and attempt to reproduce a crash using the Android emulator. - Use the
--application
option to specify the name of the app binary to run. - The reproduction process will run and attempt to reproduce the crash in the specified number of iterations.
For example, to run the reproduction process with default options, you can run the following command:
python butler.py reproduce -t <TESTCASE_ID
> -b <BUILD_DIR> -a <APP_NAME>
In addition, the reproduce
command has many more options that you can find in the help
output. Use the python butler.py reproduce --help
command to see the full list of options.
The run command works as a wrapper to execute small managment scripts located in "src/local/butler/scripts/". To run a managament command, follow these steps:
- Start your Butler instance
- Use the
--non-dry-run
option to run the script enable writes to the actual datastore (eg. buildin fuzzers and templates).
For example to initialize the initial datastore data execute the following command line:
python butler.py run setup --non-dry-run