**Note:** Using `--network host` is recommended if you encounter DNS resolution hangs during the build process.
---
## 0.1. Building ProxySQL (Debug Mode)
Some tests require ProxySQL to be compiled in debug mode (e.g., for `LOAD DEBUG FROM DISK` support). If you encounter errors like `near "LOAD": syntax error` when the test runner tries to execute `LOAD DEBUG FROM DISK`, you need to rebuild ProxySQL in debug mode:
```bash
export PROXYSQLGENAI=1
make -j$(nproc) build_deps && make -j$(nproc) debug && make -j$(nproc) build_deps && make -j$(nproc) build_tap_test_debug
```
This will:
1. Build all dependencies
2. Compile ProxySQL with debug symbols and the DEBUG module enabled
3. Rebuild dependencies (if needed for debug mode)
4. Build TAP test executables in debug mode
**Note:** After rebuilding, restart your infrastructure with a fresh `INFRA_ID` to use the new binary.
---
## 1. Core Concepts
@ -31,13 +50,21 @@ The Unified CI system is designed around three pillars:
The infrastructure management and test execution are strictly separated.
### Step 1: Global Setup
**IMPORTANT:** `INFRA_ID` must be unique for each test run to avoid conflicts. Use a timestamp to ensure uniqueness:
```bash
export WORKSPACE=$(pwd)
export INFRA_ID="dev-$USER"
export INFRA_ID="test-$(date +%s)" # Unique ID using timestamp
export TAP_GROUP="mysql84-g1"
source test/infra/common/env.sh
```
**Why unique INFRA_ID?**
- Prevents port collisions when multiple tests run on the same host
- Ensures clean isolation between test environments
- Avoids conflicts with existing Docker containers and networks
### Step 2: Start ProxySQL & Backends
You can use the helper script to automatically start all required components for a group:
```bash
@ -84,7 +111,7 @@ The `docker-compose-init.bash` scripts implement a strict **non-destructive poli
| `INFRA_ID` | `dev-$USER` | **Required**. Unique namespace for Docker containers/networks. **Must be unique** - use a timestamp for isolation: `export INFRA_ID="test-$(date +%s)"`|
| `WORKSPACE` | Repo Root | Root path of the ProxySQL repository. |
| `TAP_GROUP` | (none) | Run a specific group defined in `test/tap/groups/groups.json`. |
| `TEST_PY_TAP_INCL` | (none) | Filter tests within the group (regex matching test names). |
@ -98,7 +125,7 @@ The `docker-compose-init.bash` scripts implement a strict **non-destructive poli
### Example 1: Run a single test in a MySQL 8.4 environment
If you are developing a fix and only want to run one specific test:
```bash
export INFRA_ID="fix-123"
export INFRA_ID="fix-123-$(date +%s)" # Unique ID with timestamp