json-archive/tests/compression-integration/run_all.sh
nobody 2ab1c31993
feat: transparently append to compressed archives
When appending to a compressed archive (gzip, brotli, zstd), the tool
now handles compression automatically. Since some compression formats don't
support appending to compressed files in place, we write a new
compressed file with all the data and atomically rename it to replace
the original (assuming there is enough space on that filesystem).

This means you can work with compressed archives the same way as
uncompressed ones. Point the tool at your .json.gz file and append
values. No manual decompression/recompression needed.
2025-11-30 17:09:49 -08:00

33 lines
649 B
Bash
Executable file

#!/usr/bin/env bash
#
# Run all compression integration tests.
#
# Usage: ./run_all.sh
#
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")"
echo "=== Building json-archive with compression support ==="
cd "$PROJECT_DIR"
cargo build --features compression
echo ""
echo "=== Generating test data ==="
cd "$SCRIPT_DIR"
python3 generate_state_files.py 9 ./data
echo ""
"$SCRIPT_DIR/run_gzip_test.sh"
echo ""
"$SCRIPT_DIR/run_brotli_test.sh"
echo ""
"$SCRIPT_DIR/run_zstd_test.sh"
echo ""
echo "=== All tests complete ==="
echo "Output files are in: $SCRIPT_DIR/out/"