VISIR Pipeline Reference Manual  4.1.0
recipe_main.c
1 /* $Id: recipe_main.c,v 1.8 2011-10-05 10:09:50 llundin Exp $
2  *
3  * This file is part of the VISIR Pipeline
4  * Copyright (C) 2002,2003 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * $Author: llundin $
23  * $Date: 2011-10-05 10:09:50 $
24  * $Revision: 1.8 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 
32 /*-----------------------------------------------------------------------------
33  Includes
34  -----------------------------------------------------------------------------*/
35 
36 #include "visir_recipes_test.h"
37 
38 #include <irplib_plugin.h>
39 
40 
41 
42 /*----------------------------------------------------------------------------*/
46 /*----------------------------------------------------------------------------*/
47 
50 /*-----------------------------------------------------------------------------
51  Function definitions
52  -----------------------------------------------------------------------------*/
53 
54 /*----------------------------------------------------------------------------*/
60 /*----------------------------------------------------------------------------*/
61 int main(void)
62 {
63 
64  const char * tags[] = {
65  "ERROR_TAG",
66  "IMG_STD_CATALOG",
67  "SPEC_CAL_QEFF",
68  "SPEC_CAL_LINES",
69  "SPEC_STD_CATALOG",
70  "CALIB",
71  "CALIB",
72  "CALIB",
73  "CALIB",
74  "CALIB",
75  "CALIB",
76  "CALIB",
77  "CALIB",
78  "RRRECIPE_DOCATG_RAW",
79  "RRRECIPE_DOCATG_RAW",
80  "RRRECIPE_DOCATG_RAW",
81  "IIINSTRUMENT_DOCATG_FLAT",
82  "IIINSTRUMENT_DOCATG_FLAT",
83  "IIINSTRUMENT_DOCATG_FLAT",
84  "RAW",
85  "RAW",
86  "RAW",
87  "RAW",
88  "RAW",
89  "RAW",
90  "RAW",
91  "RAW",
92  "RAW",
93  "RAW",
94  "RAW",
95  "RAW",
96  "RAW",
97  "RAW",
98  "RAW",
99  "PRO_MASTER_DARK",
100  "PRO_MASTER_DARK",
101  "PRO_MASTER_DARK",
102  "CUBE2",
103  "CUBE2",
104  "CUBE2",
105  "PRO_OBJECT_NODDING_STACKED",
106  "PRO_OBJECT_NODDING_STACKED",
107  "PRO_OBJECT_NODDING_STACKED",
108  "CAL_DARK",
109  "CAL_DARK",
110  "CAL_DARK",
111  "CAL_DETLIN_DARK",
112  "CAL_DETLIN_DARK",
113  "CAL_DETLIN_DARK",
114  "CAL_FLAT_LAMP",
115  "CAL_FLAT_LAMP",
116  "CAL_FLAT_LAMP",
117  "CAL_FLAT_TW",
118  "IM_JITTER_OBJ",
119  "IM_JITTER_OBJ",
120  "IM_JITTER_OBJ",
121  "IM_CAL_ACHRO",
122  "IM_CAL_ACHRO",
123  "IM_CAL_ACHRO",
124  "IM_OBS_CHO_NOD_JIT",
125  "IM_OBS_CHO_NOD_JIT",
126  "IM_OBS_CHO_NOD_JIT",
127  "IM_OBS_CHO_JIT",
128  "IM_OBS_CHO_JIT",
129  "IM_OBS_CHO_JIT",
130  "IM_OBS_NOD_JIT",
131  "IM_OBS_NOD_JIT",
132  "IM_OBS_NOD_JIT",
133  "IM_OBS_DIR_JIT",
134  "IM_OBS_DIR_JIT",
135  "IM_OBS_DIR_JIT",
136  "IM_CAL_FLAT",
137  "IM_CAL_FLAT",
138  "IM_CAL_FLAT",
139  "IM_TEC_FOCUS",
140  "IM_TEC_FOCUS",
141  "IM_TEC_FOCUS",
142  "IM_CAL_ILLU",
143  "IM_CAL_ILLU",
144  "IM_CAL_ILLU",
145  "IM_CAL_PFOV_BIN",
146  "IM_CAL_PFOV_BIN",
147  "IM_CAL_PFOV_BIN",
148  "IM_CAL_PFOV_TEL",
149  "IM_CAL_PFOV_TEL",
150  "IM_CAL_PFOV_TEL",
151  "IM_CAL_PHOT",
152  "IM_CAL_PHOT",
153  "IM_CAL_PHOT",
154  "IM_CAL_PSF",
155  "IM_CAL_PSF",
156  "IM_CAL_PSF",
157  "IM_TEC_TRANS",
158  "IM_TEC_TRANS",
159  "IM_TEC_TRANS",
160  "SPEC_OBS_HRG",
161  "SPEC_OBS_HRG",
162  "SPEC_OBS_HRG",
163  "SPEC_OBS_LMR",
164  "SPEC_OBS_LMR",
165  "SPEC_OBS_LMR",
166  "SPEC_CAL_PHOT",
167  "SPEC_CAL_PHOT",
168  "SPEC_CAL_PHOT",
169  "SPEC_CAL_HRG_WCAL",
170  "SPEC_CAL_HRG_WCAL",
171  "SPEC_CAL_HRG_WCAL",
172  "SPEC_CAL_LMR_WCAL",
173  "SPEC_CAL_LMR_WCAL",
174  "SPEC_CAL_LMR_WCAL",
175  "SPC_OBS",
176  "SPC_OBS",
177  "SPC_OBS"
178  };
179 
180  cpl_pluginlist * pluginlist;
181  const size_t ntags = sizeof(tags) / sizeof(char*);
182 
183  cpl_test_init(PACKAGE_BUGREPORT, CPL_MSG_WARNING);
184 
185  pluginlist = cpl_pluginlist_new();
186 
187  cpl_test_zero(cpl_plugin_get_info(pluginlist));
188 
189  cpl_test_zero(irplib_plugin_test(pluginlist, ntags, tags));
190  if (getenv("RECIPE_UNIT_TEST") != NULL &&
191  cpl_pluginlist_find(pluginlist, "visir_util_clip")) {
192  cpl_msg_warning(cpl_func, "Extra test 1 of: visir_util_clip");
193  visir_util_clip_test_one(pluginlist);
194  }
195 
196  cpl_pluginlist_delete(pluginlist);
197 
198  return cpl_test_end(0);
199 }
200 
void visir_util_clip_test_one(cpl_pluginlist *self)
Find a plugin and submit it to some tests.
int main(void)
Find a plugin and submit it to some tests.
Definition: recipe_main.c:61