Browse Source

sanity-external-toolchain.bbclass: handle FileNotFoundError

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Christopher Larson 3 years ago
parent
commit
c5630c2341
1 changed files with 2 additions and 0 deletions
  1. 2 0
      classes/sanity-external-toolchain.bbclass

+ 2 - 0
classes/sanity-external-toolchain.bbclass

@@ -81,6 +81,8 @@ def exttc_sanity_run(cmd, d, generate_events, cwd='/'):
     import subprocess
     try:
         return subprocess.check_output(cmd, stderr=subprocess.STDOUT, cwd=cwd)
+    except FileNotFoundError:
+        raise_exttc_sanity_error('\n  Command: %s\n  Exit Code: 127\n  Output: no such file or directory' % cmd, d, generate_events)
     except subprocess.CalledProcessError as exc:
         if not isinstance(cmd, str):
             cmd = subprocess.list2cmdline(cmd)