LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   plugin system and testing (https://www.linuxquestions.org/questions/programming-9/plugin-system-and-testing-421475/)

yogeshm02 03-04-2006 01:59 AM

plugin system and testing
 
Hi

I'm developing a LARGE application which uses plugins for its work. I've following doubts:
How to scan for available plugins while testing? Should I use separate code for scaning plugin while testing (using preprocessor directives) or some other method? Please specify.

I'm currently using just plain libs for testing.

Thanks

aluser 03-04-2006 11:22 AM

I think libtool's libltdl has some facilities for searching for plugins.

You haven't given a lot of information about what a plugin *means* for your app. A typical way to do it is have all the apps plugins reside in some directory; you could change this directory to something in your home directory for debugging, or read it out of an environment variable or config file. e.g. have the app look in /usr/lib/myapp/plugins by default, but use the value of $MYAPP_PLUGIN_PATH if it's set. You could even have that be a colon-separated list of directories.

I even sort of remember libltdl supporting a list of directories to seach.

yogeshm02 03-05-2006 01:12 AM

Thanks, it did not came to my mind.

I used the term 'plugin' incorrectly. Actually my app is growing day-by-day(expectedly) and I had separated it (from the earlier stages) in small modules (currently statically linked) based on usage, so that those may only be loaded if there is need. Also, user has the option to disable a certain module (hence the requirement of scanning for available modules).


All times are GMT -5. The time now is 07:16 PM.