tools: add batch DDS exporter for TTPF texture pools #792

Merged
stan495 merged 6 commits from upstream-pr/798 into main 2026-11-23 07:02:23 +00:00
stan495 commented 2026-11-23 05:18:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T05:18:18Z.


Add tools/ttpf_batch_export.py to batch export BCPack/ETPF textures from RDS5 pools to Windows DDS with structured manifest generation and SHA-256 recording, addressing the workflow requested in #458.

Change

  • Adds tools/ttpf_batch_export.py:
    • Accepts a .ttpf (RDS5) texture pool and an index range (via --indices or --start/--count).
    • Strict mode by default; retries with fitted provisional calibration history only when --allow-provisional is explicitly specified.
    • Writes each export to a temporary path and publishes it atomically to the destination only on successful completion.
    • In a reused output directory, unlinks any stale .dds file on export failure or rejection, ensuring the current manifest.json remains the sole authority for published outputs.
    • Multi-threaded batch orchestration (--threads) with configurable tools resolution via --tools-path or environment variables TTPF_TOOLS_DIR/BCPACK_REFERENCE_TOOLS.
    • Calculates the SHA-256 digest of each exported DDS file.
    • Emits a sorted JSON manifest recording entry index, status, dimensions, DXGI codec, DDS size, and output SHA-256.
  • Adds tests/ttpf_batch_export_check.py with 8 unit and integration tests:
    • Index range parsing and bounds clamping.
    • Strict-by-default execution and provisional opt-in retry.
    • Atomic temporary publish and failure cleanup.
    • Fitted-then-strict sequence on a reused output directory ensuring stale provisional DDS is removed on strict failure.
    • Uncompressed and blocked codec rejection.
    • Manifest generation and status aggregation.
    • Integration test test_real_exporter_dds_and_pixel_verification generating a minimal valid 12,544-byte RDS5/ETPF pool (BC1 and BC7 entries), exporting via the real pinned exporter, and independently verifying decoded RGBA8 pixels against expected references and bcpack_mode6_vector.RGBA.
    • Negative controls for corrupted block data and out-of-bounds descriptor indices.
  • Registers ttpf_batch_export in CMakeLists.txt (CTest), .github/workflows/windows.yml, AGENTS.md, and docs/non-windows-hosts.md.
  • Documents tool usage and reproduction commands in docs/experiments.md.

Verification and Evidence

1. Default test run (external tools absent)

python -B tests/ttpf_batch_export_check.py -v
# test_export_fitted_then_strict_reused_directory ... ok
# test_export_texture_entry_atomic_publish_and_failure_cleanup ... ok
# test_export_texture_entry_provisional_opt_in ... ok
# test_export_texture_entry_strict_default ... ok
# test_export_texture_entry_uncompressed_and_blocked ... ok
# test_manifest_generation ... ok
# test_parse_indices ... ok
# test_real_exporter_dds_and_pixel_verification ... skipped 'optional local ttpf tools directory'
# Ran 8 tests in 0.053s, OK (skipped=1)

2. Actual run of optional real-backend fixture with pinned external tools

Tested using the pinned Leonida reference exporter at revision b0befb4b88d6640354940117448ea19d52507584:

$env:TTPF_TOOLS_DIR = "D:\path\to\Leonida\tools"
python -B tests/ttpf_batch_export_check.py -v

Observed result:

test_export_fitted_then_strict_reused_directory (__main__.BatchExportTests.test_export_fitted_then_strict_reused_directory)
A reused output directory must not leave last run's fitted DDS when strict export fails. ... ok
test_export_texture_entry_atomic_publish_and_failure_cleanup (__main__.BatchExportTests.test_export_texture_entry_atomic_publish_and_failure_cleanup) ... ok
test_export_texture_entry_provisional_opt_in (__main__.BatchExportTests.test_export_texture_entry_provisional_opt_in) ... ok
test_export_texture_entry_strict_default (__main__.BatchExportTests.test_export_texture_entry_strict_default) ... ok
test_export_texture_entry_uncompressed_and_blocked (__main__.BatchExportTests.test_export_texture_entry_uncompressed_and_blocked) ... ok
test_manifest_generation (__main__.BatchExportTests.test_manifest_generation) ... ok
test_parse_indices (__main__.BatchExportTests.test_parse_indices) ... ok
test_real_exporter_dds_and_pixel_verification (__main__.BatchExportTests.test_real_exporter_dds_and_pixel_verification)
Verify real pinned exporter with generated synthetic TTPF input and independent pixel decoding. ... ok

