[dpdk-dev] [PATCH 2/5] test: add quick run tests under test-fast suite
Bruce Richardson
bruce.richardson at intel.com
Fri Sep 21 18:18:06 CEST 2018
On Fri, Sep 21, 2018 at 04:58:45PM +0100, Hari Kumar Vemula wrote:
> Added test cases that runs quickly under test fast category
>
> Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
> ---
> test/test/meson.build | 89 +++++++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 83 insertions(+), 6 deletions(-)
>
> diff --git a/test/test/meson.build b/test/test/meson.build
> index a364d1aac..087d635e1 100644
> --- a/test/test/meson.build
> +++ b/test/test/meson.build
> @@ -118,6 +118,70 @@ test_deps = ['acl',
> 'timer'
> ]
>
> +fast_test_names =[
> + ['acl_autotest', 'parallel', true],
> + ['alarm_autotest', 'parallel', true],
<snip>
> + ['version_autotest', 'parallel', true],
> +]
> +
> if dpdk_conf.has('RTE_LIBRTE_PDUMP')
> test_deps += 'pdump'
> endif
> @@ -146,12 +210,15 @@ if cc.has_argument('-Wno-format-truncation')
> endif
>
> test_dep_objs = []
> -compress_test_dep = dependency('zlib', required: false)
> -if compress_test_dep.found()
> - test_dep_objs += compress_test_dep
> - test_sources += 'test_compressdev.c'
> - test_deps += 'compressdev'
> - test_names += 'compressdev_autotest'
> +if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV')
> + compress_test_dep = dependency('zlib', required: false)
> + if compress_test_dep.found()
> + test_dep_objs += compress_test_dep
> + test_sources += 'test_compressdev.c'
> + test_deps += 'compressdev'
> + compressdev_test = [['compressdev_autotest', 'non-parallel', false]]
> + fast_test_names += compressdev_test
> + endif
> endif
>
> foreach d:test_deps
> @@ -176,5 +243,15 @@ if get_option('tests')
>
> # some perf tests (eg: memcpy perf autotest)take very long
> # to complete, so timeout to 10 minutes
> + timeout_seconds_fast = 10
> +
> + foreach arg : fast_test_names
> + bool_value = arg[2]
> + test(arg[0], dpdk_test,
> + env : ['DPDK_TEST=' + arg[0]],
> + timeout : timeout_seconds_fast,
> + is_parallel : bool_value,
> + suite : 'test-fast')
> + endforeach
arg[1] is unused here, and seems to be just for reference. It's also
strange assigning arg[2] to a variable, while arg[0] is not.
How about creating 2 lists, fast_tests_parallel and fast_test_nonparallel?
/Bruce
More information about the dev
mailing list