This is an automated email from the ASF dual-hosted git repository.
guanmingchiu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/mahout.git
The following commit(s) were added to refs/heads/main by this push:
new e62ab7289 MAHOUT-866: Update docs to reflect the unified test workflow
and testing structure (#870)
e62ab7289 is described below
commit e62ab72895ed40e3ca8e93e0d77235e5a5102f0f
Author: Vic Wen <[email protected]>
AuthorDate: Mon Jan 19 15:48:49 2026 +0800
MAHOUT-866: Update docs to reflect the unified test workflow and testing
structure (#870)
* docs: update CONTRIBUTING.md
* docs: update testing/README.md
---
CONTRIBUTING.md | 12 ++++++++----
testing/README.md | 37 ++++++++++++++++++++++++++++++-------
2 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f2fb4c416..bbff5bd84 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -69,11 +69,15 @@ git push
### 2.3 Test
-Run the test suite using pytest:
+The project uses a unified test workflow with pytest. Tests are organized in
the `testing/` directory.
-```bash
-pytest
-```
+**Test Structure:**
+- `testing/qumat/` - Tests for the Qumat quantum computing library
+- `testing/qdp/` - Tests for the Quantum Data Plane (GPU-accelerated,
auto-skipped if extension unavailable)
+- `testing/utils/` - Shared test utilities and helpers
+- `testing/conftest.py` - Pytest configuration with shared fixtures
+
+See [testing/README.md](testing/README.md) for detailed testing documentation.
### 2.4 Pre-commit Checks
diff --git a/testing/README.md b/testing/README.md
index b8d50509d..781d0cf6e 100644
--- a/testing/README.md
+++ b/testing/README.md
@@ -18,9 +18,17 @@ limitations under the License.
# Apache Mahout Testing Suite
-For each backend supported in Apache Mahout, the testing suite executes an
example circuit using the qumat implementation of the backend, and then
executes the same example circuit using the backend's native implementation.
The test then checks that the resulting final state vectors are the same.
+This directory contains the unified test suite for Apache Mahout, covering
both the Qumat quantum computing library and the QDP (Quantum Data Plane)
GPU-accelerated components.
-The testing suite is run using `pytest`, which is installed by default. To run
the tests, simply run
+## Test Structure
+
+```
+testing/
+├── qumat/ # Qumat backend tests
+├── qdp/ # QDP tests (GPU-required)
+├── utils/ # Shared test utilities
+└── conftest.py # Pytest configuration and fixtures
+```
## Running Tests
@@ -30,12 +38,27 @@ pytest
# Run with verbose output
pytest -v
+
+# Run only Qumat tests (works without GPU)
+pytest testing/qumat/
+
+# Run only QDP tests (requires GPU and built extension)
+pytest testing/qdp/
+
+# Run specific test file
+pytest testing/qumat/test_create_circuit.py
+
+# Run tests matching a pattern
+pytest -k "hadamard"
+
+# Run tests for a specific backend
+pytest -k "qiskit" testing/qumat/
```
-## Adding New Backend Tests
+## QDP Test Handling
-1. Create `testing/my-new-backend_helpers.py` with:
- - `get_qumat_backend_config()` function which returns the qumat backend
config needed for the qumat implementation of my-new-backend
- - `get_native_example_final_state_vector()` function which builds and
executes the example circuit using the native implementation of my-new-backend
+QDP-related tests are automatically skipped when the QDP extension or a
compatible GPU is not available.
-2. Add `"my-new-backend"` to `testing_backends` fixture in `conftest.py`
+- QDP tests do **not** block running the Qumat test suite
+- Contributors without CUDA GPUs can run all Qumat tests normally
+- QDP tests are only executed when the required extension and hardware are
available