[2/5] test: add quick run tests under test-fast suite

Message ID 1537545528-27848-3-git-send-email-hari.kumarx.vemula@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series create different meson test targets |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Hari Kumar Vemula Sept. 21, 2018, 3:58 p.m. UTC
  Added test cases that runs quickly under test fast category

Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula@intel.com>
---
 test/test/meson.build | 89 +++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 83 insertions(+), 6 deletions(-)
  

Comments

Bruce Richardson Sept. 21, 2018, 4:18 p.m. UTC | #1
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@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
  

Patch

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],
+        ['atomic_autotest', 'parallel', true],
+        ['byteorder_autotest', 'parallel', true],
+        ['cryptodev_sw_armv8_autotest', 'non-parallel', false],
+        ['cmdline_autotest', 'parallel', true],
+        ['common_autotest', 'parallel', true],
+        ['cpuflags_autotest', 'parallel', true],
+        ['crc_autotest', 'non-parallel', false],
+        ['cryptodev_openssl_asym_autotest', 'non-parallel', false],
+        ['cryptodev_sw_mvsam_autotest', 'non-parallel', false],
+        ['cycles_autotest', 'parallel', true],
+        ['debug_autotest', 'parallel', true],
+        ['devargs_autotest', 'non-parallel', false],
+        ['distributor_autotest', 'non-parallel', false],
+        ['eal_flags_autotest', 'parallel', true],
+        ['eal_fs_autotest', 'parallel', true],
+        ['errno_autotest', 'parallel', true],
+        ['event_ring_autotest', 'parallel', true],
+        ['eventdev_common_autotest', 'non-parallel', false],
+        ['eventdev_octeontx_autotest', 'non-parallel', false],
+        ['eventdev_sw_autotest', 'non-parallel', false],
+        ['func_reentrancy_autotest', 'parallel', true],
+        ['flow_classify_autotest', 'parallel', true],
+        ['hash_scaling_autotest', 'non-parallel', false],
+        ['hash_autotest', 'parallel', true],
+        ['interrupt_autotest', 'parallel', true],
+        ['kni_autotest', 'non-parallel', false],
+        ['kvargs_autotest', 'non-parallel', false],
+        ['logs_autotest', 'parallel', true],
+        ['lpm6_autotest', 'parallel', true],
+        ['lpm_autotest', 'parallel', true],
+        ['malloc_autotest', 'parallel', true],
+        ['mbuf_autotest', 'parallel', true],
+        ['member_autotest', 'non-parallel', false],
+        ['memcpy_autotest', 'parallel', true],
+        ['memory_autotest', 'parallel', true],
+        ['mempool_autotest', 'parallel', true],
+        ['memzone_autotest', 'parallel', true],
+        ['meter_autotest', 'parallel', true],
+        ['multiprocess_autotest', 'parallel', true],
+        ['per_lcore_autotest', 'parallel', true],
+        ['power_acpi_cpufreq_autotest', 'non-parallel', false],
+        ['power_autotest', 'non-parallel', false],
+        ['power_kvm_vm_autotest', 'non-parallel', false],
+        ['prefetch_autotest', 'parallel', true],
+        ['red_autotest', 'parallel', true],
+        ['reorder_autotest', 'non-parallel', false],
+        ['ring_autotest', 'parallel', true],
+        ['ring_pmd_autotest', 'parallel', true],
+        ['rwlock_autotest', 'parallel', true],
+        ['sched_autotest', 'parallel', true],
+        ['service_autotest', 'non-parallel', false],
+        ['spinlock_autotest', 'parallel', true],
+        ['string_autotest', 'parallel', true],
+        ['table_autotest', 'parallel', true],
+        ['tailq_autotest', 'parallel', true],
+        ['thash_autotest', 'non-parallel', false],
+        ['timer_autotest', 'parallel', true],
+        ['user_delay_us', 'parallel', true],
+        ['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
 
 endif