Skip to content

Commit

Permalink
skip example json runtime test when config is not set (apache#4614)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiics authored and alexwong committed Feb 26, 2020
1 parent c80c135 commit a188d77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/python/relay/test_external_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ def get_whole_graph_json():
def run_extern(label, get_extern_src, **kwargs):
if which("gcc") is None:
print("Skip test because gcc is not available.")
return

obj_name = "{}.o".format(label)
lib_name = "external_{}.so".format(label)
Expand Down Expand Up @@ -492,8 +493,9 @@ def test_engine_extern():
options=["-O2", "-std=c++11", "-I" + tmp_path.relpath("")])

def test_json_extern():
if which("gcc") is None:
print("Skip test because gcc is not available.")
if not tvm.get_global_func("module.loadfile_examplejson", True):
print("Skip because JSON example runtime is not enabled.")
return

# Get subgraph Json.
subgraph_json = ("json_rt_0\n" +
Expand Down

0 comments on commit a188d77

Please sign in to comment.