From 51abaff0720065fba301bcd80438a45cd59f3804 Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Mon, 29 Aug 2022 21:57:52 +0000 Subject: [PATCH] Tools: Testbench: add suffix to keep all the logs When series of tests are run, only last result with same component is saved. Make unique output filename. For now adding bits per sample at the end of file, all the logs can be saved. Ideally datetime string would be good. I keep it as FIXME. Signed-off-by: Fred Oh --- tools/test/audio/process_test.m | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/test/audio/process_test.m b/tools/test/audio/process_test.m index ba7f3a40e40b..7e240c834ca9 100644 --- a/tools/test/audio/process_test.m +++ b/tools/test/audio/process_test.m @@ -111,21 +111,24 @@ end end + %% FIXME: get unique string to keep all the incremental logs, like datetime string. + %% For now bitspersample is differentiator. + %% Print table with test summary: Gain - fn = sprintf('%s/g_%s.txt', reports, t.comp); + fn = sprintf('%s/g_%s_%d.txt', reports, t.comp, t.bits_in); print_val(t.comp, 'Gain (dB)', fn, bits_in_list, bits_out_list, r.g, r.pf); %% Print table with test summary: DR - fn = sprintf('%s/dr_%s.txt', reports, t.comp); + fn = sprintf('%s/dr_%s_%d.txt', reports, t.comp, t.bits_in); print_val(t.comp, 'Dynamic range (dB CCIR-RMS)', fn, bits_in_list, bits_out_list, r.dr, r.pf); %% Print table with test summary: THD+N vs. frequency - fn = sprintf('%s/thdnf_%s.txt', reports, t.comp); + fn = sprintf('%s/thdnf_%s_%d.txt', reports, t.comp, t.bits_in); print_val(t.comp, 'Worst-case THD+N vs. frequency', fn, bits_in_list, bits_out_list, r.thdnf, r.pf); %% Print table with test summary: pass/fail - fn = sprintf('%s/pf_%s.txt', reports, t.comp); + fn = sprintf('%s/pf_%s_%d.txt', reports, t.comp, t.bits_in); print_pf(t.comp', fn, bits_in_list, bits_out_list, r.pf, 'Fails chirp/gain/DR/THD+N/FR'); fprintf('\n'); @@ -364,6 +367,8 @@ function test_result_print(t, testverbose, testacronym, test) tstr = sprintf('%s %s %d-%d %d Hz', ... testverbose, t.comp, t.bits_in, t.bits_out, t.fs); + %% FIXME: get unique string to keep all the incremental logs + for i = 1:length(test.ph) title(test.ph(i), tstr); end