summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-14 20:51:44 +0000
committerDavid Robillard <d@drobilla.net>2015-02-14 20:51:44 +0000
commit464f1334efa20f4791e9b60d9f7ace529c9421a4 (patch)
tree8c42240342e0fc8ccbb17bd23620f25b3b28ac44 /tests
parentcd9adc330dc26eb7b3a8730ad4b01ec65c32a520 (diff)
downloadingen-464f1334efa20f4791e9b60d9f7ace529c9421a4.tar.gz
ingen-464f1334efa20f4791e9b60d9f7ace529c9421a4.tar.bz2
ingen-464f1334efa20f4791e9b60d9f7ace529c9421a4.zip
Fix test suite.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5571 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'tests')
-rw-r--r--tests/ingen_test.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp
index 13ae62f7..ec1a438d 100644
--- a/tests/ingen_test.cpp
+++ b/tests/ingen_test.cpp
@@ -76,6 +76,9 @@ public:
const Resource::Properties& remove,
const Resource::Properties& add) {}
+ void copy(const Raul::Path& old_path,
+ const Raul::URI& new_uri) {}
+
void move(const Raul::Path& old_path,
const Raul::Path& new_path) {}
@@ -133,10 +136,15 @@ main(int argc, char** argv)
set_bundle_path_from_code((void*)&main);
if (argc != 3) {
- cerr << "Usage: ingen_test START_PATCH COMMANDS_FILE" << endl;
+ cerr << "Usage: ingen_test START_GRAPH COMMANDS_FILE" << endl;
return EXIT_FAILURE;
}
+ char* real_start_graph = realpath(argv[1], NULL);
+ const std::string start_graph = real_start_graph;
+ const std::string cmds_file_path = argv[2];
+ free(real_start_graph);
+
// Create world
try {
world = new World(argc, argv, NULL, NULL, NULL);
@@ -159,7 +167,10 @@ main(int argc, char** argv)
world->engine()->activate();
// Load patch
- world->parser()->parse_file(world, world->interface().get(), argv[1]);
+ if (!world->parser()->parse_file(world, world->interface().get(), start_graph)) {
+ cerr << "error: failed to load initial graph " << start_graph << endl;
+ return 1;
+ }
while (world->engine()->pending_events()) {
world->engine()->run(4096);
world->engine()->main_iteration();
@@ -178,8 +189,6 @@ main(int argc, char** argv)
lv2_atom_forge_init(&forge, map);
lv2_atom_forge_set_sink(&forge, sratom_forge_sink, sratom_forge_deref, &out);
- const std::string cmds_file_path = argv[2];
-
// AtomReader to read commands from a file and send them to engine
AtomReader atom_reader(world->uri_map(),
world->uris(),