forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsof_test_perf_top.m
More file actions
52 lines (44 loc) · 1.19 KB
/
sof_test_perf_top.m
File metadata and controls
52 lines (44 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function sof_test_perf_top
%%
% audio_test_perf_top - Wrapper function for call from shell
%
% audio_test_perf_top()
%
% Inputs
% none
%
% Outputs
% shell exit code
%
% SPDX-License-Identifier: BSD-3-Clause
% Copyright(c) 2019 Intel Corporation. All rights reserved.
% Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
% Edit to next lines the configs list the actual tests to
% execute. The syntax used is called a cell array. The
% script will execute test with each configuration in the
% array. E.g.
% configs = {'up2_s16_play_cfg.m', 't100_s16_play_cfg.m'};
configs = {'sof_test_perf_config.m'};
%% Run tests
n_fail_tot = 0;
n_pass_tot = 0;
n = length(configs);
for i = 1:n
cfg = char(configs(i));
[n_fail, n_pass] = sof_test_perf(cfg);
n_fail_tot = n_fail_tot + n_fail;
n_pass_tot = n_pass_tot + n_pass;
fprintf('Completed: %s\n', cfg);
fprintf('Passed : %d\n', n_pass);
fprintf('Failed : %d\n\n', n_fail);
end
if n > 1
fprintf('Completed all.\n');
fprintf('Passed : %d\n', n_pass_tot);
fprintf('Failed : %d\n', n_fail_tot);
end
if n_fail_tot > 0 || n_pass_tot < 1
fprintf('Error: Audio quality test failed.\n');
quit(1)
end
fprintf('Success: Audio quality test passed.\n');