Skip to content

Commit 8474b40

Browse files
committed
debug tests under gdb
1 parent 89a3354 commit 8474b40

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

.github/workflows/build-with-clang.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
sudo apt-get install intel-oneapi-tbb
4444
sudo apt-get install intel-oneapi-mkl-devel
4545
46+
- name: Install gdb (DEBUG)
47+
run: |
48+
sudo apt-get install gdb
49+
4650
- name: Setup Python
4751
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
4852
with:
@@ -69,11 +73,19 @@ jobs:
6973
export CC="$CMPLR_ROOT/bin/icx"
7074
pip install . --no-build-isolation --no-deps --verbose
7175
72-
- name: Run mkl_umath tests
76+
- name: Run mkl_umath tests under gdb (DEBUG)
7377
run: |
7478
source ${{ env.ONEAPI_ROOT }}/setvars.sh
7579
pip install pytest
7680
# mkl_umath cannot be installed in editable mode, we need
7781
# to change directory before importing it and running tests
7882
cd ..
83+
gdb --batch -ex r -ex 'info sharedlibrary' -ex 'set print elements 1000' -ex bt --args python -m pytest -sv --pyargs mkl_umath || true
84+
85+
- name: Run mkl_umath tests
86+
run: |
87+
source ${{ env.ONEAPI_ROOT }}/setvars.sh
88+
# mkl_umath cannot be installed in editable mode, we need
89+
# to change directory before importing it and running tests
90+
cd ..
7991
python -m pytest -sv --pyargs mkl_umath

.github/workflows/build-with-standard-clang.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
run: |
3434
sudo apt-get update && sudo apt-get install -y clang
3535
36+
- name: Install gdb (DEBUG)
37+
run: |
38+
sudo apt-get install gdb
39+
3640
- name: Setup Python
3741
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3842
with:
@@ -55,9 +59,16 @@ jobs:
5559
export CC=${{ env.COMPILER_ROOT }}/clang
5660
pip install . --no-build-isolation --no-deps --verbose
5761
58-
- name: Run mkl_umath tests
62+
- name: Run mkl_umath tests under gdb (DEBUG)
5963
run: |
6064
pip install pytest
65+
# mkl_umath cannot be installed in editable mode, we need
66+
# to change directory before importing it and running tests
67+
cd ..
68+
gdb --batch -ex r -ex 'info sharedlibrary' -ex 'set print elements 1000' -ex bt --args python -m pytest -sv --pyargs mkl_umath || true
69+
70+
- name: Run mkl_umath tests
71+
run: |
6172
# mkl_umath cannot be installed in editable mode, we need
6273
# to change directory before importing it and running tests
6374
cd ..

0 commit comments

Comments
 (0)