test: enable legacy support in version compatibility test

Summary:
The version compatibility test needs to decode legacy frames (v0.5.x - v0.7.x) to verify cross-version interoperability. Since legacy support is now disabled by default (v1.6.0), head must be built with ZSTD_LEGACY_SUPPORT=5 for this test.

Test Plan:
Run `python3 tests/test-zstd-versions.py` to verify cross-version compatibility testing works correctly.
This commit is contained in:
Yann Collet
2025-12-18 14:42:41 -08:00
committed by Yann Collet
parent 8ba2f20a90
commit a87d0cc476
+5 -2
View File
@@ -259,13 +259,16 @@ if __name__ == '__main__':
shutil.copy2('dictBuilder', '{}/dictBuilder.{}'.format(tmp_dir, tag))
os.chdir(r_dir + '/programs') # /path/to/zstd/tests/versionsTest/<TAG>/programs
make(['clean'], False) # separate 'clean' target to allow parallel build
make(['zstd'], False)
# Enable legacy support for cross-version compatibility testing
make(['zstd', 'ZSTD_LEGACY_SUPPORT=5'], False)
else:
os.chdir(programs_dir)
print('-----------------------------------------------')
print('compiling head')
print('-----------------------------------------------')
make(['zstd'], False)
# Enable legacy support for head to test cross-version compatibility
# (legacy support is disabled by default since v1.6.0)
make(['zstd', 'ZSTD_LEGACY_SUPPORT=5'], False)
shutil.copy2('zstd', dst_zstd)
# remove any remaining *.zst and *.dec from previous test