sanitycheck: do not run if we do not have nsimdrv
Check if we have nSim simulator in path, if not, just test build without
attempting to run.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/scripts/sanitycheck b/scripts/sanitycheck
index 2c71402..be5851d 100755
--- a/scripts/sanitycheck
+++ b/scripts/sanitycheck
@@ -181,6 +181,8 @@
from collections import OrderedDict
from itertools import islice
from functools import cmp_to_key
+from pathlib import Path
+from distutils.spawn import find_executable
import logging
from sanity_chk import scl
@@ -1034,7 +1036,8 @@
elif ti.platform.type == "native" and do_run:
type = "native"
elif ti.platform.simulation == "nsim" and do_run:
- type = "nsim"
+ if find_executable("nsimdrv"):
+ type = "nsim"
elif options.device_testing and (not ti.build_only) and (not options.build_only):
type = "device"