The Tx3 toolchain installer
The project includes end-to-end tests that verify the tx3up installer functionality. These tests can be run locally to ensure the installer works correctly in your environment.
-
Build the binary: First, build the release version of
tx3up:cargo build --release
-
Install jq (optional, for enhanced JSON validation):
# On Ubuntu/Debian sudo apt-get install jq # On macOS brew install jq
fresh_install.sh: Tests a clean installation of the toolchainupdate_install.sh: Tests updating an existing installation
# Run fresh install test
./tests/e2e/fresh_install.sh
# Run update install test
./tests/e2e/update_install.sh# Run all e2e tests
for test in tests/e2e/*.sh; do
echo "Running $test..."
"$test"
doneYou can customize the test behavior using environment variables:
# Use a specific installation directory
export TX3_ROOT_DIR="/tmp/my_tx3_test"
./tests/e2e/fresh_install.sh
# Test with a different channel (default is "stable")
export TX3_CHANNEL="nightly"
./tests/e2e/fresh_install.sh
# Combine both parameters
export TX3_ROOT_DIR="/tmp/my_tx3_test"
export TX3_CHANNEL="beta"
./tests/e2e/update_install.sh
# The test will automatically clean up after itselfEach test provides colored output showing:
- ✅ Green: Successful operations
- ❌ Red: Failed operations
⚠️ Yellow: Warnings or informational messages
The tests will:
- Create a temporary installation directory
- Run the installer with the test configuration
- Verify the installation artifacts
- Clean up temporary files automatically
The E2E tests can be run manually in GitHub Actions using the "E2E Tests" workflow:
Manual Workflow Trigger
- Navigate to Actions → E2E Tests → Run workflow
- Specify the GitHub release tag to test (e.g.,
v0.4.2) - Choose the TX3 channel to test (
stable,nightly, orbeta)
How it works:
Stage 1: Download Binaries (4 jobs)
- Downloads release binaries from GitHub releases for each platform:
- Ubuntu Intel (x86_64-unknown-linux-gnu)
- Ubuntu ARM (aarch64-unknown-linux-gnu)
- macOS Intel (x86_64-apple-darwin)
- macOS ARM (aarch64-apple-darwin)
Stage 2: Run Tests (8 jobs)
- Downloads the appropriate binary for each platform
- Runs both
fresh_installandupdate_installtests - Tests against the specified channel
This approach tests actual released binaries rather than building from source, ensuring the published artifacts work correctly.
Check the .github/workflows/e2e.yml file for the complete workflow configuration.