test suite reviews and discussions
 help / color / mirror / Atom feed
From: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
To: dts@dpdk.org
Cc: jianbo.liu@linaro.org, herbert.guan@arm.com,
	Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Subject: [dts] [PATCH] framework: Adding limit for make job execution
Date: Fri, 15 Sep 2017 18:22:28 +0200	[thread overview]
Message-ID: <1505492549-8602-1-git-send-email-radoslaw.biernacki@linaro.org> (raw)

Unlimited parralel job execution cause OOM on memory constrained targets

Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
---
 framework/project_dpdk.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index 402ac8d..23d1d7c 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -210,7 +210,8 @@ class DPDKdut(Dut):
         self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#")
 
         # compile
-        out = self.send_expect("make -j install T=%s %s" % (target, extra_options), "# ", build_time)
+        out = self.send_expect("make -j %d install T=%s %s" % 
+            (self.number_of_cores, target, extra_options), "# ", build_time)
         #should not check test app compile status, because if test compile fail,
         #all unit test can't exec, but others case will exec sucessfull 
         self.build_install_dpdk_test_app(target, build_time)
@@ -253,9 +254,9 @@ class DPDKdut(Dut):
         assert ("No rule to make" not in out), "No rule to make error..."
 
     def build_install_dpdk_test_app(self, target, build_time, os_type="linux"):
-        cmd_build_test = "make -j -C test/"
+        cmd_build_test = "make -j %d -C test/" % (self.number_of_cores)
         if os_type == "freebsd":
-            cmd_build_test = "make -j -C test/ CC=gcc48"
+            cmd_build_test = "make -j %d -C test/ CC=gcc48" % (self.number_of_cores)
 
         self.send_expect(cmd_build_test, "# ", build_time)
         app_list = ['./test/test/test', './test/test-acl/testacl', './test/test-pipeline/testpipeline', './test/cmdline_test/cmdline_test']
@@ -380,7 +381,8 @@ class DPDKdut(Dut):
         self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#")
         self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#")
         self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#")
-        return self.send_expect("make -j -C %s %s" % (folder, extra_options),
+        return self.send_expect("make -j %d -C %s %s" % (self.number_of_cores,
+                                                         folder, extra_options),
                                 "# ", timeout)
 
     def build_dpdk_apps_freebsd(self, folder, extra_options):
@@ -390,7 +392,8 @@ class DPDKdut(Dut):
         self.send_expect("rm -rf %s" % r'./app/test/test_resource_c.res.o' , "#")
         self.send_expect("rm -rf %s" % r'./app/test/test_resource_tar.res.o' , "#")
         self.send_expect("rm -rf %s" % r'./app/test/test_pci_sysfs.res.o' , "#")
-        return self.send_expect("make -j -C %s %s CC=gcc48" % (folder, extra_options),
+        return self.send_expect("make -j %d -C %s %s CC=gcc48" % (self.number_of_cores,
+                                                                  folder, extra_options),
                                 "# ", 180)
 
     def get_blacklist_string(self, target, nic):
-- 
1.9.1

             reply	other threads:[~2017-09-15 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15 16:22 Radoslaw Biernacki [this message]
2017-09-15 16:22 ` [dts] [PATCH] framework/crb: Throwing exception in case requested core configuration cannot be fulfilled Radoslaw Biernacki
2017-09-18 10:15   ` Liu, Yong
2017-09-18 10:14 ` [dts] [PATCH] framework: Adding limit for make job execution Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505492549-8602-1-git-send-email-radoslaw.biernacki@linaro.org \
    --to=radoslaw.biernacki@linaro.org \
    --cc=dts@dpdk.org \
    --cc=herbert.guan@arm.com \
    --cc=jianbo.liu@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).