Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,96 @@ jobs:

- name: Test
run: ctest --test-dir build --build-config Release --output-on-failure

# -----------------------------------------------------------------
# Minimal build: core library only, all optional features OFF
# -----------------------------------------------------------------
build-minimal:
name: Minimal Build (features off)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure (core only)
run: >
cmake -B build
-DCMAKE_BUILD_TYPE=Release
-DBUILD_HTJ2K_3D=OFF
-DBUILD_JPIP_3D=OFF
-DBUILD_CLI_TOOLS=OFF
-DBUILD_TESTING=OFF

- name: Build
run: cmake --build build --config Release

# -----------------------------------------------------------------
# Packaging validation: install, pkg-config, find_package, CPack
# -----------------------------------------------------------------
packaging:
name: Packaging Validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure
run: >
cmake -B build
-DCMAKE_BUILD_TYPE=Release
-DBUILD_TESTING=ON
-DBUILD_CLI_TOOLS=ON
-DBUILD_JPIP_3D=ON

- name: Build
run: cmake --build build --config Release

- name: Install
run: cmake --install build --prefix ${{ runner.temp }}/install

- name: Validate pkg-config
run: |
export PKG_CONFIG_PATH=${{ runner.temp }}/install/lib/pkgconfig
pkg-config --modversion openjp3d
pkg-config --libs openjp3d | grep -q lopenjp3d

- name: Validate find_package
run: |
cmake -B /tmp/fptest \
-S tests/find_package_test \
-DCMAKE_PREFIX_PATH=${{ runner.temp }}/install
cmake --build /tmp/fptest

- name: Validate CPack source tarball
run: |
cd build && cpack --config CPackSourceConfig.cmake
ls -la *.tar.*

# -----------------------------------------------------------------
# GUI smoke test (headless, Linux only)
# -----------------------------------------------------------------
gui-smoke:
name: GUI Smoke Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev libgl-dev xvfb xdotool imagemagick

- name: Configure
run: >
cmake -B build
-DCMAKE_BUILD_TYPE=Release
-DBUILD_GUI_TOOLS=ON
-DBUILD_CLI_TOOLS=ON
-DBUILD_TESTING=ON

- name: Build
run: cmake --build build --config Release

- name: GUI Smoke Test
run: xvfb-run --auto-servernum bash tests/test_gui.sh build/bin
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ dist/

# Rust
rust/openjp3d/target/

# Generated test data
/tmp/openjp3d_testdata/
tests/testdata_out/
*.jp3d
*.j3d
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Phase 15: Test Automation (Phases A–D)**
- **15.1 Test data generator** (`tests/generate_test_data.py`): Python script
producing 10 deterministic datasets (TD-001 – TD-010) with fixed seeds for
reproducibility. Covers 8-bit/16-bit, signed/unsigned, single-/multi-component
layouts, from 4×4×4 ramp patterns to 256×256×64 gradient+noise volumes.
- **15.2 Error callback test** (`test_roundtrip.c`): `test_error_cb` verifies
that `opj_jp3d_decode` invokes the user callback with `OPJ_JP3D_MSG_ERROR`
severity when given invalid data (closes MT-API-009 gap).
- **15.3 Decoder callback wiring** (`openjp3d.c`): Added `DECODE_MSG` macro
to `opj_jp3d_decode()` — invokes the user callback on SOC, SIZ3D, EOC
marker errors and invalid-input conditions.
- **15.4 CLI test extensions** (`test_cli.c`): 5 new tests —
`test_verbose_content` (MT-CLI-011), `test_missing_file` (MT-CLI-014),
`test_decompress_version` (MT-CLI-016), `test_dump_version` (MT-CLI-017),
`test_transcode_version` (MT-CLI-018).
- **15.5 JPIP server lifecycle test** (`test_jpip3d.c`):
`test_server_lifecycle` — full create→load→handle→destroy lifecycle
covering MT-JPIP-002.
- **15.6 CI `build-minimal` job**: Builds core library with all optional
features OFF (covers MT-BUILD-003).
- **15.7 CI `packaging` job**: Validates install, pkg-config (MT-BUILD-004),
`find_package(OpenJP3D)` (MT-BUILD-005), and CPack source tarball
(MT-BUILD-006).
- **15.8 `find_package` test project** (`tests/find_package_test/`): Minimal
CMake project validating the installed OpenJP3D package.
- **15.9 GUI smoke test** (`tests/test_gui.sh`): Headless L1/L2 smoke test
using Xvfb — launch, screenshot, clean SIGTERM exit.
- **15.10 CI `gui-smoke` job**: Builds with `BUILD_GUI_TOOLS=ON` and runs
the headless smoke test under `xvfb-run`.
- **15.11 Traceability updates** (`doc/test-automation-plan.md`): All
traceability tables updated; automated coverage raised from 63% to 79%.
- **15.12 `.gitignore` updates**: Patterns for generated test data.

- **Test automation plan** (`doc/test-automation-plan.md`): Phased plan (A–E)
to automate all 107 manual test procedures from `doc/manual-testing.md`.
Includes gap analysis, test data catalog (10 deterministic datasets), CI
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ OpenJP3D is under active development. The following phases are complete:
- **Phase 12** — MATLAB/Octave Bindings ✅
- **Phase 13** — Go Bindings ✅
- **Phase 14** — Rust Bindings ✅
- **Phase 15** — Test Automation (Phases A–D) ✅

**Current release: v1.0.0** (phases 0–7); phases 8–14 in `[Unreleased]`.
**Current release: v1.0.0** (phases 0–7); phases 8–15 in `[Unreleased]`.

See [milestone.md](milestone.md) for the full implementation plan,
[CHANGELOG.md](CHANGELOG.md) for detailed change history,
Expand Down
Loading