----------------------------------------------------------------------
Ran 8 tests in 0.082s

OK

3. CMake / CTest dev preset and repository checks

ctest --preset dev --no-tests=error -R 'ttpf_batch_export' -V
# 1/1 Test #246: ttpf_batch_export ................   Passed    0.21 sec

python -B tests/docs_links_check.py
# Self-test passed. Checked 13 Markdown files and 145 links.

python -B tests/bidi_controls_check.py
# Self-test passed. Checked 630 tracked source, script and build/CI files: no bidirectional controls.

git diff --check
# Clean, no whitespace or formatting warnings.

Evidence and follow-up

Refs #458. Provides the in-repository batch exporter tool requested by @wish131400 with strict export as default, atomic publish, manifest as authority, stale file cleanup on reused directories, and synthetic integration tests with independent pixel decoding. The real-backend check on real local game pools remains tracked under #458.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted: yes

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6552813345 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/798). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T05:18:18Z. --- Add `tools/ttpf_batch_export.py` to batch export BCPack/ETPF textures from RDS5 pools to Windows DDS with structured manifest generation and SHA-256 recording, addressing the workflow requested in #458. ## Change - Adds `tools/ttpf_batch_export.py`: - Accepts a `.ttpf` (RDS5) texture pool and an index range (via `--indices` or `--start`/`--count`). - Strict mode by default; retries with fitted provisional calibration history only when `--allow-provisional` is explicitly specified. - Writes each export to a temporary path and publishes it atomically to the destination only on successful completion. - In a reused output directory, unlinks any stale `.dds` file on export failure or rejection, ensuring the current `manifest.json` remains the sole authority for published outputs. - Multi-threaded batch orchestration (`--threads`) with configurable tools resolution via `--tools-path` or environment variables `TTPF_TOOLS_DIR`/`BCPACK_REFERENCE_TOOLS`. - Calculates the SHA-256 digest of each exported DDS file. - Emits a sorted JSON manifest recording entry index, status, dimensions, DXGI codec, DDS size, and output SHA-256. - Adds `tests/ttpf_batch_export_check.py` with 8 unit and integration tests: - Index range parsing and bounds clamping. - Strict-by-default execution and provisional opt-in retry. - Atomic temporary publish and failure cleanup. - Fitted-then-strict sequence on a reused output directory ensuring stale provisional DDS is removed on strict failure. - Uncompressed and blocked codec rejection. - Manifest generation and status aggregation. - Integration test `test_real_exporter_dds_and_pixel_verification` generating a minimal valid 12,544-byte RDS5/ETPF pool (BC1 and BC7 entries), exporting via the real pinned exporter, and independently verifying decoded RGBA8 pixels against expected references and `bcpack_mode6_vector.RGBA`. - Negative controls for corrupted block data and out-of-bounds descriptor indices. - Registers `ttpf_batch_export` in `CMakeLists.txt` (CTest), `.github/workflows/windows.yml`, `AGENTS.md`, and `docs/non-windows-hosts.md`. - Documents tool usage and reproduction commands in `docs/experiments.md`. ## Verification and Evidence ### 1. Default test run (external tools absent) ```powershell python -B tests/ttpf_batch_export_check.py -v # test_export_fitted_then_strict_reused_directory ... ok # test_export_texture_entry_atomic_publish_and_failure_cleanup ... ok # test_export_texture_entry_provisional_opt_in ... ok # test_export_texture_entry_strict_default ... ok # test_export_texture_entry_uncompressed_and_blocked ... ok # test_manifest_generation ... ok # test_parse_indices ... ok # test_real_exporter_dds_and_pixel_verification ... skipped 'optional local ttpf tools directory' # Ran 8 tests in 0.053s, OK (skipped=1) ``` ### 2. Actual run of optional real-backend fixture with pinned external tools Tested using the pinned Leonida reference exporter at revision [`b0befb4b88d6640354940117448ea19d52507584`](https://github.com/ItsNotRexed/Leonida/blob/b0befb4b88d6640354940117448ea19d52507584/tools/ttpf_mips.py): ```powershell $env:TTPF_TOOLS_DIR = "D:\path\to\Leonida\tools" python -B tests/ttpf_batch_export_check.py -v ``` Observed result: ```text test_export_fitted_then_strict_reused_directory (__main__.BatchExportTests.test_export_fitted_then_strict_reused_directory) A reused output directory must not leave last run's fitted DDS when strict export fails. ... ok test_export_texture_entry_atomic_publish_and_failure_cleanup (__main__.BatchExportTests.test_export_texture_entry_atomic_publish_and_failure_cleanup) ... ok test_export_texture_entry_provisional_opt_in (__main__.BatchExportTests.test_export_texture_entry_provisional_opt_in) ... ok test_export_texture_entry_strict_default (__main__.BatchExportTests.test_export_texture_entry_strict_default) ... ok test_export_texture_entry_uncompressed_and_blocked (__main__.BatchExportTests.test_export_texture_entry_uncompressed_and_blocked) ... ok test_manifest_generation (__main__.BatchExportTests.test_manifest_generation) ... ok test_parse_indices (__main__.BatchExportTests.test_parse_indices) ... ok test_real_exporter_dds_and_pixel_verification (__main__.BatchExportTests.test_real_exporter_dds_and_pixel_verification) Verify real pinned exporter with generated synthetic TTPF input and independent pixel decoding. ... ok ---------------------------------------------------------------------- Ran 8 tests in 0.082s OK ``` ### 3. CMake / CTest dev preset and repository checks ```powershell ctest --preset dev --no-tests=error -R 'ttpf_batch_export' -V # 1/1 Test #246: ttpf_batch_export ................ Passed 0.21 sec python -B tests/docs_links_check.py # Self-test passed. Checked 13 Markdown files and 145 links. python -B tests/bidi_controls_check.py # Self-test passed. Checked 630 tracked source, script and build/CI files: no bidirectional controls. git diff --check # Clean, no whitespace or formatting warnings. ``` ## Evidence and follow-up Refs #458. Provides the in-repository batch exporter tool requested by @wish131400 with strict export as default, atomic publish, manifest as authority, stale file cleanup on reused directories, and synthetic integration tests with independent pixel decoding. The real-backend check on real local game pools remains tracked under #458. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted: yes
upstream-sync closed this pull request 2026-11-24 06:44:50 +00:00
R0Y00 commented 2026-11-24 06:49:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T05:23:56Z.


