From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f225.google.com (mail-qt0-f225.google.com [209.85.216.225]) by dpdk.org (Postfix) with ESMTP id 03F9E5F36 for ; Thu, 29 Mar 2018 21:16:47 +0200 (CEST) Received: by mail-qt0-f225.google.com with SMTP id f16so7385095qth.3 for ; Thu, 29 Mar 2018 12:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=74ZzJWQmQpwClXJzQMRQJG1nwN/5MREu3RfJzBNQ6uk=; b=Q2Btfo6A+MTwHVv0DPm4S3IoM8A6+TOFPWYZn6l4ua24VwGgP/LSkVG83jVa1lEJWV kDpv4muq0PuUlFsKIzQXUQHVD+jqJftSF/nG+maLzaCWJpjL/4/4glkACytD6gKRTIxL GuqX/qlTK9g8D5625bGFAxFN4mDVHL6bn1gZg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=74ZzJWQmQpwClXJzQMRQJG1nwN/5MREu3RfJzBNQ6uk=; b=W1Qp6+8wtcQP+0TQ6GSAi/rx/25DCdfm8I9czr3zF07SuUukjn7DvHi2EqcBQ+1ZHo oyo0Ppf011izQEwEOdFlDrtWDNIkMlWQeQ5p6ffHiODDu5d20eOzFukgE3bAjoP5Sogo H7Nlv6JNVx7bDkPiDOBQWa4PqkyhNfsMYH4WqxcIdu02YpQFGIezU2dkO1la1qrj4aXi m9xucsQLgZ1kl8ZtQUZKIYsguEephTnNrTrYG7sSwrT0BMfFePZuYMRd2SYWYL4otSzE +S582MdOyUm35SvSEVqGCe4/2W3QJ3Ct2UmlqJ68RnIHuBEviHSIiiSweS/oPiG8SpiK wG7w== X-Gm-Message-State: ALQs6tDzSeWGr+ONZef3PfcGFeqOJBPpcaT0E2D6aTVnFcdsMuXIj1Ie aiO3+dWrsWrmv3U9aRoEExAapxfue1DxDlIYmc51VHLnip3IL0yHNlNeUDyAg6H4+qIr3bGBxg0 Q/VKc+l7rhXNFVgFXZq50EbXh4coPxNwFH5neW0F5Zgb5Fxkb/gj28p42AfP+yUfk7kMQjRJT7K J95BqHNxzJB4EaMA== X-Google-Smtp-Source: AIpwx4+fcUzXNmiPoPF24z9zvvOy+Ele4nWTzC+5ERrmGmuZyOTEXytqn2CM+WQosX0ycWuZCPK3IFh+Rw30 X-Received: by 10.237.51.100 with SMTP id u91mr12703017qtd.224.1522351006440; Thu, 29 Mar 2018 12:16:46 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id 130sm1231757qkg.12.2018.03.29.12.16.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 12:16:46 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from groose.ofa (unknown [IPv6:2606:4100:3880:1240:cc3b:885c:7cb:4a8e]) by postal.iol.unh.edu (Postfix) with ESMTP id 0EA5E6045DC4; Thu, 29 Mar 2018 15:16:46 -0400 (EDT) From: Patrick MacArthur To: dts@dpdk.org Cc: dpdklab@iol.unh.edu Date: Thu, 29 Mar 2018 15:16:02 -0400 Message-Id: <20180329191605.5404-5-pmacarth@iol.unh.edu> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180329191605.5404-1-pmacarth@iol.unh.edu> References: <20180329191605.5404-1-pmacarth@iol.unh.edu> Subject: [dts] [PATCH for-next v3 4/7] 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: Thu, 29 Mar 2018 19:16:47 -0000 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 look up the output directory that the user requested and place the custom output file in that directory. Tested-by: Ali Alnubani Signed-off-by: Patrick MacArthur --- tests/TestSuite_nic_single_core_perf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py index 21de93624cb4..860fc29f607f 100644 --- a/tests/TestSuite_nic_single_core_perf.py +++ b/tests/TestSuite_nic_single_core_perf.py @@ -33,6 +33,7 @@ DPDK Test suite. """ import utils +import os import re import time from test_case import TestCase @@ -41,6 +42,7 @@ from settings import HEADER_SIZE from pmd_output import PmdOutput from copy import deepcopy from prettytable import PrettyTable +import rst class TestNicSingleCorePerf(TestCase): @@ -244,7 +246,8 @@ class TestNicSingleCorePerf(TestCase): table_row.append(self.test_result[frame_size][descriptor][header[3]]) table_row.append(self.test_result[frame_size][descriptor][header[4]]) table.add_row(table_row) - file_to_save = open("output/%s_single_core_perf.txt" % self.nic, 'w') + file_to_save = open(os.path.join( + rst.path2Result, "%s_single_core_perf.txt" % self.nic), 'w') file_to_save.write(str(table)) file_to_save.close() -- 2.14.1