You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/09/07 20:28:24 UTC

[GitHub] [tvm] areusch commented on a change in pull request #8955: [Hexagon] Pytestify Hexagon unit test

areusch commented on a change in pull request #8955:
URL: https://github.com/apache/tvm/pull/8955#discussion_r703807718



##########
File path: tests/python/unittest/test_target_codegen_hexagon.py
##########
@@ -17,30 +17,21 @@
 
 import numpy as np
 import os
+import pytest
 import re
+import sys
 import tvm
 import tvm.relay
+import tvm.testing
 import tvm.contrib.hexagon as hexagon
 
 
-def check_prereq_and_setup():
-    if tvm.target.codegen.llvm_version_major() <= 7:
-        print("Skipping test: need LLVM 7 or later for codegen")
-        return False
-    if os.name != "posix":
-        print("Skipping test on non-POSIX platforms")
-        return False
-    if not tvm.runtime.enabled("hexagon"):
-        print("Hexagon runtime not enabled")
-        return False
-    # Register a phony linker, so that we can test codegen without a Hexagon toolchain.
-    hexagon.register_linker(lambda: "/bin/true")
-    return True
+# Register a phony linker, so that we can test codegen without a Hexagon toolchain.
+hexagon.register_linker(lambda: "/bin/true")

Review comment:
       should this become a fixture and unregister on test exit?




-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org