TOPI tests failed on linux (NixOS)

Hi, I am writing a build expression for nnvm stack in Nix to make a package for NixOS. Everything seems to work for tvm and tvm-python, but TOPI tests have failed (log attached below). I think this is due to some package incompatibility, since the signature mismatch is reported (conv2d, probably a test, have some arguments missing). Could you please suggest what could go wrong?

I’ve tried both python 3.5 and 3.6, result is the same.

Regards,
Sergey

Below is the error trace:

  File "/nix/store/cwxxbpfz2i2j34f3sgmd6vdl6wv98c2s-python3-3.6.4/lib/python3.6/unittest/loader.py", line 475, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/nix/store/2bsghmis6hrkykcwpkarbk6g4vs7gfck-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/command/test.py", line 43, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/nix/store/cwxxbpfz2i2j34f3sgmd6vdl6wv98c2s-python3-3.6.4/lib/python3.6/unittest/loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/nix/store/2bsghmis6hrkykcwpkarbk6g4vs7gfck-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/command/test.py", line 43, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/nix/store/cwxxbpfz2i2j34f3sgmd6vdl6wv98c2s-python3-3.6.4/lib/python3.6/unittest/loader.py", line 204, in loadTestsFromName
    test = obj()
TypeError: conv2d() missing 4 required positional arguments: 'data', 'kernel', 'stride', and 'padding'
builder for ‘/nix/store/rldbc7cxk6fkg4sw2w9nqdycxvk3g1hr-python3.6-tvm-0.8.drv’ failed with exit code 1                                                                                        
error: build of ‘/nix/store/rldbc7cxk6fkg4sw2w9nqdycxvk3g1hr-python3.6-tvm-0.8.drv’ failed

is it possible to run the test code and see the exact test-case that went wrong? From the error message it is hard to tell what is going on

I’ve tried to explore the testing subsystem of topi. Looks like it doesn’t use standard unit tests of python, but provides separate modules under the ‘topi/tests/python’ instead.

Probably, the problem appeared because running python setup.py test from topi/python (which my package system tried by default) expects unittest format.

What is the correct way of running topi tests?
Would it be correct to write the testing procedure in a following way

cd topi/tests/python
for f in *py ; do echo $f; python $f || exit 1 ; done

?

Regards

see existing script running the tests in https://github.com/dmlc/tvm/blob/master/tests/scripts/task_python_topi.sh

Thanks! Now I understand how to use the test suit.