Skip to content

Commit

Permalink
[ci] Fix ti testing with no supported arch. (#3236)
Browse files Browse the repository at this point in the history
`ti test -vr2 -a vulkan` fails with `TypeError: 'NoneType' object is not
callable` and this PR fixes it.
  • Loading branch information
ailzhang authored Oct 21, 2021
1 parent 6538f34 commit fcd5a88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/taichi/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,14 @@ def test(arch=None, exclude=None, require=None, **options):
arch = supported_archs
else:
arch = list(filter(lambda x: x in supported_archs, arch))
if len(arch) == 0:
return lambda x: print('No supported arch found. Skipping')

def decorator(foo):
@functools.wraps(foo)
def wrapped(*args, **kwargs):
if len(arch) == 0:
print('No supported arch found. Skipping.')
return

arch_params_sets = [arch, *_test_features.values()]
arch_params_combinations = list(
itertools.product(*arch_params_sets))
Expand Down

0 comments on commit fcd5a88

Please sign in to comment.