Browse Source

test-load our vst plugin

tags/v2.3.0-RC1
falkTX 4 years ago
parent
commit
2e00e352d1
3 changed files with 48 additions and 3 deletions
  1. +1
    -1
      source/tests/Makefile
  2. +40
    -2
      source/tests/carla-host-plugin.c
  3. +7
    -0
      source/tests/valgrind.supp

+ 1
- 1
source/tests/Makefile View File

@@ -87,7 +87,7 @@ ansi-%_run: $(BINDIR)/ansi-%
$(BINDIR)/ansi-$*

carla-%_run: $(BINDIR)/carla-%
# valgrind $(BINDIR)/carla-$*
# # valgrind $(BINDIR)/carla-$*
valgrind --leak-check=full --show-leak-kinds=all --suppressions=valgrind.supp $(BINDIR)/carla-$*

# ---------------------------------------------------------------------------------------------------------------------


+ 40
- 2
source/tests/carla-host-plugin.c View File

@@ -105,6 +105,12 @@ int main(void)
assert(plugins_count != 0);
assert(plugin_descriptors != NULL);

assert(carla_add_plugin(rack_host_handle, BINARY_NATIVE, PLUGIN_VST2, "../../bin/CarlaRack.so", "", "", 0, NULL, 0x0));
assert(carla_add_plugin(rack_host_handle, BINARY_NATIVE, PLUGIN_VST2, "../../bin/CarlaPatchbay.so", "", "", 0, NULL, 0x0));

assert(carla_add_plugin(patchbay_host_handle, BINARY_NATIVE, PLUGIN_VST2, "../../bin/CarlaRack.so", "", "", 0, NULL, 0x0));
assert(carla_add_plugin(patchbay_host_handle, BINARY_NATIVE, PLUGIN_VST2, "../../bin/CarlaPatchbay.so", "", "", 0, NULL, 0x0));

for (uint32_t i=0; i<plugins_count; ++i)
{
const NativePluginDescriptor* const plugin_descriptor = &plugin_descriptors[i];
@@ -121,11 +127,43 @@ int main(void)
}
}

rack->cleanup(patchbay_handle);
carla_juce_idle();

plugins_count = carla_get_current_plugin_count(rack_host_handle);

for (uint32_t i=0; i<plugins_count; ++i)
{
carla_get_plugin_info(rack_host_handle, i);
carla_get_audio_port_count_info(rack_host_handle, i);
carla_get_midi_port_count_info(rack_host_handle, i);
carla_get_parameter_count_info(rack_host_handle, i);
}

plugins_count = carla_get_current_plugin_count(patchbay_host_handle);

for (uint32_t i=0; i<plugins_count; ++i)
{
carla_get_plugin_info(patchbay_host_handle, i);
carla_get_audio_port_count_info(patchbay_host_handle, i);
carla_get_midi_port_count_info(patchbay_host_handle, i);
carla_get_parameter_count_info(patchbay_host_handle, i);
}

carla_juce_idle();

#if 0
carla_set_engine_about_to_close(rack_host_handle);
carla_remove_all_plugins(rack_host_handle);

carla_set_engine_about_to_close(patchbay_host_handle);
carla_remove_all_plugins(patchbay_host_handle);
#endif

rack->cleanup(rack_handle);
rack->cleanup(patchbay_handle);

carla_host_handle_free(patchbay_host_handle);
carla_host_handle_free(rack_host_handle);
carla_host_handle_free(patchbay_host_handle);

carla_juce_cleanup();
return 0;


+ 7
- 0
source/tests/valgrind.supp View File

@@ -12,3 +12,10 @@
...
fun:_dl_init
}
{
tls variables
Memcheck:Leak
fun:malloc
...
fun:tls_get_addr_tail
}

Loading…
Cancel
Save