From: Zhi <5145158+zhiics@users.noreply.github.com> Date: Fri, 3 Jan 2020 20:29:05 +0000 (-0800) Subject: skip example json runtime test when config is not set (#4614) X-Git-Tag: upstream/0.7.0~1449 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2b91697551ce0cd6eb51b9da2e733b683d483766;p=platform%2Fupstream%2Ftvm.git skip example json runtime test when config is not set (#4614) --- diff --git a/tests/python/relay/test_external_runtime.py b/tests/python/relay/test_external_runtime.py index 887d9dc..802ee6c 100644 --- a/tests/python/relay/test_external_runtime.py +++ b/tests/python/relay/test_external_runtime.py @@ -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) @@ -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" +