From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f228.google.com (mail-qk0-f228.google.com [209.85.220.228]) by dpdk.org (Postfix) with ESMTP id BA9485F25 for ; Tue, 20 Mar 2018 23:21:28 +0100 (CET) Received: by mail-qk0-f228.google.com with SMTP id o184so3488591qkd.13 for ; Tue, 20 Mar 2018 15:21:28 -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=hRjFrQtXEjVpcssR8TwCTSWQjl2HYyTUIxxIuE7dkA4=; b=gxr+6Vi4y06YVXW7Vu1pgaUQnZ5FhyrqnMNb1O9ZDatdYu7Pas7ipHF/8jrVpox6Zh sPi90NLILGy8JpeewX3towl77bpqZmxShL12/mVljfAY8q87FDG6FBszh8HLVSVhzVMh LuY9NYkoo8Ty/6c//EdfP8yBbdkwzPmrZd3q8= 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=hRjFrQtXEjVpcssR8TwCTSWQjl2HYyTUIxxIuE7dkA4=; b=JpPnkI5U2aOZPN3Vgz+vhxJcagC50HCWSjb46dMCg6EGtqVvbbPlJzKty7rbb9mKUd nAKu733JPLPdbwsFAPNaWIaucP5pQLpGA8dw/R/jnQinoduzbFfCHDBRgIcbRdUsOrzI rhc2lSBv6AGsoFE7M51YBrYyx/4xm+BwpVSIqPjOVLE4xmocXbm2mjG5FI9DhTmxY6ZQ dt1NVkjLLybQVhPWNj3UXWLECoHSLt8AtDNOXzLj1OXR6lUUwK2GiAAYwlhX0vFmfBeS t3ztWUmBGeXBEJIsPFyqnhvE6Q3jOOPDRc6uqItCGhFasCg0xS1sTg8DqRtTjqC4W8ZJ HjYQ== X-Gm-Message-State: AElRT7E2HnJWz2fw/HRri1H3AUvPyBX80T+i+EuJx6jzSlNNzQcaFAyZ p9wvGogX/mewSYa7HnamSxOW0++cwevGWXqIywFP4fNm6KegFBvjGr2Ua0LMIbJSTN4HwDxTHrL cjlqgzu5CE3cy5T4GazFZqj2ObveCAiXsGbB/vqFlT6atqj6UhBsfqT5DRys8le3Syw9YW66ngQ == X-Google-Smtp-Source: AG47ELvIZdVdm0V6kirSu0yT/IX+PVn2sjlMnz28jiWvePcW5szhumvgun3jBBIQNIazUxtzMaMfFqUK3hJU X-Received: by 10.55.105.131 with SMTP id e125mr26629124qkc.322.1521584488038; Tue, 20 Mar 2018 15:21:28 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id z200sm674851qkb.1.2018.03.20.15.21.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 15:21:28 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from groose.iol.unh.edu (unknown [IPv6:2606:4100:3880:1240:40f9:44b9:fa0e:efd3]) by postal.iol.unh.edu (Postfix) with ESMTP id 5ED976045DFA; Tue, 20 Mar 2018 18:21:27 -0400 (EDT) From: Patrick MacArthur To: dts@dpdk.org Cc: dpdklab@iol.unh.edu Date: Tue, 20 Mar 2018 18:20:40 -0400 Message-Id: <20180320222041.17303-5-pmacarth@iol.unh.edu> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180320222041.17303-1-pmacarth@iol.unh.edu> References: <20180320222041.17303-1-pmacarth@iol.unh.edu> Subject: [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: Tue, 20 Mar 2018 22:21:29 -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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 class TestNicSingleCorePerf(TestCase): @@ -244,7 +245,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