| 58 |
58 |
"Copyright 2009 QMUL.\n"
|
| 59 |
59 |
"Freely redistributable; published under a BSD-style license.\n\n"
|
| 60 |
60 |
"Usage:\n"
|
| 61 |
|
" " << name << " [-n] [-v] [<pluginbasename>:<plugin>]\n\n"
|
|
61 |
" " << name << " [-nv] <pluginbasename>:<plugin>\n"
|
|
62 |
" " << name << " [-nv] -a\n\n"
|
| 62 |
63 |
"Example:\n"
|
| 63 |
64 |
" " << name << " vamp-example-plugins:amplitudefollower\n\n"
|
| 64 |
|
"With an argument, tests one plugin; without, tests all plugins in Vamp path.\n"
|
| 65 |
|
"\nOptions:\n"
|
| 66 |
|
" --nondeterministic, -n Plugins may be nondeterministic: print a note\n"
|
| 67 |
|
" instead of an error if results differ between runs\n"
|
| 68 |
|
" --verbose, -v Show returned features each time a note, warning,\n"
|
|
65 |
"Options:\n"
|
|
66 |
" -a, --all Test all plugins found in Vamp path\n\n"
|
|
67 |
" -n, --nondeterministic Plugins may be nondeterministic: print a note\n"
|
|
68 |
" instead of an error if results differ between runs\n\n"
|
|
69 |
" -v, --verbose Show returned features each time a note, warning,\n"
|
| 69 |
70 |
" or error arises from feature data\n"
|
| 70 |
71 |
"\nIf you have access to a runtime memory checker, you may find it especially\n"
|
| 71 |
72 |
"helpful to run this tester under it and watch for errors thus provoked.\n"
|
| ... | ... | |
| 85 |
86 |
|
| 86 |
87 |
bool nondeterministic = false;
|
| 87 |
88 |
bool verbose = false;
|
|
89 |
bool all = false;
|
| 88 |
90 |
string argument;
|
| 89 |
91 |
for (int i = 1; i < argc; ++i) {
|
| 90 |
92 |
if (!argv[i]) break;
|
| 91 |
93 |
if (argv[i][0] == '-') {
|
| 92 |
94 |
if (!strcmp(argv[i], "-v") ||
|
| 93 |
95 |
!strcmp(argv[i], "--verbose")) {
|
| 94 |
|
verbose = 1;
|
|
96 |
verbose = true;
|
| 95 |
97 |
continue;
|
| 96 |
98 |
}
|
| 97 |
99 |
if (!strcmp(argv[i], "-n") ||
|
| 98 |
100 |
!strcmp(argv[i], "--nondeterministic")) {
|
| 99 |
|
nondeterministic = 1;
|
|
101 |
nondeterministic = true;
|
|
102 |
continue;
|
|
103 |
}
|
|
104 |
if (!strcmp(argv[i], "-a") ||
|
|
105 |
!strcmp(argv[i], "--all")) {
|
|
106 |
all = true;
|
| 100 |
107 |
continue;
|
| 101 |
108 |
}
|
| 102 |
109 |
usage(name);
|
| ... | ... | |
| 106 |
113 |
}
|
| 107 |
114 |
}
|
| 108 |
115 |
|
|
116 |
if (argument == "" && !all) usage(name);
|
|
117 |
if (argument != "" && all) usage(name);
|
|
118 |
|
| 109 |
119 |
cerr << name << ": Running..." << endl;
|
| 110 |
120 |
|
| 111 |
121 |
Test::Options opts = Test::NoOption;
|
| 112 |
122 |
if (nondeterministic) opts |= Test::NonDeterministic;
|
| 113 |
123 |
if (verbose) opts |= Test::Verbose;
|
| 114 |
124 |
|
| 115 |
|
if (argument == "") {
|
|
125 |
if (all) {
|
| 116 |
126 |
bool good = true;
|
| 117 |
127 |
Vamp::HostExt::PluginLoader::PluginKeyList keys =
|
| 118 |
128 |
Vamp::HostExt::PluginLoader::getInstance()->listPlugins();
|