From b6956d21652cd14a31ddf3c44da984004cc1297a Mon Sep 17 00:00:00 2001 From: Logan Weber Date: Tue, 4 Aug 2020 15:20:34 -0700 Subject: [PATCH] address comments --- tests/micro/test_mbed.py | 15 +++++---------- tests/python/unittest/test_crt.py | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/micro/test_mbed.py b/tests/micro/test_mbed.py index 538ec8a073ad..ca86f635f594 100644 --- a/tests/micro/test_mbed.py +++ b/tests/micro/test_mbed.py @@ -40,18 +40,13 @@ def test_compile_runtime(): ) root_dir = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..')) - bin_opts = tvm.micro.DefaultOptions() - bin_opts.setdefault('profile', {})['common'] = ['-Wno-unused-variable'] - bin_opts.setdefault('ccflags', []).append('-std=gnu++14') - bin_opts.setdefault('ldflags', []).append('-std=gnu++14') - bin_opts.setdefault('include_dirs', []).append(f'{project_dir}/crt') - - lib_opts = copy.deepcopy(bin_opts) - lib_opts['profile']['common'].append('-Werror') - lib_opts['cflags'] = ['-Wno-error=incompatible-pointer-types'] + opts = tvm.micro.DefaultOptions(f'{project_dir}/crt') + # TODO(weberlo) verify this is necessary + opts['bin_opts']['ccflags'] = ['-std=gnu++14'] + opts['lib_opts']['ccflags'] = ['-std=gnu++14'] if BUILD: - micro_binary = tvm.micro.build_static_runtime(workspace, compiler, mod, lib_opts, bin_opts) + micro_binary = tvm.micro.build_static_runtime(workspace, compiler, mod, **opts) lib_opts['cflags'].pop() device_transport = device_util.DeviceTransportLauncher({ diff --git a/tests/python/unittest/test_crt.py b/tests/python/unittest/test_crt.py index 4f603dc4849e..8c10a1f848ae 100644 --- a/tests/python/unittest/test_crt.py +++ b/tests/python/unittest/test_crt.py @@ -74,7 +74,7 @@ def _make_cortex_m33_sess(mod): if BUILD: micro_binary = tvm.micro.build_static_runtime( - workspace, compiler, mod, lib_opts=opts['lib_opts'], bin_opts=opts['bin_opts']) + workspace, compiler, mod, **opts) # debug_rpc_session = tvm.rpc.connect('127.0.0.1', 9090) debug_rpc_session = None