The tests currently replace the DDS backend with a stub, so they verify batch orchestration. For #458, please add one generated or revision-pinned public input that the real, pinned exporter turns into DDS, then check expected decoded pixels independently. Keep strict as the default and require an explicit opt-in for fitted output. Right now --strict-only can also accept a file merely because it exists, including one generated from another pool or in provisional mode. Reuse an output only when its pool/range, tool revision, mode and digest match, or disable that cache in the first slice. Please write each new export to a temporary path and publish it only on successful completion. Keep #458 open until the real-backend check is in place.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7092371853 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/798#issuecomment-7092371853). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T05:23:56Z. --- The tests currently replace the DDS backend with a stub, so they verify batch orchestration. For #458, please add one generated or revision-pinned public input that the real, pinned exporter turns into DDS, then check expected decoded pixels independently. Keep strict as the default and require an explicit opt-in for fitted output. Right now `--strict-only` can also accept a file merely because it exists, including one generated from another pool or in provisional mode. Reuse an output only when its pool/range, tool revision, mode and digest match, or disable that cache in the first slice. Please write each new export to a temporary path and publish it only on successful completion. Keep #458 open until the real-backend check is in place.
R0Y00 commented 2026-11-24 06:49:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T05:49:45Z.


Thanks for the revisions. I verified that strict is now the default, fitted export needs an explicit flag, and the filename-only cache is gone. 38e7c8e also adds a synthetic BC1/BC7 integration fixture with decoded pixel references. Please record the exact pinned external tools revision, command, and result for an actual run of that optional fixture so a default skip does not stand in for evidence. In a reused output directory, a failed strict run can leave last run’s DDS on disk. Please make the current manifest the authority for this case and test the fitted-then-strict sequence against the same directory.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7092768114 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/798#issuecomment-7092768114). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T05:49:45Z. --- Thanks for the revisions. I verified that strict is now the default, fitted export needs an explicit flag, and the filename-only cache is gone. `38e7c8e` also adds a synthetic BC1/BC7 integration fixture with decoded pixel references. Please record the exact pinned external tools revision, command, and result for an actual run of that optional fixture so a default skip does not stand in for evidence. In a reused output directory, a failed strict run can leave last run’s DDS on disk. Please make the current manifest the authority for this case and test the fitted-then-strict sequence against the same directory.
stan495 commented 2026-11-24 06:49:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T05:34:13Z.


