From a24fff2aed74830146987f552a92014d07984ad7 Mon Sep 17 00:00:00 2001 From: Chris Sidebottom Date: Fri, 25 Mar 2022 11:03:58 +0000 Subject: [PATCH] Check for toolchain when marking reference system tests This mimics the behaviour of aot_test_utils.py to ensure the tests don't start running when the toolchain isn't available. --- python/tvm/testing/utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/tvm/testing/utils.py b/python/tvm/testing/utils.py index 263d08f22094..a1001d107734 100644 --- a/python/tvm/testing/utils.py +++ b/python/tvm/testing/utils.py @@ -69,6 +69,7 @@ def test_something(): import logging import os import platform +import shutil import sys import time import pickle @@ -763,7 +764,12 @@ def requires_corstone300(*args): f : function Function to mark """ - _requires_corstone300 = [pytest.mark.corstone300] + _requires_corstone300 = [ + pytest.mark.corstone300, + pytest.mark.skipif( + shutil.which("arm-none-eabi-gcc") is None, reason="ARM embedded toolchain unavailable" + ), + ] return _compose(args, _requires_corstone300)