1
// ------------------------------------------------------------------------
2
// Copyright (C) 2009 Kai Vehmanen
4
// This program is free software; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation; either version 2 of the License, or
7
// (at your option) any later version.
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
// ------------------------------------------------------------------------
24
#include "ecatestsuite.h"
28
static const string rtobject("rtnull");
29
static const string nonrtobject("null");
31
static void eci_execute_test(const string& cmd);
32
static void eci_combination_test(string arg);
34
int main(int argc, char *argv[]) {
37
eci_combination_test("-B:auto");
38
eci_combination_test("-B:nonrt");
39
eci_combination_test("-B:rt");
40
eci_combination_test("-B:rtlowlatency");
42
eci_combination_test("-b:128 -z:nointbuf -z:db -r:50");
43
eci_combination_test("-b:8192 -z:intbuf -z:db -r:50");
44
eci_combination_test("-b:1024 -z:nodb -r:50");
49
void eci_combination_test(string arg) {
50
string ecasound_exec ("./ecasound_test");
51
const char *ecasound_env = getenv("ECASOUND");
53
ecasound_exec = string(ecasound_env);
55
eci_execute_test(ecasound_exec +
56
" -a:1 -i:" + rtobject + " -o:" + nonrtobject + " " + arg + " -t:2 2>/dev/null >/dev/null");
57
eci_execute_test(ecasound_exec +
58
" -a:1 -i:" + nonrtobject + " -o:" + rtobject + " " + arg + " -t:2 2>/dev/null >/dev/null");
59
eci_execute_test(ecasound_exec +
60
" -a:1 -i:" + nonrtobject + " -o:" + nonrtobject + " " + arg + " -t:2 2>/dev/null >/dev/null");
61
eci_execute_test(ecasound_exec +
62
" -a:1 -i:" + rtobject + " -o:" + rtobject + " " + arg + " -t:2 2>/dev/null >/dev/null");
65
void eci_execute_test(const string& cmd) {
68
cout << endl << "---" << endl;
69
cout << "Running test case:" << endl;
72
if (system(cmd.c_str()) != 0) {
73
ECA_TEST_FAIL(1, cmd.c_str());