-
Notifications
You must be signed in to change notification settings - Fork 27
Fix of custom GDAL error handler management by deregistrating it at exit (done in __init__()). Plus a few modifications on GDAL utilities' tests and
#245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
yeesian
merged 18 commits into
yeesian:master
from
mathieu17g:debug_CPLDestroyMutex_Error_with_Pkg_test
Oct 11, 2021
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
3e477cc
For GDAL utilities tests, separate error tests from normal tests
mathieu17g 969f8ba
Added GDAL import in test_images.jl
mathieu17g 3ff398e
Suppressed `@time` macro in test_ospy_examples.jl
mathieu17g e307362
Add `@test_logs` to two tests issuing a warning in test_rasterattrtab…
mathieu17g 8bef232
CPLDestroyMutex Error narrowed on one test in test_gdalutilities_erro…
mathieu17g a7e0780
`GDAL.gdalinfo` in a try...finally block
mathieu17g 9d4de2c
fixed a typo in file name in "GDAL error" testset
mathieu17g a94bcd0
changed `options` local variable name in `AG.gdalinfo` in case it may…
mathieu17g 1f96ef7
Tried to test errored `AG.galinfo` with `@test` instead of `@test_t…
mathieu17g dbd3df2
cleanup after (unsuccessful) investigation on "CPLDestroyMutex: Error…
mathieu17g efa08df
DriverManager modifications proposition
mathieu17g 82b4781
deregister gdaljl_errorhandler at exit
mathieu17g 5f10b6e
deregisterering gdaljl_errorhandler via an anonymous function to avoi…
mathieu17g 5e4598b
Cleanup keeping gdaljl_errorhandler deregistration at exit in __init()__
mathieu17g 6754ada
Suppressed `GDAL.cplseterrorhandler` (handled in GDAL.jl `__init__()`…
mathieu17g ae7d63f
Cleanup in `__init__()` with GDAL.jl PR #124 as prerequisite
mathieu17g a797de6
Suppressed comments in ArchGDAL.jl `__init__()` function
mathieu17g 8911c49
Dropped `gdalallregister()` in `__init__()` since it has been added t…
mathieu17g File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,61 @@ | ||
| import ArchGDAL, GDAL; | ||
| const AG = ArchGDAL | ||
| using Test | ||
|
|
||
| @testset "test_gdalutilities_errors.jl" begin | ||
| AG.read("data/utmsmall.tif") do ds_small | ||
| @testset "GDAL Error" begin | ||
| @test_throws GDAL.GDALError AG.gdalinfo( | ||
| ds_small, | ||
| ["-novalidoption"], | ||
| ) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdaltranslate( | ||
| ds_small, | ||
| ["-novalidoption"], | ||
| ) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdalbuildvrt( | ||
| [ds_small], | ||
| ["-novalidoption"], | ||
| ) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdaldem( | ||
| ds_small, | ||
| "hillshade", | ||
| ["-novalidoption"], | ||
| ) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdalnearblack( | ||
| ds_small, | ||
| ["-novalidoption"], | ||
| ) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdalwarp( | ||
| [ds_small], | ||
| ["-novalidoption"], | ||
| ) | ||
| end | ||
| end | ||
|
|
||
| @testset "Interactive data/utmsmall.tif" begin | ||
| ds_small = AG.read("data/utmsmall.tif") | ||
| @test_throws GDAL.GDALError AG.gdalinfo(ds_small, ["-novalidoption"]) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdaltranslate( | ||
| ds_small, | ||
| ["-novalidoption"], | ||
| ) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdalbuildvrt( | ||
| [ds_small], | ||
| ["-novalidoption"], | ||
| ) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdaldem( | ||
| ds_small, | ||
| "hillshade", | ||
| ["-novalidoption"], | ||
| ) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdalnearblack( | ||
| ds_small, | ||
| ["-novalidoption"], | ||
| ) | ||
| @test_throws GDAL.GDALError AG.unsafe_gdalwarp( | ||
| [ds_small], | ||
| ["-novalidoption"], | ||
| ) | ||
| end | ||
| end |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.