Thanks for the thorough review! Updated in commit c555eeb:

  1. Strict by default: Strict mode is now enforced by default (allow_provisional=False), requiring explicit --allow-provisional opt-in to retry with fitted history calibration.
  2. Atomic writes: Exports are now staged into unique temporary paths (.tmp_*) and atomically published (os.replace) to the target destination only upon verified completion, with automatic cleanup on rejection or error.
  3. Cache disabled in this slice: Removed the naive file-existence cache to eliminate risk of reusing mismatched outputs from other pools/modes.
  4. Issue reference: Changed to Refs #458 so #458 remains open for the real-backend check follow-up.
  5. Tests: Updated tests/ttpf_batch_export_check.py to cover strict-by-default behavior, provisional opt-in, atomic publish and failure cleanup. All 7 tests and CTest pass.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7092520520 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/798#issuecomment-7092520520). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T05:34:13Z. --- Thanks for the thorough review! Updated in commit `c555eeb`: 1. **Strict by default:** Strict mode is now enforced by default (`allow_provisional=False`), requiring explicit `--allow-provisional` opt-in to retry with fitted history calibration. 2. **Atomic writes:** Exports are now staged into unique temporary paths (`.tmp_*`) and atomically published (`os.replace`) to the target destination only upon verified completion, with automatic cleanup on rejection or error. 3. **Cache disabled in this slice:** Removed the naive file-existence cache to eliminate risk of reusing mismatched outputs from other pools/modes. 4. **Issue reference:** Changed to `Refs #458` so #458 remains open for the real-backend check follow-up. 5. **Tests:** Updated `tests/ttpf_batch_export_check.py` to cover strict-by-default behavior, provisional opt-in, atomic publish and failure cleanup. All 7 tests and CTest pass.
stan495 commented 2026-11-24 06:49:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T05:44:50Z.


Added the real-backend verification test in commit 38e7c8e:

  • Synthetic pool generator (make_synthetic_ttpf_archive): Generates a valid 12,544-byte RDS5/ETPF pool containing two test entries (entry 0: 4x4 BC1 format 71; entry 1: 4x4 BC7 format 98 with mode6.BLOCK from tests/bcpack_mode6_vector.py).
  • Real exporter verification (test_real_exporter_dds_and_pixel_verification): Invokes the real pinned exporter (ttpf_mips.py) to export both textures to DX10 DDS with manifest generation under strict mode.
  • Independent pixel decoding:
    • decode_bc1_block independently decodes the 8-byte BC1 payload into RGBA8, verifying that all 16 texels match pure red.
    • bc7_blocks.decode independently decodes the 16-byte BC7 payload into RGBA8, verifying bit-exact agreement with mode6.RGBA.
  • Negative controls:
    • Mutated BC1 color word fails pixel comparison.
    • Mutated BC7 selector fails pixel comparison.
    • Out-of-bounds descriptor index (index 99) is caught safely and records failure in the manifest without writing or leaking a DDS file.

