From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B84A48E9A for ; Tue, 15 Sep 2015 07:29:09 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 14 Sep 2015 22:29:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,533,1437462000"; d="scan'208";a="769177872" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 14 Sep 2015 22:29:08 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t8F5T5nD024344; Tue, 15 Sep 2015 13:29:05 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t8F5T3pZ022909; Tue, 15 Sep 2015 13:29:05 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t8F5T3PA022905; Tue, 15 Sep 2015 13:29:03 +0800 From: Yong Liu To: dts@dpdk.org Date: Tue, 15 Sep 2015 13:29:01 +0800 Message-Id: <1442294941-22873-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] raise exception when load execution file failed X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2015 05:29:10 -0000 From: Marvin Liu Signed-off-by: Marvin Liu diff --git a/framework/dts.py b/framework/dts.py index 33ac542..d2ee015 100644 --- a/framework/dts.py +++ b/framework/dts.py @@ -51,7 +51,7 @@ from test_result import Result from stats_reporter import StatsReporter from excel_reporter import ExcelReporter from utils import * -from exception import TimeoutException +from exception import TimeoutException, ConfigParseException from logger import getLogger import logger import debugger @@ -441,7 +441,9 @@ def run_all(config_file, pkgName, git, patch, skip_setup, # Read config file config = ConfigParser.SafeConfigParser() - config.read(config_file) + load_cfg = config.read(config_file) + if len(load_cfg) == 0: + raise ConfigParseException(config_file) # register exit action atexit.register(close_crb_sessions) -- 1.9.3