From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0083.outbound.protection.outlook.com [104.47.1.83]) by dpdk.org (Postfix) with ESMTP id C852A2C8 for ; Wed, 28 Mar 2018 18:19:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0XkrgKzo/oj5Crv07qj6FUTr2b6ka2WteCW/O1X4+HU=; b=SCBpjPWXoG7Dg20qVGZQ8Eh3vz2r/zQx5+fPaQIOMYbXjfkAd6o8mB6l3vUJo1qeargMcEGAsTrIIFTQBNfrlE0hH477XJYZhCWKwf2WuOWqwYqJw4IcGa9PfN9///iVcTtFnTs1GMLrbVSEH270z3cK+5lU2KG6eqUKrNXF1y8= Received: from DB6PR0501MB2630.eurprd05.prod.outlook.com (10.172.225.12) by DB6PR0501MB2805.eurprd05.prod.outlook.com (10.172.226.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Wed, 28 Mar 2018 16:19:08 +0000 Received: from DB6PR0501MB2630.eurprd05.prod.outlook.com ([fe80::6ced:f91b:4e53:b7c]) by DB6PR0501MB2630.eurprd05.prod.outlook.com ([fe80::6ced:f91b:4e53:b7c%17]) with mapi id 15.20.0609.012; Wed, 28 Mar 2018 16:19:07 +0000 From: Ali Alnubani To: 'Patrick MacArthur' , "'dts@dpdk.org'" CC: "'dpdklab@iol.unh.edu'" Thread-Topic: [dts] [PATCH for-next v2 4/5] tests/TestSuite_nic_single_core_perf: Use user-specified output dir Thread-Index: AQHTwJnNCcmMQNc0o0Gyj00PCRj0baPl3Uqw Date: Wed, 28 Mar 2018 16:19:07 +0000 Message-ID: References: <20180320222041.17303-1-pmacarth@iol.unh.edu> <20180320222041.17303-5-pmacarth@iol.unh.edu> In-Reply-To: <20180320222041.17303-5-pmacarth@iol.unh.edu> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=alialnu@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR0501MB2805; 7:KblJAi/3PU+szrPvDROD7pXAcd90kmAfNIHJq463d3L+UizbaPlHd+CcyG+NvGBzkuaVJBJTLoU2A2LnJiKqm2JWjpknuIDR9nG1RmyPTHrrhKjU1J5w8qQ5QkDqK8fIhnTu3hXzAF7XgvrGHwePV2dEU6LziuGOit8Z+CfbReIOWZkcB+k8wNqKDykjrYCVzugxdNW51u1mJtibWPWoU5hz+o8NzZwl7d3Y2F3r18AfRn5jXjlTZxci/WCtJyFt x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 25c10405-0221-4703-aa10-08d594c7a1f7 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB6PR0501MB2805; x-ms-traffictypediagnostic: DB6PR0501MB2805: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:DB6PR0501MB2805; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2805; x-forefront-prvs: 06259BA5A2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(366004)(39860400002)(396003)(39380400002)(13464003)(199004)(189003)(59450400001)(81156014)(7696005)(110136005)(53546011)(26005)(68736007)(66066001)(316002)(99286004)(105586002)(6506007)(76176011)(5250100002)(33656002)(186003)(478600001)(11346002)(476003)(229853002)(102836004)(446003)(4326008)(14454004)(55016002)(86362001)(106356001)(3846002)(3280700002)(6116002)(53936002)(7736002)(305945005)(81166006)(2906002)(9686003)(2900100001)(97736004)(5660300001)(3660700001)(486005)(2171002)(8936002)(25786009)(74316002)(486005)(6246003)(6436002)(491001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2805; H:DB6PR0501MB2630.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: joJDnc7aju2DimDyzEkAgilipqAzo0YmvdS+BBToEfgzV7qC5KcGWMq4FWr3WBzuIiJxFkKUh8q+hf2NMVMHOvAoB8NwurEtfRLwpwd6HaUWEqF1wWHPNzV07Cpop6A478wR4LdfRFRpqf4d7yvYiizjr5Y3Yt9hK1rk2l5oHQ4dWy43gYeblqxItUTsp3ftTrxPiIDrOffig65glO2Zqcv4rvaHQVMxUxT0bESJJ74XvDRQDHTXYshlHrk1RTUmdnVgrC+ZNRa9KnQ4vACG48/W5Ag1hsoawSwKxp6Mx+j5Bk1/Z2N9wZHvXJ5KlZ4IDbMXHDH9wlAF9FNfDfyQww== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25c10405-0221-4703-aa10-08d594c7a1f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2018 16:19:07.8777 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2805 Subject: Re: [dts] [PATCH for-next v2 4/5] tests/TestSuite_nic_single_core_perf: Use user-specified output dir 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: Wed, 28 Mar 2018 16:19:10 -0000 Hi Patrick, You are using os module w/o it being imported in this patch. Thanks, Ali > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Patrick MacArthur > Sent: Wednesday, March 21, 2018 12:21 AM > To: dts@dpdk.org > Cc: dpdklab@iol.unh.edu > Subject: [dts] [PATCH for-next v2 4/5] tests/TestSuite_nic_single_core_pe= rf: > Use user-specified output dir >=20 > The user can override the default output directory via a command line > argument, but this script does not account for that. Fix the script to lo= ok up > the output directory that the user requested and place the custom output > file in that directory. >=20 > Tested-by: Ali Alnubani > Signed-off-by: Patrick MacArthur > --- > tests/TestSuite_nic_single_core_perf.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/tests/TestSuite_nic_single_core_perf.py > b/tests/TestSuite_nic_single_core_perf.py > index 21de93624cb4..bff763c129fa 100644 > --- a/tests/TestSuite_nic_single_core_perf.py > +++ b/tests/TestSuite_nic_single_core_perf.py > @@ -41,6 +41,7 @@ from settings import HEADER_SIZE from pmd_output > import PmdOutput from copy import deepcopy from prettytable import > PrettyTable > +import rst >=20 > class TestNicSingleCorePerf(TestCase): >=20 > @@ -244,7 +245,8 @@ class TestNicSingleCorePerf(TestCase): >=20 > table_row.append(self.test_result[frame_size][descriptor][header[3]]) >=20 > table_row.append(self.test_result[frame_size][descriptor][header[4]]) > table.add_row(table_row) > - file_to_save =3D open("output/%s_single_core_perf.txt" % self.ni= c, 'w') > + file_to_save =3D open(os.path.join( > + rst.path2Result, "%s_single_core_perf.txt" % self.nic), > + 'w') > file_to_save.write(str(table)) > file_to_save.close() >=20 > -- > 2.14.1