Skip to content

Commit dd412f2

Browse files
authored
Run python tests from build folder to fix test search (#94)
Run python tests from build folder to use opencv_python_tests.cfg generated by build.
1 parent ce7e180 commit dd412f2

35 files changed

+71
-83
lines changed

.github/workflows/OCV-Contrib-PR-3.4-ARM64.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ jobs:
367367
timeout-minutes: 60
368368
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
369369
run: |
370-
cd $HOME/opencv/modules/python/test
371-
python3 ./test.py --repo $HOME/opencv -v
370+
cd $HOME/build
371+
python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v
372372
- name: Java
373373
timeout-minutes: 60
374374
id: java-test

.github/workflows/OCV-Contrib-PR-3.4-U14.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ jobs:
368368
timeout-minutes: 60
369369
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
370370
run: |
371-
cd $HOME/opencv/modules/python/test
372-
python3 ./test.py --repo $HOME/opencv -v
371+
cd $HOME/build
372+
python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v
373373
- name: Java
374374
timeout-minutes: 60
375375
id: java-test

.github/workflows/OCV-Contrib-PR-3.4-U20.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ jobs:
367367
timeout-minutes: 60
368368
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
369369
run: |
370-
cd $HOME/opencv/modules/python/test
371-
python3 ./test.py --repo $HOME/opencv -v
370+
cd $HOME/build
371+
python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v
372372
- name: Java
373373
timeout-minutes: 60
374374
id: java-test

.github/workflows/OCV-Contrib-PR-3.4-W10.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,10 @@ jobs:
357357
timeout-minutes: 60
358358
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
359359
run: |
360-
cd ${{ github.workspace }}\opencv\modules\python\test
360+
cd ${{ github.workspace }}\build
361361
set PYTHONPATH=%PYTHONPATH%;${{ github.workspace }}\build\python_loader;${{ github.workspace }}\build\lib\python3
362362
set PATH=%PATH%;${{ github.workspace }}\build\bin;${{ github.workspace }}\build\lib\python3
363-
python test.py --repo ${{ github.workspace }}\opencv -v
363+
python ${{ github.workspace }}\opencv\modules\python\test\test.py --repo ${{ github.workspace }}\opencv -v
364364
- name: Java
365365
timeout-minutes: 60
366366
id: java-test

.github/workflows/OCV-Contrib-PR-3.4-macOS-ARM64.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,8 @@ jobs:
417417
- name: Python3
418418
timeout-minutes: 60
419419
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
420-
run: |
421-
python3 ./test.py --repo ${{ github.workspace }}/opencv -v
422-
working-directory: ${{ github.workspace }}/opencv/modules/python/test
420+
run: python3 ../opencv/modules/python/test/test.py --repo ../opencv -v
421+
working-directory: ${{ github.workspace }}/build
423422
- name: Java
424423
timeout-minutes: 60
425424
id: java-test

.github/workflows/OCV-Contrib-PR-3.4-macOS-x86_64.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,8 @@ jobs:
417417
- name: Python3
418418
timeout-minutes: 60
419419
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
420-
run: |
421-
python3 ./test.py --repo ${{ github.workspace }}/opencv -v
422-
working-directory: ${{ github.workspace }}/opencv/modules/python/test
420+
run: python3 ../opencv/modules/python/test/test.py --repo ../opencv -v
421+
working-directory: ${{ github.workspace }}/build
423422
- name: Java
424423
timeout-minutes: 60
425424
id: java-test

.github/workflows/OCV-Contrib-PR-4.x-ARM64.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,8 @@ jobs:
421421
timeout-minutes: 60
422422
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
423423
run: |
424-
cd $HOME/opencv/modules/python/test
425-
python3 ./test.py --repo $HOME/opencv -v
424+
cd $HOME/build
425+
python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v
426426
- name: Java
427427
timeout-minutes: 60
428428
id: java-test

.github/workflows/OCV-Contrib-PR-4.x-U20.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ jobs:
429429
timeout-minutes: 60
430430
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
431431
run: |
432-
cd $HOME/opencv/modules/python/test
433-
python3 ./test.py --repo $HOME/opencv -v
432+
cd $HOME/build
433+
python3 $HOME/opencv/modules/python/test/test.py --repo $HOME/opencv -v
434434
- name: Java
435435
timeout-minutes: 60
436436
id: java-test

.github/workflows/OCV-Contrib-PR-4.x-W10.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,10 @@ jobs:
415415
timeout-minutes: 60
416416
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
417417
run: |
418-
cd ${{ github.workspace }}\opencv\modules\python\test
418+
cd ${{ github.workspace }}\build
419419
set PYTHONPATH=%PYTHONPATH%;${{ github.workspace }}\build\python_loader;${{ github.workspace }}\build\lib\python3
420420
set PATH=%PATH%;${{ github.workspace }}\build\bin;${{ github.workspace }}\build\lib\python3
421-
python test.py --repo ${{ github.workspace }}\opencv -v
421+
python ${{ github.workspace }}\opencv\modules\python\test\test.py --repo ${{ github.workspace }}\opencv -v
422422
- name: Java
423423
timeout-minutes: 60
424424
id: java-test

.github/workflows/OCV-Contrib-PR-4.x-macOS-ARM64.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,8 @@ jobs:
491491
- name: Python3
492492
timeout-minutes: 60
493493
if: ${{ always() && steps.build-opencv-contrib.outcome == 'success' }}
494-
run: |
495-
python3 ./test.py --repo ${{ github.workspace }}/opencv -v
496-
working-directory: ${{ github.workspace }}/opencv/modules/python/test
494+
run: python3 ../opencv/modules/python/test/test.py --repo ../opencv -v
495+
working-directory: ${{ github.workspace }}/build
497496
- name: Java
498497
timeout-minutes: 60
499498
id: java-test

0 commit comments

Comments
 (0)