From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 1C062A045E for ; Thu, 30 May 2019 14:38:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC8A61B94D; Thu, 30 May 2019 14:38:44 +0200 (CEST) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id 235921B94D for ; Thu, 30 May 2019 14:38:43 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190530123842euoutp0295c26d1a021b23c2dd19553237a09a68~jdkIXDnl21844218442euoutp02j for ; Thu, 30 May 2019 12:38:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190530123842euoutp0295c26d1a021b23c2dd19553237a09a68~jdkIXDnl21844218442euoutp02j DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1559219922; bh=55mBaD5C4IuXG8S0afNjbroOauGH8UEMlg+BrOBZQYo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g3ppzL2JUkpnlJ1H0iExyEOhqjiQjmzSEXqu2Uk+drJ7Fb4cGYzeeG6qBe710WYt3 Dad1c/Ib+IvtJB5QhawDWsZDAGpiOc9zBT37V4PY8AeuVNG28Ky72qqjYypitGzlZE rSGKd0uu2laTWv1H+tcNPr4OXDS30nwsHV6jHoMQ= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190530123841eucas1p29f5511cfd6b46dcf02e4938d3c40587d~jdkH-w9LE2047020470eucas1p2C; Thu, 30 May 2019 12:38:41 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 9B.70.04298.1DECFEC5; Thu, 30 May 2019 13:38:41 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190530123840eucas1p216e6df3737209db26e2b0ce678ba9da4~jdkHMs4Hk2049320493eucas1p25; Thu, 30 May 2019 12:38:40 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190530123840eusmtrp1734d4f134dc20dee12220903f23380b1~jdkG9DCzS1932019320eusmtrp1e; Thu, 30 May 2019 12:38:40 +0000 (GMT) X-AuditID: cbfec7f2-f2dff700000010ca-54-5cefced1a434 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 06.66.04140.0DECFEC5; Thu, 30 May 2019 13:38:40 +0100 (BST) Received: from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190530123840eusmtip237504f6c843061f1256edbe358d4aa29~jdkGgfr682726327263eusmtip2b; Thu, 30 May 2019 12:38:40 +0000 (GMT) From: Ilya Maximets To: dev@dpdk.org, Thomas Monjalon Cc: Bruce Richardson , Aaron Conole , Kevin Traynor , Ilya Maximets Date: Thu, 30 May 2019 15:38:36 +0300 Message-Id: <20190530123836.2620-1-i.maximets@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190529163958.30796-2-i.maximets@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSbUhTYRTu3b27uw4nt6l4MENZCRWljURHSBYJ7Y8U9s+GtfL6kW7arlrT H4mZ+Z1pNbOvZcnCJQsTtRKdK1QUJkbhtIWWBH5v83sK2rar9O85z/Occx4Oh8SEq3ggmabM plVKeYaI4ONtvU7zsWGzTXZ8tmC/ZGNugiexNMVIFhbbOZLv95w8SbPJzpMsTvTjpwnphraR K33dOc2R9o4+5kltXT8IaVVrE7rATeBHJ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4lSJhXwEri/6H1LBAL5CVWbzjADGJzCthIHJh9gB3iIGuJL+s3sk9g5FvAyLCKUSS1 tDg3PbfYSK84Mbe4NC9dLzk/dxMjMFC3Hfu5ZQdj17vgQ4wCHIxKPLwCB9/HCLEmlhVX5h5i lOBgVhLh/bn8XYwQb0piZVVqUX58UWlOavEhRlOgmyYyS4km5wOjKK8k3tDU0NzC0tDc2NzY zEJJnLdD4GCMkEB6YklqdmpqQWoRTB8TB6dUA2PcIlH2oxEBfU9ner2xY5jHfCw8eI3C+j0P 45/9tA6q0Mw9tDSka8mvnV9Sjyx6dMGP7fyJgq7dT7q12hI87yi6nXihoSstLhMw68Dbqpv/ Ti7rOscXuHvvoRyXnf7VB5wi18790hsfYXWiq6/p0Qunp8+0PYO/3zE64SJrPl178o/c6Cqp T4JKLMUZiYZazEXFiQDy5f9UagIAAA== X-CMS-MailID: 20190530123840eucas1p216e6df3737209db26e2b0ce678ba9da4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190530123840eucas1p216e6df3737209db26e2b0ce678ba9da4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190530123840eucas1p216e6df3737209db26e2b0ce678ba9da4 References: <20190529163958.30796-2-i.maximets@samsung.com> Subject: [dpdk-dev] [PATCH v2] meson: don't check dependencies for tests if not required X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Don't need to check dependencies if test apps will not be built anyway. Signed-off-by: Ilya Maximets --- Version 2: - 'get_option('tests')' check moved to the top. app/test/meson.build | 141 ++++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 69 deletions(-) diff --git a/app/test/meson.build b/app/test/meson.build index 83391cef0..4de856f93 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -1,6 +1,10 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation +if not get_option('tests') + subdir_done() +endif + test_sources = files('commands.c', 'packet_burst_generator.c', 'sample_packet_forward.c', @@ -335,86 +339,85 @@ if get_option('default_library') == 'static' link_libs = dpdk_drivers endif -if get_option('tests') - dpdk_test = executable('dpdk-test', - test_sources, - link_whole: link_libs, - dependencies: test_dep_objs, - c_args: [cflags, '-DALLOW_EXPERIMENTAL_API'], - install_rpath: driver_install_path, - install: false) +dpdk_test = executable('dpdk-test', + test_sources, + link_whole: link_libs, + dependencies: test_dep_objs, + c_args: [cflags, '-DALLOW_EXPERIMENTAL_API'], + install_rpath: driver_install_path, + install: false) - # some perf tests (eg: memcpy perf autotest)take very long - # to complete, so timeout to 10 minutes - timeout_seconds = 600 - timeout_seconds_fast = 10 - - # Retrieve the number of CPU cores, defaulting to 4. - num_cores = '0-3' - if host_machine.system() == 'linux' - num_cores = run_command('cat', - '/sys/devices/system/cpu/present' - ).stdout().strip() - elif host_machine.system() == 'freebsd' - snum_cores = run_command('/sbin/sysctl', '-n', - 'hw.ncpu').stdout().strip() - inum_cores = snum_cores.to_int() - 1 - num_cores = '0-@0@'.format(inum_cores) - endif +# some perf tests (eg: memcpy perf autotest)take very long +# to complete, so timeout to 10 minutes +timeout_seconds = 600 +timeout_seconds_fast = 10 - num_cores_arg = '-l ' + num_cores +# Retrieve the number of CPU cores, defaulting to 4. +num_cores = '0-3' +if host_machine.system() == 'linux' + num_cores = run_command('cat', + '/sys/devices/system/cpu/present' + ).stdout().strip() +elif host_machine.system() == 'freebsd' + snum_cores = run_command('/sbin/sysctl', '-n', + 'hw.ncpu').stdout().strip() + inum_cores = snum_cores.to_int() - 1 + num_cores = '0-@0@'.format(inum_cores) +endif - test_args = [num_cores_arg, '-n 4'] - foreach arg : fast_parallel_test_names - if host_machine.system() == 'linux' - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - args : test_args + - ['--file-prefix=@0@'.format(arg)], - timeout : timeout_seconds_fast, - suite : 'fast-tests') - else - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - args : test_args, - timeout : timeout_seconds_fast, - suite : 'fast-tests') - endif - endforeach +num_cores_arg = '-l ' + num_cores - foreach arg : fast_non_parallel_test_names +test_args = [num_cores_arg, '-n 4'] +foreach arg : fast_parallel_test_names + if host_machine.system() == 'linux' + test(arg, dpdk_test, + env : ['DPDK_TEST=' + arg], + args : test_args + + ['--file-prefix=@0@'.format(arg)], + timeout : timeout_seconds_fast, + suite : 'fast-tests') + else test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], args : test_args, - timeout : timeout_seconds_fast, - is_parallel : false, - suite : 'fast-tests') - endforeach + timeout : timeout_seconds_fast, + suite : 'fast-tests') + endif +endforeach - foreach arg : perf_test_names - test(arg, dpdk_test, +foreach arg : fast_non_parallel_test_names + test(arg, dpdk_test, + env : ['DPDK_TEST=' + arg], + args : test_args, + timeout : timeout_seconds_fast, + is_parallel : false, + suite : 'fast-tests') +endforeach + +foreach arg : perf_test_names + test(arg, dpdk_test, + env : ['DPDK_TEST=' + arg], + args : test_args, + timeout : timeout_seconds, + is_parallel : false, + suite : 'perf-tests') +endforeach + +foreach arg : driver_test_names + test(arg, dpdk_test, env : ['DPDK_TEST=' + arg], args : test_args, timeout : timeout_seconds, is_parallel : false, - suite : 'perf-tests') - endforeach + suite : 'driver-tests') +endforeach - foreach arg : driver_test_names - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - args : test_args, - timeout : timeout_seconds, - is_parallel : false, - suite : 'driver-tests') - endforeach +foreach arg : dump_test_names + test(arg, dpdk_test, + env : ['DPDK_TEST=' + arg], + args : test_args, + timeout : timeout_seconds, + is_parallel : false, + suite : 'debug-tests') +endforeach - foreach arg : dump_test_names - test(arg, dpdk_test, - env : ['DPDK_TEST=' + arg], - args : test_args, - timeout : timeout_seconds, - is_parallel : false, - suite : 'debug-tests') - endforeach -endif -- 2.17.1