Executable
Execute shell commands and binaries as test phases.
You can execute shell commands and binaries by specifying a command.
phases:
- name: Flash Firmware
executable:
command: "esptool write_flash 0x0 firmware.bin"TofuPilot runs commands through sh on Unix/Linux/macOS or powershell on Windows by default.
Shell
You can specify which shell interprets your command.
phases:
- name: Check System
executable:
command: "uname -a"
shell: bash
- name: Get Windows Info
executable:
command: "Get-ComputerInfo"
shell: powershell
- name: Legacy Windows Command
executable:
command: "dir C:\\"
shell: cmdTofuPilot supports bash, sh, zsh, powershell, pwsh (PowerShell Core), and cmd.
Working Directory
You can set the working_directory where your command is executed.
phases:
- name: Build Project
executable:
command: "make build"
working_directory: "./home/user/firmware"
- name: Run Tests
executable:
command: "pytest tests/"
working_directory: "subproject"TofuPilot resolves relative paths from the procedure directory. If not specified, commands execute from the procedure directory by default.
Exit Codes
TofuPilot marks the phase as Pass when the exit code is 0, and Fail for any non-zero exit code.
How is this guide?