test/trace: add a test with traces enabled
authorChengwen Feng <fengchengwen@huawei.com>
Fri, 17 Jun 2022 02:29:13 +0000 (10:29 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 21 Jun 2022 09:11:00 +0000 (11:11 +0200)
Currently trace_autotest unit test is executed with traces disabled.
This patch introduces trace_autotest unit test with traces enabled,
and the traces file is written to the directory where dpdk-test is
located.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
app/test/meson.build

index 7fe261c..1a30f4d 100644 (file)
@@ -508,6 +508,16 @@ foreach arg : fast_tests
                 timeout : timeout_seconds_fast,
                 is_parallel : false,
                 suite : 'fast-tests')
+        if not is_windows and arg[0] == 'trace_autotest'
+            test_args += ['--trace=.*']
+            test_args += ['--trace-dir=@0@'.format(meson.current_build_dir())]
+            test(arg[0] + '_with_traces', dpdk_test,
+                    env : ['DPDK_TEST=' + arg[0]],
+                    args : test_args,
+                    timeout : timeout_seconds_fast,
+                    is_parallel : false,
+                    suite : 'fast-tests')
+        endif
     endif
 endforeach