All 7 tests in tests/ttpf_batch_export_check.py pass (0.05s with reference tools, gracefully skipped when absent), and all 23 pure-Python test suites pass cleanly.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7092690490 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/798#issuecomment-7092690490). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T05:44:50Z. --- Added the real-backend verification test in commit 38e7c8e: - **Synthetic pool generator (`make_synthetic_ttpf_archive`)**: Generates a valid 12,544-byte RDS5/ETPF pool containing two test entries (entry 0: 4x4 BC1 format 71; entry 1: 4x4 BC7 format 98 with `mode6.BLOCK` from `tests/bcpack_mode6_vector.py`). - **Real exporter verification (`test_real_exporter_dds_and_pixel_verification`)**: Invokes the real pinned exporter (`ttpf_mips.py`) to export both textures to DX10 DDS with manifest generation under strict mode. - **Independent pixel decoding**: - `decode_bc1_block` independently decodes the 8-byte BC1 payload into RGBA8, verifying that all 16 texels match pure red. - `bc7_blocks.decode` independently decodes the 16-byte BC7 payload into RGBA8, verifying bit-exact agreement with `mode6.RGBA`. - **Negative controls**: - Mutated BC1 color word fails pixel comparison. - Mutated BC7 selector fails pixel comparison. - Out-of-bounds descriptor index (index 99) is caught safely and records failure in the manifest without writing or leaking a DDS file. All 7 tests in `tests/ttpf_batch_export_check.py` pass (0.05s with reference tools, gracefully skipped when absent), and all 23 pure-Python test suites pass cleanly.
stan495 commented 2026-11-24 06:49:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T05:57:32Z.


Updated in commit ac66ea1 and refreshed PR description:

  1. Manifest as authority and stale DDS cleanup:

    • In tools/ttpf_batch_export.py, export_texture_entry unlinks any existing target DDS file when an export fails or is rejected, preventing stale files from prior runs in a reused directory from remaining on disk.
    • Added test_export_fitted_then_strict_reused_directory in tests/ttpf_batch_export_check.py to verify that running a provisional/fitted export followed by a strict-by-default export against the same output directory purges the stale provisional DDS upon strict failure, keeping the directory and manifest in sync.
  2. Pinned tools revision and actual run evidence:

    • Updated the PR description under Verification and Evidence to document the pinned external tools revision (Leonida b0befb4b88d6640354940117448ea19d52507584), the exact execution command (python -B tests/ttpf_batch_export_check.py -v with TTPF_TOOLS_DIR), and the observed test output (test_real_exporter_dds_and_pixel_verification ... ok, 8 tests in 0.082s) alongside the default skip baseline (skipped=1).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7092880303 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/798#issuecomment-7092880303). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T05:57:32Z. --- Updated in commit ac66ea1 and refreshed PR description: 1. **Manifest as authority and stale DDS cleanup**: - In `tools/ttpf_batch_export.py`, `export_texture_entry` unlinks any existing target DDS file when an export fails or is rejected, preventing stale files from prior runs in a reused directory from remaining on disk. - Added `test_export_fitted_then_strict_reused_directory` in `tests/ttpf_batch_export_check.py` to verify that running a provisional/fitted export followed by a strict-by-default export against the same output directory purges the stale provisional DDS upon strict failure, keeping the directory and manifest in sync. 2. **Pinned tools revision and actual run evidence**: - Updated the PR description under **Verification and Evidence** to document the pinned external tools revision (Leonida [`b0befb4b88d6640354940117448ea19d52507584`](https://github.com/ItsNotRexed/Leonida/blob/b0befb4b88d6640354940117448ea19d52507584/tools/ttpf_mips.py)), the exact execution command (`python -B tests/ttpf_batch_export_check.py -v` with `TTPF_TOOLS_DIR`), and the observed test output (`test_real_exporter_dds_and_pixel_verification ... ok`, 8 tests in 0.082s) alongside the default skip baseline (`skipped=1`).
