clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 50e8c69788d8d44d20936ecd2bd90d6f64c8e9b6
parent 50885fcef3a7fb651110863dbfcc69372e182ff8
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date:   Wed, 12 Oct 2016 08:51:50 +0200

Remove the tests folder

Diffstat:
MCMakeLists.txt | 1-
Dtests/CMakeLists.txt | 1-
Dtests/dlopen/CMakeLists.txt | 6------
Dtests/dlopen/README | 29-----------------------------
Dtests/dlopen/dlopen.c | 51---------------------------------------------------
Dtests/dlopen/lib1.c | 16----------------
Dtests/dlopen/lib2.c | 1-
Dtests/dlopen/libs.h | 2--
8 files changed, 0 insertions(+), 107 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -7,4 +7,3 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") include_directories(include) add_subdirectory(tools) add_subdirectory(examples) -add_subdirectory(tests) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt @@ -1 +0,0 @@ -add_subdirectory(dlopen) diff --git a/tests/dlopen/CMakeLists.txt b/tests/dlopen/CMakeLists.txt @@ -1,6 +0,0 @@ -add_library(global1 SHARED lib1.c) -add_library(global2 SHARED lib2.c) -target_link_libraries(global1 global2) - -add_executable(dlopen dlopen.c) -target_link_libraries(dlopen dl) diff --git a/tests/dlopen/README b/tests/dlopen/README @@ -1,29 +0,0 @@ -This test shows that symbols are shared across the -libraries if instanciated many times. - -to run the test build the sources and run: - -$ cp libglobal1.so libglobal11.so -$ ./dlopen ./libglobal1.so ./libglobal1.so -&global_value1: 0x7fce5d356b50, global_value1: 78 -&global_value2: 0x7fce5d1558a8, global_value2: 32 -&global_value1: 0x7fce5d356b50, global_value1: 780 -&global_value2: 0x7fce5d1558a8, global_value2: 320 -syms: 0x7fce5d156780, 0x7fce5d156780 -&global_value1: 0x7fce5d356b50, global_value1: 78 -&global_value2: 0x7fce5d1558a8, global_value2: 32 -&global_value1: 0x7fce5d356b50, global_value1: 78 -&global_value2: 0x7fce5d1558a8, global_value2: 32 -syms: 0x7fce5d156780, 0x7fce5d156780 -$ ./dlopen ./libglobal1.so ./libglobal11.so -&global_value1: 0x7f682aa58b50, global_value1: 78 -&global_value2: 0x7f682a8578a8, global_value2: 32 -&global_value1: 0x7f682a656b50, global_value1: 78 -&global_value2: 0x7f682a8578a8, global_value2: 320 -syms: 0x7f682a858780, 0x7f682a456780 -&global_value1: 0x7f682aa58b50, global_value1: 78 -&global_value2: 0x7f682a8578a8, global_value2: 32 -&global_value1: 0x7f682aa58b50, global_value1: 78 -&global_value2: 0x7f682a8578a8, global_value2: 32 -syms: 0x7f682a858780, 0x7f682a858780 -$ diff --git a/tests/dlopen/dlopen.c b/tests/dlopen/dlopen.c @@ -1,51 +0,0 @@ -#include <stdio.h> -#include <dlfcn.h> - -#ifndef RTLD_DEEPBIND -# define RTLD_DEEPBIND 0 -#endif - -int main(int argc, char **argv) -{ - void *handle1 = dlopen(argv[1], RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND); - if (!handle1) { - printf("%s\n", dlerror()); - return 1; - } - - void *sym1 = dlsym(handle1, "dump"); - ((void (*)(void))sym1)(); - - void *handle2 = dlopen(argv[2], RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND); - if (!handle2) - return 1; - - void *sym2 = dlsym(handle2, "dump"); - ((void (*)(void))sym2)(); - - printf("syms: %p, %p\n", sym1, sym2); - - dlclose(handle1); - dlclose(handle2); - - handle1 = dlopen(argv[1], RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND); - if (!handle1) { - printf("%s\n", dlerror()); - return 1; - } - - sym1 = dlsym(handle1, "dump"); - ((void (*)(void))sym1)(); - dlclose(handle1); - - handle2 = dlopen(argv[2], RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND); - if (!handle2) - return 1; - - sym2 = dlsym(handle2, "dump"); - ((void (*)(void))sym2)(); - dlclose(handle1); - - printf("syms: %p, %p\n", sym1, sym2); - return 0; -} diff --git a/tests/dlopen/lib1.c b/tests/dlopen/lib1.c @@ -1,16 +0,0 @@ -#include <stdio.h> - -#include "libs.h" - -int global_value1 = 78; - -void dump(void) -{ - printf("&global_value1: %p, global_value1: %d\n", - &global_value1, global_value1); - printf("&global_value2: %p, global_value2: %d\n", - &global_value2, global_value2); - - global_value1 *= 10; - global_value2 *= 10; -} diff --git a/tests/dlopen/lib2.c b/tests/dlopen/lib2.c @@ -1 +0,0 @@ -int global_value2 = 32; diff --git a/tests/dlopen/libs.h b/tests/dlopen/libs.h @@ -1,2 +0,0 @@ -extern int global_value1; -extern int global_value2;