Skip to content

Commit 790d64b

Browse files
densmirnshssf
andauthored
TESTS enable run of numpy tests in external CI (#438)
Co-authored-by: Sergey Shalnov <shssf@users.noreply.github.com>
1 parent 5bb87af commit 790d64b

6 files changed

Lines changed: 39 additions & 5 deletions

File tree

scripts/azure-pipelines.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,30 @@ jobs:
8686
echo ========================= run pytest ===============================
8787
pytest
8888
89+
- job: ubuntu2004_tests_external
90+
displayName: Ubuntu 20.04 External Tests
91+
pool:
92+
vmImage: 'ubuntu-20.04'
93+
strategy:
94+
matrix:
95+
Python37:
96+
python.version: '3.7'
97+
Python38:
98+
python.version: '3.8'
99+
Python39:
100+
python.version: '3.9'
101+
steps:
102+
- task: UsePythonVersion@0
103+
inputs:
104+
versionSpec: '$(python.version)'
105+
displayName: 'Use Python $(python.version)'
106+
- bash: |
107+
. ./scripts/set_ci_env.sh
108+
echo ========================= build DPNP ===============================
109+
./0.build.sh
110+
echo ========================= run tests ===============================
111+
python -m tests_external.numpy.runtests
112+
89113
# test python ./setup.py bdist_wheel command with
90114
# no oneapi python environment
91115
# no dpctl

scripts/install_python_deps.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ THEDIR=$(dirname $(readlink -e ${BASH_SOURCE[0]}))
44

55
echo +++++++++++++++++++++++++ Python prerequisites +++++++++++++++++++++++++++
66

7-
echo ========================= PIP3: install prerequisites ====================
8-
pip3 install numpy cython pytest pytest-valgrind
7+
echo ========================= PIP3: install prerequisites ===============================
8+
pip3 install numpy cython pytest pytest-valgrind hypothesis
99

10-
echo ========================= Conda: install prerequisites ===================
11-
conda install -y conda-build numpy cython pytest
10+
echo ========================= Conda: install prerequisites ===============================
11+
conda install -y conda-build numpy cython pytest hypothesis
1212

1313
echo ========================= SW versions ====================================
1414
conda list

tests_external/__init__.py

Whitespace-only changes.

tests_external/numpy/__init__.py

Whitespace-only changes.

tests_external/numpy/runtests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,16 @@ def run():
378378
print('Numpy not found in the environment.')
379379
return NUMPY_NOT_FOUND
380380

381-
FAILED_TESTS_FILE.unlink(missing_ok=True)
381+
if FAILED_TESTS_FILE.exists():
382+
FAILED_TESTS_FILE.unlink()
382383

383384
test_suites = [str(tests_path) for tests_path in get_tests(numpy_path)]
384385

385386
try:
386387
for test_suite in test_suites:
387388
code = pytest.main([test_suite])
389+
if code:
390+
break
388391
except SystemExit as exc:
389392
code = exc.code
390393

tests_external/skipped_tests_numpy.tbl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ tests/test_multiarray.py::TestFlags::test_writeable_from_buffer
772772
tests/test_multiarray.py::TestFlags::test_writeable_from_readonly
773773
tests/test_multiarray.py::TestFlags::test_writeable_pickle
774774
tests/test_multiarray.py::TestHash::test_int
775+
tests/test_multiarray.py::TestPickling::test_correct_protocol5_error_message
775776
tests/test_nditer.py::test_0d_iter
776777
tests/test_nditer.py::test_close_equivalent
777778
tests/test_nditer.py::test_close_raises
@@ -1544,6 +1545,8 @@ tests/test_ufunc.py::TestUfuncGenericLoops::test_unary_PyUFunc_O_O_method_full[a
15441545
tests/test_ufunc.py::TestUfuncGenericLoops::test_unary_PyUFunc_O_O_method_full[arctanh]
15451546
tests/test_ufunc.py::TestUfuncGenericLoops::test_unary_PyUFunc_O_O_method_full[cbrt]
15461547
tests/test_ufunc.py::TestUfuncGenericLoops::test_unary_PyUFunc_O_O_method_full[ceil]
1548+
tests/test_ufunc.py::TestUfuncGenericLoops::test_unary_PyUFunc_O_O_method_full[conjugate0]
1549+
tests/test_ufunc.py::TestUfuncGenericLoops::test_unary_PyUFunc_O_O_method_full[conjugate1]
15471550
tests/test_ufunc.py::TestUfuncGenericLoops::test_unary_PyUFunc_O_O_method_full[cos]
15481551
tests/test_ufunc.py::TestUfuncGenericLoops::test_unary_PyUFunc_O_O_method_full[cosh]
15491552
tests/test_ufunc.py::TestUfuncGenericLoops::test_unary_PyUFunc_O_O_method_full[deg2rad]
@@ -1582,6 +1585,8 @@ tests/test_ufunc.py::test_ufunc_noncontiguous[arctan]
15821585
tests/test_ufunc.py::test_ufunc_noncontiguous[arctanh]
15831586
tests/test_ufunc.py::test_ufunc_noncontiguous[cbrt]
15841587
tests/test_ufunc.py::test_ufunc_noncontiguous[ceil]
1588+
tests/test_ufunc.py::test_ufunc_noncontiguous[conjugate0]
1589+
tests/test_ufunc.py::test_ufunc_noncontiguous[conjugate1]
15851590
tests/test_ufunc.py::test_ufunc_noncontiguous[cos]
15861591
tests/test_ufunc.py::test_ufunc_noncontiguous[cosh]
15871592
tests/test_ufunc.py::test_ufunc_noncontiguous[deg2rad]
@@ -1610,6 +1615,8 @@ tests/test_ufunc.py::test_ufunc_noncontiguous[square]
16101615
tests/test_ufunc.py::test_ufunc_noncontiguous[tan]
16111616
tests/test_ufunc.py::test_ufunc_noncontiguous[tanh]
16121617
tests/test_ufunc.py::test_ufunc_noncontiguous[trunc]
1618+
tests/test_ufunc.py::test_ufunc_types[conjugate0]
1619+
tests/test_ufunc.py::test_ufunc_types[conjugate1]
16131620
tests/test_ufunc.py::TestUfunc::test_axes_argument
16141621
tests/test_ufunc.py::TestUfunc::test_axis_argument
16151622
tests/test_ufunc.py::TestUfunc::test_axis_out_of_bounds

0 commit comments

Comments
 (0)