Skip to content

Commit 46f2bcc

Browse files
authored
Merge pull request #247 from mulimoen/feature/f16
Only run test_issue_223 when deflate filter is avail
2 parents 15334f7 + a160a4f commit 46f2bcc

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ jobs:
276276
with: {toolchain: 1.64}
277277
- name: Build and test all crates
278278
run:
279-
cargo test --workspace -vv --features=hdf5-sys/static --exclude=hdf5-derive
279+
cargo test --workspace -vv --features=hdf5-sys/static,hdf5-sys/zlib --exclude=hdf5-derive
280280

281281
wine:
282282
name: wine

hdf5-sys/build.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ pub struct Header {
175175
pub have_direct: bool,
176176
pub have_parallel: bool,
177177
pub have_threadsafe: bool,
178-
pub have_zlib: bool,
179178
pub have_no_deprecated: bool,
179+
pub have_filter_deflate: bool,
180180
pub version: Version,
181181
}
182182

@@ -203,7 +203,7 @@ impl Header {
203203
} else if name == "H5_HAVE_THREADSAFE" {
204204
hdr.have_threadsafe = value > 0;
205205
} else if name == "H5_HAVE_FILTER_DEFLATE" {
206-
hdr.have_zlib = value > 0;
206+
hdr.have_filter_deflate = value > 0;
207207
} else if name == "H5_NO_DEPRECATED_SYMBOLS" {
208208
hdr.have_no_deprecated = value > 0;
209209
}
@@ -680,14 +680,18 @@ impl Config {
680680
println!("cargo:rustc-cfg=feature=\"have-threadsafe\"");
681681
println!("cargo:have_threadsafe=1");
682682
}
683+
if self.header.have_filter_deflate {
684+
println!("cargo:rustc-cfg=feature=\"have-filter-deflate\"");
685+
println!("cargo:have_filter_deflate=1");
686+
}
683687
}
684688

685689
fn check_against_features_required(&self) {
686690
let h = &self.header;
687691
for (flag, feature, native) in [
688692
(!h.have_no_deprecated, "deprecated", "HDF5_ENABLE_DEPRECATED_SYMBOLS"),
689693
(h.have_threadsafe, "threadsafe", "HDF5_ENABLE_THREADSAFE"),
690-
(h.have_zlib, "zlib", "HDF5_ENABLE_Z_LIB_SUPPORT"),
694+
(h.have_filter_deflate, "zlib", "HDF5_ENABLE_Z_LIB_SUPPORT"),
691695
] {
692696
if feature_enabled(&feature.to_ascii_uppercase()) {
693697
assert!(

hdf5/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ fn main() {
99
"DEP_HDF5_HAVE_DIRECT" => print_feature("have-direct"),
1010
"DEP_HDF5_HAVE_PARALLEL" => print_feature("have-parallel"),
1111
"DEP_HDF5_HAVE_THREADSAFE" => print_feature("have-threadsafe"),
12+
"DEP_HDF5_HAVE_FILTER_DEFLATE" => print_feature("have-filter-deflate"),
1213
// internal config flags
1314
"DEP_HDF5_MSVC_DLL_INDIRECTION" => print_cfg("msvc_dll_indirection"),
1415
// public version features

hdf5/tests/test_dataset.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ fn test_create_on_databuilder() {
367367
}
368368

369369
#[test]
370+
#[cfg(feature = "have-filter-deflate")]
370371
fn test_issue_223() {
371372
let file = new_in_memory_file().unwrap();
372373

0 commit comments

Comments
 (0)