driazati commented on code in PR #11393:
URL: https://github.com/apache/tvm/pull/11393#discussion_r879699482
##########
python/tvm/testing/utils.py:
##########
@@ -1513,3 +1514,8 @@ def identity_after(x, sleep):
def terminate_self():
"""Testing function to terminate the process."""
sys.exit(-1)
+
+
+def main():
+ test_file = inspect.getsourcefile(sys._getframe(1))
+ sys.exit(pytest.main([test_file] + sys.argv[1:]))
Review Comment:
just a nit but do we actually need to determine and pass in the test file
name? [the
examples](https://docs.pytest.org/en/7.1.x/how-to/usage.html#calling-pytest-from-python-code)
don't seem to need it
```suggestion
sys.exit(pytest.main(sys.argv[1:]))
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]