From 3048253f1faa6589d8d1a72acde6b75952c9a705 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 15 Feb 2022 01:30:08 -0500 Subject: [PATCH] Make DACS script executable and add error if expected tool file not found (#15148) --- src/tools/chip-cert/dacs.py | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 src/tools/chip-cert/dacs.py diff --git a/src/tools/chip-cert/dacs.py b/src/tools/chip-cert/dacs.py old mode 100644 new mode 100755 index 47a898b723eafc..526e338b5131ec --- a/src/tools/chip-cert/dacs.py +++ b/src/tools/chip-cert/dacs.py @@ -1,4 +1,7 @@ +#!/usr/bin/env python + import argparse +import os import subprocess import sys import typing @@ -113,6 +116,9 @@ def __init__(self, cert_type: CertType, dev_dir: str, test_dir: str, chip_cert_d self.cert_type = cert_type self.chipcert = chip_cert_dir + 'chip-cert' + if not os.path.exists(self.chipcert): + raise Exception('Path not found: %s' % self.chipcert) + paa = Names(CertType.PAA, test_dir, dev_dir, pid) pai = Names(CertType.PAI, test_dir, dev_dir, pid) dac = Names(CertType.DAC, test_dir, dev_dir, pid)