From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRWC3-0008Qe-Ol for qemu-devel@nongnu.org; Wed, 11 Jan 2017 22:36:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRWBz-000242-OW for qemu-devel@nongnu.org; Wed, 11 Jan 2017 22:36:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36504) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRWBz-00023n-GZ for qemu-devel@nongnu.org; Wed, 11 Jan 2017 22:36:47 -0500 From: Peter Xu Date: Thu, 12 Jan 2017 11:36:22 +0800 Message-Id: <1484192182-13760-4-git-send-email-peterx@redhat.com> In-Reply-To: <1484192182-13760-1-git-send-email-peterx@redhat.com> References: <1484192182-13760-1-git-send-email-peterx@redhat.com> Subject: [Qemu-devel] [kvm-unit-tests PATCH v6 3/3] run_tests: allow run tests in parallel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kvm@vger.kernel.org Cc: Paolo Bonzini , Andrew Jones , peterx@redhat.com, =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= run_task.sh is getting slow. This patch is trying to make it faster by running the tests concurrently. We provide a new parameter "-j" for the run_tests.sh, which can be used to specify how many run queues we want for the tests. Default queue length is 1, which is the old behavior. Quick test on my laptop (4 cores, 2 threads each) shows 3x speed boost: |-----------------+-----------| | command | time used | |-----------------+-----------| | run_test.sh | 75s | | run_test.sh -j8 | 27s | |-----------------+-----------| Signed-off-by: Peter Xu --- run_tests.sh | 12 ++++++++++-- scripts/common.bash | 16 +++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index afd3d95..4d57ff9 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -13,10 +13,11 @@ function usage() { cat <