Skip to content

Commit

Permalink
Merge pull request OSGeo#9454 from rouault/ci_asan
Browse files Browse the repository at this point in the history
CI: re-enable ASAN
  • Loading branch information
rouault authored Mar 14, 2024
2 parents 709169d + fa63fc0 commit 543cd3f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/asan/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ find -L \
! -name "__init__.py" \
! -path 'ogr/data/*' \
! -name test_gdal_merge.py \
! -name test_gdal_retile.py \
-print \
-exec ./pytest_wrapper.sh {} \; \
| tee ./test-output.txt
Expand Down
29 changes: 17 additions & 12 deletions .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,22 @@ jobs:
id: alpine
container: alpine
build_script: build.sh
os: ubuntu-22.04

- name: Alpine, gcc 32-bit
id: alpine_32bit
container: alpine_32bit
build_script: build.sh
test_script: test.sh
travis_branch: alpine_32bit
os: ubuntu-22.04

- name: Fedora Rawhide, clang++
id: fedora_rawhide
travis_branch: sanitize
container: fedora_rawhide
build_script: build.sh
os: ubuntu-22.04

- name: Ubuntu 22.04, gcc
id: ubuntu_22.04
Expand All @@ -84,18 +87,16 @@ jobs:
before_test_script: services.sh
build_script: build.sh
test_script: test.sh
os: ubuntu-22.04

# Disabled because too many occurences of "AddressSanitizer:DEADLYSIGNAL" on CI
# whereas it works locally. Issue seems to have appears on March 13th or 14th
# Initially was on 20.04, but the upgrade to 22.04 does not improve
# OK build: https://github.com/OSGeo/gdal/actions/runs/8254308146/job/22578169924
# KO build: https://github.com/OSGeo/gdal/actions/runs/8264809407/job/22609174350
#- name: Ubuntu 22.04, clang ASAN
# id: asan
# travis_branch: sanitize
# container: ubuntu_22.04
# build_script: build.sh
# test_script: test.sh
- name: Ubuntu 22.04, clang ASAN
id: asan
travis_branch: sanitize
container: ubuntu_22.04
build_script: build.sh
test_script: test.sh
# We force the host OS to be 20.04 to avoid "AddressSanitizer:DEADLYSIGNAL"
os: ubuntu-20.04

- name: Ubuntu 20.04, gcc
id: ubuntu_20.04
Expand All @@ -104,6 +105,7 @@ jobs:
use_avx2: true
build_script: build.sh
test_script: test.sh
os: ubuntu-22.04

- name: Ubuntu 20.04, coverage
id: coverage
Expand All @@ -112,22 +114,25 @@ jobs:
before_test_script: services.sh
build_script: build.sh
test_script: test.sh
os: ubuntu-22.04

- name: Ubuntu 20.04, benchmarks
id: benchmarks
travis_branch: ubuntu_2004
container: ubuntu_20.04
build_script: build.sh
test_script: test.sh
os: ubuntu-22.04

- name: Ubuntu 20.04, Intel compiler
id: icc
container: icc
build_script: build.sh
os: ubuntu-22.04

name: ${{ matrix.name }}

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

defaults:
run:
Expand Down
6 changes: 6 additions & 0 deletions autotest/osr/osr_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1840,6 +1840,9 @@ def threaded_function(arg):

def test_Set_PROJ_DATA_config_option_sub_proccess_config_option_ok():

if gdaltest.is_travis_branch("sanitize"):
pytest.skip("fails on sanitize for unknown reason")

backup_search_paths = osr.GetPROJSearchPaths()
# conftest.py set 2 paths: autotest/gcore/tmp/proj_db_tmpdir and autotest/proj_grids
assert len(backup_search_paths) == 2
Expand All @@ -1858,6 +1861,9 @@ def test_Set_PROJ_DATA_config_option_sub_proccess_config_option_ok():

def test_Set_PROJ_DATA_config_option_sub_proccess_config_option_ko():

if gdaltest.is_travis_branch("sanitize"):
pytest.skip("fails on sanitize for unknown reason")

backup_search_paths = osr.GetPROJSearchPaths()
# conftest.py set 2 paths: autotest/gcore/tmp/proj_db_tmpdir and autotest/proj_grids
assert len(backup_search_paths) == 2
Expand Down
4 changes: 4 additions & 0 deletions autotest/pyscripts/test_gdal_pansharpen.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
###############################################################################


import gdaltest
import pytest
import test_py_scripts

Expand Down Expand Up @@ -75,6 +76,9 @@ def small_world_pan_tif(tmp_path_factory):

def test_gdal_pansharpen_help(script_path):

if gdaltest.is_travis_branch("sanitize"):
pytest.skip("fails on sanitize for unknown reason")

assert "ERROR" not in test_py_scripts.run_py_script(
script_path, "gdal_pansharpen", "--help"
)
Expand Down

0 comments on commit 543cd3f

Please sign in to comment.