aboutsummaryrefslogtreecommitdiff
path: root/src/main/test_trivial.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/test_trivial.c')
-rw-r--r--src/main/test_trivial.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main/test_trivial.c b/src/main/test_trivial.c
index fac9a91..b0860b4 100644
--- a/src/main/test_trivial.c
+++ b/src/main/test_trivial.c
@@ -30,34 +30,36 @@ static int
30testLoadPlugins (enum EXTRACTOR_Options policy) 30testLoadPlugins (enum EXTRACTOR_Options policy)
31{ 31{
32 struct EXTRACTOR_PluginList *pl; 32 struct EXTRACTOR_PluginList *pl;
33 33
34 if (NULL == (pl = EXTRACTOR_plugin_add_defaults (policy))) 34 if (NULL == (pl = EXTRACTOR_plugin_add_defaults (policy)))
35 { 35 {
36 fprintf (stderr, 36 fprintf (stderr,
37 "Failed to load default plugins!\n"); 37 "Failed to load default plugins!\n");
38 return 1; 38 return 1;
39 } 39 }
40 EXTRACTOR_plugin_remove_all (pl); 40 EXTRACTOR_plugin_remove_all (pl);
41 return 0; 41 return 0;
42} 42}
43 43
44
44int 45int
45main (int argc, char *argv[]) 46main (int argc, char *argv[])
46{ 47{
47 int ret = 0; 48 int ret = 0;
48 49
49 50
50 /* change environment to find 'extractor_test' plugin which is 51 /* change environment to find 'extractor_test' plugin which is
51 not installed but should be in the current directory (or .libs) 52 not installed but should be in the current directory (or .libs)
52 on 'make check' */ 53 on 'make check' */
53 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 54 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/"))
54 fprintf (stderr, 55 fprintf (stderr,
55 "Failed to update my environment, plugin loading may fail: %s\n", 56 "Failed to update my environment, plugin loading may fail: %s\n",
56 strerror (errno)); 57 strerror (errno));
57 ret += testLoadPlugins (EXTRACTOR_OPTION_DEFAULT_POLICY); 58 ret += testLoadPlugins (EXTRACTOR_OPTION_DEFAULT_POLICY);
58 ret += testLoadPlugins (EXTRACTOR_OPTION_DEFAULT_POLICY); 59 ret += testLoadPlugins (EXTRACTOR_OPTION_DEFAULT_POLICY);
59 ret += testLoadPlugins (EXTRACTOR_OPTION_DEFAULT_POLICY); 60 ret += testLoadPlugins (EXTRACTOR_OPTION_DEFAULT_POLICY);
60 return ret; 61 return ret;
61} 62}
62 63
64
63/* end of test_trivial.c */ 65/* end of test_trivial.c */