Skip to content

Commit 5d97d42

Browse files
committed
Re-enable dynamic linking tests
1 parent 35b827c commit 5d97d42

File tree

2 files changed

+32
-27
lines changed

2 files changed

+32
-27
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -120,33 +120,33 @@ jobs:
120120
121121
# Test if the python-isal conda package can be build. Which is linked
122122
# dynamically to the conda isa-l package.
123-
# test-dynamic:
124-
# runs-on: ${{ matrix.os }}
125-
# defaults:
126-
# run:
127-
# # This is needed for miniconda, see:
128-
# # https://github.com/marketplace/actions/setup-miniconda#important.
129-
# shell: bash -l {0}
130-
# strategy:
131-
# matrix:
132-
# os: ["ubuntu-latest", "macos-latest", "windows-latest"]
133-
# steps:
134-
# - uses: actions/[email protected]
135-
# with:
136-
# submodules: recursive
137-
# - name: Install miniconda.
138-
# uses: conda-incubator/[email protected] # https://github.com/conda-incubator/setup-miniconda.
139-
# with:
140-
# channels: conda-forge,defaults
141-
# - name: Install requirements (universal)
142-
# run: conda install isa-l python tox
143-
# - name: Set MSVC developer prompt
144-
# uses: ilammy/[email protected]
145-
# if: runner.os == 'Windows'
146-
# - name: Run tests (dynamic link)
147-
# run: tox
148-
# env:
149-
# PYTHON_ISAL_LINK_DYNAMIC: True
123+
test-dynamic:
124+
runs-on: ${{ matrix.os }}
125+
defaults:
126+
run:
127+
# This is needed for miniconda, see:
128+
# https://github.com/marketplace/actions/setup-miniconda#important.
129+
shell: bash -l {0}
130+
strategy:
131+
matrix:
132+
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
133+
steps:
134+
- uses: actions/[email protected]
135+
with:
136+
submodules: recursive
137+
- name: Install miniconda.
138+
uses: conda-incubator/[email protected] # https://github.com/conda-incubator/setup-miniconda.
139+
with:
140+
channels: conda-forge,defaults
141+
- name: Install requirements (universal)
142+
run: conda install isa-l python tox
143+
- name: Set MSVC developer prompt
144+
uses: ilammy/[email protected]
145+
if: runner.os == 'Windows'
146+
- name: Run tests (dynamic link)
147+
run: tox
148+
env:
149+
PYTHON_ISAL_LINK_DYNAMIC: True
150150

151151
deploy:
152152
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

tests/test_compat.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import gzip
1313
import itertools
14+
import os
1415
import zlib
1516
from pathlib import Path
1617

@@ -34,6 +35,8 @@
3435
# Wbits for ZLIB compression, GZIP compression, and RAW compressed streams
3536
WBITS_RANGE = list(range(9, 16)) + list(range(25, 32)) + list(range(-15, -8))
3637

38+
DYNAMICALLY_LINKED = os.getenv("PYTHON_ISAL_LINK_DYNAMIC") is not None
39+
3740

3841
@pytest.mark.parametrize(["data_size", "value"],
3942
itertools.product(DATA_SIZES, SEEDS))
@@ -90,6 +93,8 @@ def test_decompress_isal_zlib(data_size, level):
9093
@pytest.mark.parametrize(["data_size", "level", "wbits", "memLevel"],
9194
itertools.product([128 * 1024], range(4),
9295
WBITS_RANGE, range(1, 10)))
96+
@pytest.mark.xfail(condition=DYNAMICALLY_LINKED,
97+
reason="Dynamically linked version may not have patch.")
9398
def test_compress_compressobj(data_size, level, wbits, memLevel):
9499
data = DATA[:data_size]
95100
compressobj = isal_zlib.compressobj(level=level,

0 commit comments

Comments
 (0)