@@ -130,8 +130,43 @@ coverage.cmd = [
130
130
coverage.depends-on = [" tests-ci" ]
131
131
coverage.cwd = " ."
132
132
133
+ # CuPy tests
134
+ [feature .cupy-tests ]
135
+ platforms = [" linux-64" ]
136
+
137
+ [feature .cupy-tests .dependencies ]
138
+ python = " >=3.12.0,<3.13"
139
+ pip = " *"
140
+ setuptools = " *"
141
+ cupy = " *"
142
+ pytest = " *"
143
+ pytest-forked = " *"
144
+
145
+ [feature .cupy-tests .tasks ]
146
+ # Since CuPy tests are only available on Linux, we can use bash like
147
+ # this to only clone xsref if it isn't already there and checked out
148
+ # at the proper tag.
149
+ clone-xsref-test-cupy.cmd = """
150
+ bash -c '
151
+ if [ -d xsref ]; then
152
+ tag=$(git -C xsref describe --tags --exact-match 2>/dev/null || true)
153
+ fi
154
+ if [ \" $tag\" != v0.0.0 ]; then
155
+ rm -rf xsref
156
+ git clone --branch v0.0.0 --depth 1 https://github.com/scipy/xsref.git
157
+ fi
158
+ '
159
+ """
160
+ clone-xsref-test-cupy.cwd = " ."
161
+ install-xsref-test-cupy.cmd = " pip install ."
162
+ install-xsref-test-cupy.cwd = " xsref"
163
+ install-xsref-test-cupy.depends-on = [" clone-xsref-test-cupy" ]
164
+ test-cupy.cmd = " pytest --forked python_tests/test_cupy.py"
165
+ test-cupy.cwd = " ."
166
+ test-cupy.depends-on = [" install-xsref-test-cupy" ]
133
167
134
168
[environments ]
135
169
default = { features = [" build" , " tests" ], solve-group = " default" }
136
170
tests-ci = { features = [" build" , " tests" , " tests-ci" , " coverage" ], solve-group = " default" }
137
171
lint = { features = [" clang-format" ], solve-group = " default" }
172
+ cupy-tests = { features = [" cupy-tests" ], solve-group = " default" }
0 commit comments