aboutsummaryrefslogtreecommitdiff
path: root/src/main/test_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/test_file.c')
-rw-r--r--src/main/test_file.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main/test_file.c b/src/main/test_file.c
index a2d6a5e..f731e7d 100644
--- a/src/main/test_file.c
+++ b/src/main/test_file.c
@@ -135,7 +135,7 @@ main (int argc, char *argv[])
135 /* change environment to find 'extractor_test' plugin which is 135 /* change environment to find 'extractor_test' plugin which is
136 not installed but should be in the current directory (or .libs) 136 not installed but should be in the current directory (or .libs)
137 on 'make check' */ 137 on 'make check' */
138 if (0 != putenv ("LIBEXTRACTOR_PREFIX=." PATH_SEPARATOR_STR ".libs/")) 138 if (0 != putenv ("LIBEXTRACTOR_PREFIX=.:.libs/"))
139 fprintf (stderr, 139 fprintf (stderr,
140 "Failed to update my environment, plugin loading may fail: %s\n", 140 "Failed to update my environment, plugin loading may fail: %s\n",
141 strerror (errno)); 141 strerror (errno));
@@ -143,10 +143,18 @@ main (int argc, char *argv[])
143 EXTRACTOR_OPTION_DEFAULT_POLICY); 143 EXTRACTOR_OPTION_DEFAULT_POLICY);
144 if (NULL == pl) 144 if (NULL == pl)
145 { 145 {
146 fprintf (stderr, "failed to load test plugin\n"); 146 fprintf (stderr,
147 "failed to load test plugin\n");
147 return 1; 148 return 1;
148 } 149 }
149 EXTRACTOR_extract (pl, "test_file.dat", NULL, 0, &process_replies, 150 if (0 != access ("test_file.dat",
151 R_OK))
152 return 77;
153 EXTRACTOR_extract (pl,
154 "test_file.dat",
155 NULL,
156 0,
157 &process_replies,
150 "main-cls"); 158 "main-cls");
151 EXTRACTOR_plugin_remove_all (pl); 159 EXTRACTOR_plugin_remove_all (pl);
152 return ret; 160 return ret;