R0Y00 commented 2026-11-24 06:49:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T06:28:26Z.


I independently reran python -B tests/ttpf_batch_export_check.py -v at ac66ea1 with TTPF_TOOLS_DIR pointing to Leonida b0befb4. All 8 tests ran and passed, including the actual BC1 and BC7 pixel checks. The new cleanup deletes a colliding DDS even when analysis fails before writing anything. A failed run should preserve existing files in a reused directory: please make the current manifest authoritative, with no file or hash on the failed entry, and have the fitted-then-strict test check that the prior file still has its original bytes.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7093368541 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/798#issuecomment-7093368541). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T06:28:26Z. --- I independently reran `python -B tests/ttpf_batch_export_check.py -v` at `ac66ea1` with `TTPF_TOOLS_DIR` pointing to Leonida `b0befb4`. All 8 tests ran and passed, including the actual BC1 and BC7 pixel checks. The new cleanup deletes a colliding DDS even when analysis fails before writing anything. A failed run should preserve existing files in a reused directory: please make the current manifest authoritative, with no file or hash on the failed entry, and have the fitted-then-strict test check that the prior file still has its original bytes.
R0Y00 commented 2026-11-24 06:49:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T06:44:59Z.


I pushed 7d3940b to preserve a prior DDS when a new export fails. The current manifest records the failed entry without a file or hash. The fitted-then-strict test checked that the old bytes stayed unchanged, and all eight tests passed with Leonida b0befb4, including both real-exporter pixel comparisons.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7093637199 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/798#issuecomment-7093637199). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T06:44:59Z. --- I pushed `7d3940b` to preserve a prior DDS when a new export fails. The current manifest records the failed entry without a file or hash. The fitted-then-strict test checked that the old bytes stayed unchanged, and all eight tests passed with Leonida `b0befb4`, including both real-exporter pixel comparisons.
stan495 commented 2026-11-24 06:49:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T06:47:01Z.


Thanks for pushing 7d3940b, @R0Y00. I added regression coverage in 2959baa for two cases. A descriptor analysis error preserves the existing DDS byte-for-byte, and a backend failure after writing partial output removes the temporary file. The fitted-then-strict test also checks the failure reason and verifies that the current manifest omits file and sha256 for the failed entry.

I ran python -B tests/ttpf_batch_export_check.py -v with TTPF_TOOLS_DIR pointing to Leonida b0befb4b88d6640354940117448ea19d52507584. All 9 tests passed, including the real BC1 and BC7 pixel comparisons. ctest --preset dev --no-tests=error -R '^ttpf_batch_export$' -V also passed with the optional backend check skipped when TTPF_TOOLS_DIR was unset.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7093670810 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/798#issuecomment-7093670810). Originally posted by [stan495](https://github.com/stan495) on 2026-11-23T06:47:01Z. --- Thanks for pushing `7d3940b`, @R0Y00. I added regression coverage in `2959baa` for two cases. A descriptor analysis error preserves the existing DDS byte-for-byte, and a backend failure after writing partial output removes the temporary file. The fitted-then-strict test also checks the failure reason and verifies that the current manifest omits `file` and `sha256` for the failed entry. I ran `python -B tests/ttpf_batch_export_check.py -v` with `TTPF_TOOLS_DIR` pointing to Leonida `b0befb4b88d6640354940117448ea19d52507584`. All 9 tests passed, including the real BC1 and BC7 pixel comparisons. `ctest --preset dev --no-tests=error -R '^ttpf_batch_export$' -V` also passed with the optional backend check skipped when `TTPF_TOOLS_DIR` was unset.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!792
No description provided.