-
-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A recent bugfix to the library changed the return value of an API call and a Julia CI action expects the incorrect result. This patch papers over this until the upstream Julia wrapper CI can be fixed.
- Loading branch information
Showing
3 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,17 @@ jobs: | |
name: "julia ${{ inputs.build_mode }}" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get Sources | ||
- name: Get HDF5 source | ||
uses: actions/[email protected] | ||
|
||
# Checking out the Julia HDF5 wrappers will clobber the HDF5 checkout | ||
# NOTE: Remove this when the Julia wrappers have been patched | ||
- name: Save the Julia patch file | ||
shell: bash | ||
run: | | ||
mkdir "${{ runner.workspace }}/julia_patch" | ||
cp .github/workflows/julia_ci.patch "${{ runner.workspace }}/julia_patch" | ||
- name: Install Dependencies | ||
shell: bash | ||
run: | | ||
|
@@ -65,6 +73,11 @@ jobs: | |
repository: JuliaIO/HDF5.jl | ||
path: . | ||
|
||
# NOTE: Remove this when the Julia wrappers have been patched | ||
- name: Patch Julia CI | ||
run: | | ||
git apply "${{ runner.workspace }}/julia_patch/julia_ci.patch" -v | ||
- name: Generate LocalPreferences | ||
run: | | ||
echo '[HDF5]' >> LocalPreferences.toml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,17 @@ jobs: | |
name: "julia ${{ inputs.build_mode }}" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get Sources | ||
- name: Get HDF5 source | ||
uses: actions/[email protected] | ||
|
||
# Checking out the Julia HDF5 wrappers will clobber the HDF5 checkout | ||
# NOTE: Remove this when the Julia wrappers have been patched | ||
- name: Save the Julia patch file | ||
shell: bash | ||
run: | | ||
mkdir "${{ runner.workspace }}/julia_patch" | ||
cp .github/workflows/julia_ci.patch "${{ runner.workspace }}/julia_patch" | ||
- name: Install Dependencies | ||
shell: bash | ||
run: | | ||
|
@@ -68,6 +76,11 @@ jobs: | |
repository: JuliaIO/HDF5.jl | ||
path: . | ||
|
||
# NOTE: Remove this when the Julia wrappers have been patched | ||
- name: Patch Julia CI | ||
run: | | ||
git apply "${{ runner.workspace }}/julia_patch/julia_ci.patch" -v | ||
- name: Generate LocalPreferences | ||
run: | | ||
echo '[HDF5]' >> LocalPreferences.toml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/test/objects.jl b/test/objects.jl | ||
index d68dd749..0541e91a 100644 | ||
--- a/test/objects.jl | ||
+++ b/test/objects.jl | ||
@@ -16,7 +16,13 @@ using HDF5.API | ||
h5open(fn, "r") do h5f | ||
@test API.h5o_exists_by_name(h5f, "data") | ||
@test API.h5o_exists_by_name(h5f, "lore") | ||
- @test_throws API.H5Error API.h5o_exists_by_name(h5f, "noonian") | ||
+ @static if HDF5.API.h5_get_libversion() <= v"1.14.5" | ||
+ # Buggy behavior in earlier versions of HDF5 returns FAIL (-1) | ||
+ @test_throws API.H5Error API.h5o_exists_by_name(h5f, "noonian") | ||
+ else | ||
+ # The correct behavior is to return false (0) | ||
+ @test API.h5o_exists_by_name(h5f, "noonian") == 0 | ||
+ end | ||
|
||
loc_id = API.h5o_open(h5f, "data", API.H5P_DEFAULT) | ||
try |