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-depsoption to skip installation of dependencies (if desired). - Use the
--storage-pathoption to specify the storage path for the local database. - Use the
--log-leveloption 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-depsAlternatively, 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 --bootstrapIn 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-diroption to specify the path to the application's config directory. - Use the
--nameoption to specify the name of the bot to create. - Use the
--server-storage-pathoption to specify the storage path for the local database. - Use the
--android-serialoption to connect to an Android device instead of running normally. - Use the
--testingoption 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-botIn 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-Depsoption 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_webIn 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
--testcaseoption to specify the id of the discovered testcase. - Use the
--build-diroption to specify the path to the build directory containing the target app and dependencies. - Use the
--iterationsoption to specify the number of times to attempt reproduction. - Use the
--disable-xvfboption to disable running the testcase in a virtual frame buffer. - Use the
--disable-android-setupoption to skip setting up an Android device for reproduction. - Use the
--verboseoption to print additional log messages while running. - Use the
--emulatoroption to run and attempt to reproduce a crash using the Android emulator. - Use the
--applicationoption 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-runoption 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