Changeset 16177
- Timestamp:
- Jan 22, 2008, 10:30:49 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
ippTools/scripts/dettest.sh (modified) (1 diff)
-
ippdb/src/ippdb.c (modified) (50 diffs)
-
ippdb/src/ippdb.h (modified) (15 diffs)
-
ippdb/tests/alloc.c (modified) (10 diffs)
-
ippdb/tests/insert.c (modified) (5 diffs)
-
ippdb/tests/insertobject.c (modified) (5 diffs)
-
ippdb/tests/metadatafromobject.c (modified) (10 diffs)
-
ippdb/tests/objectfrommetadata.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/scripts/dettest.sh
r16170 r16177 5 5 det_id=1 6 6 7 ./regtest.sh - detrend|| exit 17 ./regtest.sh -end_stage reg || exit 1 8 8 9 9 det_id=`dettool -definebyquery -det_type bias -inst gpc -filelevel fpa -select_exp_type bias -airmass_min 1 -airmass_max 10 -exp_time_min 10 -exp_time_max 30.0 -workdir file::///some/path -simple | cut -f1 -d" "` || exit 1 -
trunk/ippdb/src/ippdb.c
r16154 r16177 2857 2857 static void newExpRowFree(newExpRow *object); 2858 2858 2859 newExpRow *newExpRowAlloc(psS64 exp_id, const char *tmp_exp_name, const char *tmp_camera, const char *tmp_telescope, const char *state, const char *workdir, const char *workdir_state, const char *reduction )2859 newExpRow *newExpRowAlloc(psS64 exp_id, const char *tmp_exp_name, const char *tmp_camera, const char *tmp_telescope, const char *state, const char *workdir, const char *workdir_state, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage) 2860 2860 { 2861 2861 newExpRow *_object; … … 2872 2872 _object->workdir_state = psStringCopy(workdir_state); 2873 2873 _object->reduction = psStringCopy(reduction); 2874 _object->dvodb = psStringCopy(dvodb); 2875 _object->tess_id = psStringCopy(tess_id); 2876 _object->end_stage = psStringCopy(end_stage); 2874 2877 2875 2878 return _object; … … 2885 2888 psFree(object->workdir_state); 2886 2889 psFree(object->reduction); 2890 psFree(object->dvodb); 2891 psFree(object->tess_id); 2892 psFree(object->end_stage); 2887 2893 } 2888 2894 … … 2930 2936 return false; 2931 2937 } 2938 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) { 2939 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); 2940 psFree(md); 2941 return false; 2942 } 2943 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, "64")) { 2944 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 2945 psFree(md); 2946 return false; 2947 } 2948 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, "Key", "64")) { 2949 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 2950 psFree(md); 2951 return false; 2952 } 2932 2953 2933 2954 bool status = psDBCreateTable(dbh, NEWEXP_TABLE_NAME, md); … … 2943 2964 } 2944 2965 2945 bool newExpInsert(psDB * dbh, psS64 exp_id, const char *tmp_exp_name, const char *tmp_camera, const char *tmp_telescope, const char *state, const char *workdir, const char *workdir_state, const char *reduction )2966 bool newExpInsert(psDB * dbh, psS64 exp_id, const char *tmp_exp_name, const char *tmp_camera, const char *tmp_telescope, const char *state, const char *workdir, const char *workdir_state, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage) 2946 2967 { 2947 2968 psMetadata *md = psMetadataAlloc(); … … 2983 3004 if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) { 2984 3005 psError(PS_ERR_UNKNOWN, false, "failed to add item reduction"); 3006 psFree(md); 3007 return false; 3008 } 3009 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) { 3010 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); 3011 psFree(md); 3012 return false; 3013 } 3014 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, tess_id)) { 3015 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 3016 psFree(md); 3017 return false; 3018 } 3019 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, end_stage)) { 3020 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 2985 3021 psFree(md); 2986 3022 return false; … … 3009 3045 bool newExpInsertObject(psDB *dbh, newExpRow *object) 3010 3046 { 3011 return newExpInsert(dbh, object->exp_id, object->tmp_exp_name, object->tmp_camera, object->tmp_telescope, object->state, object->workdir, object->workdir_state, object->reduction );3047 return newExpInsert(dbh, object->exp_id, object->tmp_exp_name, object->tmp_camera, object->tmp_telescope, object->state, object->workdir, object->workdir_state, object->reduction, object->dvodb, object->tess_id, object->end_stage); 3012 3048 } 3013 3049 … … 3122 3158 return false; 3123 3159 } 3160 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) { 3161 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); 3162 psFree(md); 3163 return false; 3164 } 3165 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, object->tess_id)) { 3166 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 3167 psFree(md); 3168 return false; 3169 } 3170 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, object->end_stage)) { 3171 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 3172 psFree(md); 3173 return false; 3174 } 3124 3175 3125 3176 … … 3171 3222 return false; 3172 3223 } 3173 3174 return newExpRowAlloc(exp_id, tmp_exp_name, tmp_camera, tmp_telescope, state, workdir, workdir_state, reduction); 3224 char* dvodb = psMetadataLookupPtr(&status, md, "dvodb"); 3225 if (!status) { 3226 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb"); 3227 return false; 3228 } 3229 char* tess_id = psMetadataLookupPtr(&status, md, "tess_id"); 3230 if (!status) { 3231 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item tess_id"); 3232 return false; 3233 } 3234 char* end_stage = psMetadataLookupPtr(&status, md, "end_stage"); 3235 if (!status) { 3236 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item end_stage"); 3237 return false; 3238 } 3239 3240 return newExpRowAlloc(exp_id, tmp_exp_name, tmp_camera, tmp_telescope, state, workdir, workdir_state, reduction, dvodb, tess_id, end_stage); 3175 3241 } 3176 3242 psArray *newExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 3613 3679 static void rawExpRowFree(rawExpRow *object); 3614 3680 3615 rawExpRow *rawExpRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char * filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, psS16 fault)3681 rawExpRow *rawExpRowAlloc(psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, psS16 fault) 3616 3682 { 3617 3683 rawExpRow *_object; … … 3630 3696 _object->workdir = psStringCopy(workdir); 3631 3697 _object->reduction = psStringCopy(reduction); 3698 _object->dvodb = psStringCopy(dvodb); 3699 _object->tess_id = psStringCopy(tess_id); 3700 _object->end_stage = psStringCopy(end_stage); 3632 3701 _object->filter = psStringCopy(filter); 3633 3702 _object->comment = psStringCopy(comment); … … 3688 3757 psFree(object->workdir); 3689 3758 psFree(object->reduction); 3759 psFree(object->dvodb); 3760 psFree(object->tess_id); 3761 psFree(object->end_stage); 3690 3762 psFree(object->filter); 3691 3763 psFree(object->comment); … … 3746 3818 return false; 3747 3819 } 3820 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) { 3821 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); 3822 psFree(md); 3823 return false; 3824 } 3825 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, "64")) { 3826 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 3827 psFree(md); 3828 return false; 3829 } 3830 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, "Key", "64")) { 3831 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 3832 psFree(md); 3833 return false; 3834 } 3748 3835 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, "64")) { 3749 3836 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 3974 4061 } 3975 4062 3976 bool rawExpInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char * filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, psS16 fault)4063 bool rawExpInsert(psDB * dbh, psS64 exp_id, const char *exp_name, const char *camera, const char *telescope, psTime* dateobs, const char *exp_tag, const char *exp_type, const char *filelevel, const char *workdir, const char *reduction, const char *dvodb, const char *tess_id, const char *end_stage, const char *filter, const char *comment, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF32 sat_pixel_frac, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, psF32 m1_x, psF32 m1_y, psF32 m1_z, psF32 m1_tip, psF32 m1_tilt, psF32 m2_x, psF32 m2_y, psF32 m2_z, psF32 m2_tip, psF32 m2_tilt, psF32 env_temperature, psF32 env_humidity, psF32 env_wind_speed, psF32 env_wind_dir, psF32 teltemp_m1, psF32 teltemp_m1cell, psF32 teltemp_m2, psF32 teltemp_spider, psF32 teltemp_truss, psF32 teltemp_extra, psF32 pon_time, psF64 user_1, psF64 user_2, psF64 user_3, psF64 user_4, psF64 user_5, const char *object, psF32 solang, psS16 fault) 3977 4064 { 3978 4065 psMetadata *md = psMetadataAlloc(); … … 4024 4111 if (!psMetadataAdd(md, PS_LIST_TAIL, "reduction", PS_DATA_STRING, NULL, reduction)) { 4025 4112 psError(PS_ERR_UNKNOWN, false, "failed to add item reduction"); 4113 psFree(md); 4114 return false; 4115 } 4116 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) { 4117 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); 4118 psFree(md); 4119 return false; 4120 } 4121 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, tess_id)) { 4122 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 4123 psFree(md); 4124 return false; 4125 } 4126 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, end_stage)) { 4127 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 4026 4128 psFree(md); 4027 4129 return false; … … 4265 4367 bool rawExpInsertObject(psDB *dbh, rawExpRow *object) 4266 4368 { 4267 return rawExpInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->exp_tag, object->exp_type, object->filelevel, object->workdir, object->reduction, object-> filter, object->comment, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->solang, object->fault);4369 return rawExpInsert(dbh, object->exp_id, object->exp_name, object->camera, object->telescope, object->dateobs, object->exp_tag, object->exp_type, object->filelevel, object->workdir, object->reduction, object->dvodb, object->tess_id, object->end_stage, object->filter, object->comment, object->airmass, object->ra, object->decl, object->exp_time, object->sat_pixel_frac, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->m1_x, object->m1_y, object->m1_z, object->m1_tip, object->m1_tilt, object->m2_x, object->m2_y, object->m2_z, object->m2_tip, object->m2_tilt, object->env_temperature, object->env_humidity, object->env_wind_speed, object->env_wind_dir, object->teltemp_m1, object->teltemp_m1cell, object->teltemp_m2, object->teltemp_spider, object->teltemp_truss, object->teltemp_extra, object->pon_time, object->user_1, object->user_2, object->user_3, object->user_4, object->user_5, object->object, object->solang, object->fault); 4268 4370 } 4269 4371 … … 4388 4490 return false; 4389 4491 } 4492 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) { 4493 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); 4494 psFree(md); 4495 return false; 4496 } 4497 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, object->tess_id)) { 4498 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 4499 psFree(md); 4500 return false; 4501 } 4502 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, object->end_stage)) { 4503 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 4504 psFree(md); 4505 return false; 4506 } 4390 4507 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, object->filter)) { 4391 4508 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 4662 4779 return false; 4663 4780 } 4781 char* dvodb = psMetadataLookupPtr(&status, md, "dvodb"); 4782 if (!status) { 4783 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dvodb"); 4784 return false; 4785 } 4786 char* tess_id = psMetadataLookupPtr(&status, md, "tess_id"); 4787 if (!status) { 4788 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item tess_id"); 4789 return false; 4790 } 4791 char* end_stage = psMetadataLookupPtr(&status, md, "end_stage"); 4792 if (!status) { 4793 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item end_stage"); 4794 return false; 4795 } 4664 4796 char* filter = psMetadataLookupPtr(&status, md, "filter"); 4665 4797 if (!status) { … … 4878 5010 } 4879 5011 4880 return rawExpRowAlloc(exp_id, exp_name, camera, telescope, dateobs, exp_tag, exp_type, filelevel, workdir, reduction, filter, comment, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, solang, fault);5012 return rawExpRowAlloc(exp_id, exp_name, camera, telescope, dateobs, exp_tag, exp_type, filelevel, workdir, reduction, dvodb, tess_id, end_stage, filter, comment, airmass, ra, decl, exp_time, sat_pixel_frac, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, m1_x, m1_y, m1_z, m1_tip, m1_tilt, m2_x, m2_y, m2_z, m2_tip, m2_tilt, env_temperature, env_humidity, env_wind_speed, env_wind_dir, teltemp_m1, teltemp_m1cell, teltemp_m2, teltemp_spider, teltemp_truss, teltemp_extra, pon_time, user_1, user_2, user_3, user_4, user_5, object, solang, fault); 4881 5013 } 4882 5014 psArray *rawExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 6680 6812 static void chipRunRowFree(chipRunRow *object); 6681 6813 6682 chipRunRow *chipRunRowAlloc(psS64 chip_id, psS64 exp_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *reduction, const char *expgroup, const char *dvodb )6814 chipRunRow *chipRunRowAlloc(psS64 chip_id, psS64 exp_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *reduction, const char *expgroup, const char *dvodb, const char *tess_id, const char *end_stage) 6683 6815 { 6684 6816 chipRunRow *_object; … … 6696 6828 _object->expgroup = psStringCopy(expgroup); 6697 6829 _object->dvodb = psStringCopy(dvodb); 6830 _object->tess_id = psStringCopy(tess_id); 6831 _object->end_stage = psStringCopy(end_stage); 6698 6832 6699 6833 return _object; … … 6709 6843 psFree(object->expgroup); 6710 6844 psFree(object->dvodb); 6845 psFree(object->tess_id); 6846 psFree(object->end_stage); 6711 6847 } 6712 6848 … … 6759 6895 return false; 6760 6896 } 6897 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, "64")) { 6898 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 6899 psFree(md); 6900 return false; 6901 } 6902 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, "Key", "64")) { 6903 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 6904 psFree(md); 6905 return false; 6906 } 6761 6907 6762 6908 bool status = psDBCreateTable(dbh, CHIPRUN_TABLE_NAME, md); … … 6772 6918 } 6773 6919 6774 bool chipRunInsert(psDB * dbh, psS64 chip_id, psS64 exp_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *reduction, const char *expgroup, const char *dvodb )6920 bool chipRunInsert(psDB * dbh, psS64 chip_id, psS64 exp_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *reduction, const char *expgroup, const char *dvodb, const char *tess_id, const char *end_stage) 6775 6921 { 6776 6922 psMetadata *md = psMetadataAlloc(); … … 6817 6963 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) { 6818 6964 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); 6965 psFree(md); 6966 return false; 6967 } 6968 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, tess_id)) { 6969 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 6970 psFree(md); 6971 return false; 6972 } 6973 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, end_stage)) { 6974 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 6819 6975 psFree(md); 6820 6976 return false; … … 6843 6999 bool chipRunInsertObject(psDB *dbh, chipRunRow *object) 6844 7000 { 6845 return chipRunInsert(dbh, object->chip_id, object->exp_id, object->state, object->workdir, object->workdir_state, object->label, object->reduction, object->expgroup, object->dvodb );7001 return chipRunInsert(dbh, object->chip_id, object->exp_id, object->state, object->workdir, object->workdir_state, object->label, object->reduction, object->expgroup, object->dvodb, object->tess_id, object->end_stage); 6846 7002 } 6847 7003 … … 6961 7117 return false; 6962 7118 } 7119 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, object->tess_id)) { 7120 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 7121 psFree(md); 7122 return false; 7123 } 7124 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, object->end_stage)) { 7125 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 7126 psFree(md); 7127 return false; 7128 } 6963 7129 6964 7130 … … 7015 7181 return false; 7016 7182 } 7017 7018 return chipRunRowAlloc(chip_id, exp_id, state, workdir, workdir_state, label, reduction, expgroup, dvodb); 7183 char* tess_id = psMetadataLookupPtr(&status, md, "tess_id"); 7184 if (!status) { 7185 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item tess_id"); 7186 return false; 7187 } 7188 char* end_stage = psMetadataLookupPtr(&status, md, "end_stage"); 7189 if (!status) { 7190 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item end_stage"); 7191 return false; 7192 } 7193 7194 return chipRunRowAlloc(chip_id, exp_id, state, workdir, workdir_state, label, reduction, expgroup, dvodb, tess_id, end_stage); 7019 7195 } 7020 7196 psArray *chipRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 8179 8355 static void camRunRowFree(camRunRow *object); 8180 8356 8181 camRunRow *camRunRowAlloc(psS64 cam_id, psS64 chip_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *reduction, const char *expgroup, const char *dvodb )8357 camRunRow *camRunRowAlloc(psS64 cam_id, psS64 chip_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *reduction, const char *expgroup, const char *dvodb, const char *tess_id, const char *end_stage) 8182 8358 { 8183 8359 camRunRow *_object; … … 8195 8371 _object->expgroup = psStringCopy(expgroup); 8196 8372 _object->dvodb = psStringCopy(dvodb); 8373 _object->tess_id = psStringCopy(tess_id); 8374 _object->end_stage = psStringCopy(end_stage); 8197 8375 8198 8376 return _object; … … 8208 8386 psFree(object->expgroup); 8209 8387 psFree(object->dvodb); 8388 psFree(object->tess_id); 8389 psFree(object->end_stage); 8210 8390 } 8211 8391 … … 8258 8438 return false; 8259 8439 } 8440 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, "64")) { 8441 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 8442 psFree(md); 8443 return false; 8444 } 8445 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, "Key", "64")) { 8446 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 8447 psFree(md); 8448 return false; 8449 } 8260 8450 8261 8451 bool status = psDBCreateTable(dbh, CAMRUN_TABLE_NAME, md); … … 8271 8461 } 8272 8462 8273 bool camRunInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *reduction, const char *expgroup, const char *dvodb )8463 bool camRunInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *reduction, const char *expgroup, const char *dvodb, const char *tess_id, const char *end_stage) 8274 8464 { 8275 8465 psMetadata *md = psMetadataAlloc(); … … 8316 8506 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) { 8317 8507 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); 8508 psFree(md); 8509 return false; 8510 } 8511 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, tess_id)) { 8512 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 8513 psFree(md); 8514 return false; 8515 } 8516 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, end_stage)) { 8517 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 8318 8518 psFree(md); 8319 8519 return false; … … 8342 8542 bool camRunInsertObject(psDB *dbh, camRunRow *object) 8343 8543 { 8344 return camRunInsert(dbh, object->cam_id, object->chip_id, object->state, object->workdir, object->workdir_state, object->label, object->reduction, object->expgroup, object->dvodb );8544 return camRunInsert(dbh, object->cam_id, object->chip_id, object->state, object->workdir, object->workdir_state, object->label, object->reduction, object->expgroup, object->dvodb, object->tess_id, object->end_stage); 8345 8545 } 8346 8546 … … 8460 8660 return false; 8461 8661 } 8662 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, object->tess_id)) { 8663 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 8664 psFree(md); 8665 return false; 8666 } 8667 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, object->end_stage)) { 8668 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 8669 psFree(md); 8670 return false; 8671 } 8462 8672 8463 8673 … … 8514 8724 return false; 8515 8725 } 8516 8517 return camRunRowAlloc(cam_id, chip_id, state, workdir, workdir_state, label, reduction, expgroup, dvodb); 8726 char* tess_id = psMetadataLookupPtr(&status, md, "tess_id"); 8727 if (!status) { 8728 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item tess_id"); 8729 return false; 8730 } 8731 char* end_stage = psMetadataLookupPtr(&status, md, "end_stage"); 8732 if (!status) { 8733 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item end_stage"); 8734 return false; 8735 } 8736 8737 return camRunRowAlloc(cam_id, chip_id, state, workdir, workdir_state, label, reduction, expgroup, dvodb, tess_id, end_stage); 8518 8738 } 8519 8739 psArray *camRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 9551 9771 static void warpRunRowFree(warpRunRow *object); 9552 9772 9553 warpRunRow *warpRunRowAlloc(psS64 warp_id, const char *mode, const char *state, const char *workdir, const char * dvodb, psTime* registered)9773 warpRunRow *warpRunRowAlloc(psS64 warp_id, const char *mode, const char *state, const char *workdir, const char *workdir_state, const char *dvodb, const char *tess_id, const char *end_stage, psTime* registered) 9554 9774 { 9555 9775 warpRunRow *_object; … … 9562 9782 _object->state = psStringCopy(state); 9563 9783 _object->workdir = psStringCopy(workdir); 9784 _object->workdir_state = psStringCopy(workdir_state); 9564 9785 _object->dvodb = psStringCopy(dvodb); 9786 _object->tess_id = psStringCopy(tess_id); 9787 _object->end_stage = psStringCopy(end_stage); 9565 9788 _object->registered = psTimeCopy(registered); 9566 9789 … … 9573 9796 psFree(object->state); 9574 9797 psFree(object->workdir); 9798 psFree(object->workdir_state); 9575 9799 psFree(object->dvodb); 9800 psFree(object->tess_id); 9801 psFree(object->end_stage); 9576 9802 psFree(object->registered); 9577 9803 } … … 9600 9826 return false; 9601 9827 } 9828 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir_state", PS_DATA_STRING, "Key", "64")) { 9829 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir_state"); 9830 psFree(md); 9831 return false; 9832 } 9602 9833 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) { 9603 9834 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); … … 9605 9836 return false; 9606 9837 } 9838 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, "64")) { 9839 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 9840 psFree(md); 9841 return false; 9842 } 9843 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, "Key", "64")) { 9844 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 9845 psFree(md); 9846 return false; 9847 } 9607 9848 if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, NULL)) { 9608 9849 psError(PS_ERR_UNKNOWN, false, "failed to add item registered"); … … 9623 9864 } 9624 9865 9625 bool warpRunInsert(psDB * dbh, psS64 warp_id, const char *mode, const char *state, const char *workdir, const char * dvodb, psTime* registered)9866 bool warpRunInsert(psDB * dbh, psS64 warp_id, const char *mode, const char *state, const char *workdir, const char *workdir_state, const char *dvodb, const char *tess_id, const char *end_stage, psTime* registered) 9626 9867 { 9627 9868 psMetadata *md = psMetadataAlloc(); … … 9646 9887 return false; 9647 9888 } 9889 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir_state", PS_DATA_STRING, NULL, workdir_state)) { 9890 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir_state"); 9891 psFree(md); 9892 return false; 9893 } 9648 9894 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, dvodb)) { 9649 9895 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); 9896 psFree(md); 9897 return false; 9898 } 9899 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, tess_id)) { 9900 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 9901 psFree(md); 9902 return false; 9903 } 9904 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, end_stage)) { 9905 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 9650 9906 psFree(md); 9651 9907 return false; … … 9679 9935 bool warpRunInsertObject(psDB *dbh, warpRunRow *object) 9680 9936 { 9681 return warpRunInsert(dbh, object->warp_id, object->mode, object->state, object->workdir, object-> dvodb, object->registered);9937 return warpRunInsert(dbh, object->warp_id, object->mode, object->state, object->workdir, object->workdir_state, object->dvodb, object->tess_id, object->end_stage, object->registered); 9682 9938 } 9683 9939 … … 9772 10028 return false; 9773 10029 } 10030 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir_state", PS_DATA_STRING, NULL, object->workdir_state)) { 10031 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir_state"); 10032 psFree(md); 10033 return false; 10034 } 9774 10035 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) { 9775 10036 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); … … 9777 10038 return false; 9778 10039 } 10040 if (!psMetadataAdd(md, PS_LIST_TAIL, "tess_id", PS_DATA_STRING, NULL, object->tess_id)) { 10041 psError(PS_ERR_UNKNOWN, false, "failed to add item tess_id"); 10042 psFree(md); 10043 return false; 10044 } 10045 if (!psMetadataAdd(md, PS_LIST_TAIL, "end_stage", PS_DATA_STRING, NULL, object->end_stage)) { 10046 psError(PS_ERR_UNKNOWN, false, "failed to add item end_stage"); 10047 psFree(md); 10048 return false; 10049 } 9779 10050 if (!psMetadataAdd(md, PS_LIST_TAIL, "registered", PS_DATA_TIME, NULL, object->registered)) { 9780 10051 psError(PS_ERR_UNKNOWN, false, "failed to add item registered"); … … 9811 10082 return false; 9812 10083 } 10084 char* workdir_state = psMetadataLookupPtr(&status, md, "workdir_state"); 10085 if (!status) { 10086 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir_state"); 10087 return false; 10088 } 9813 10089 char* dvodb = psMetadataLookupPtr(&status, md, "dvodb"); 9814 10090 if (!status) { … … 9816 10092 return false; 9817 10093 } 10094 char* tess_id = psMetadataLookupPtr(&status, md, "tess_id"); 10095 if (!status) { 10096 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item tess_id"); 10097 return false; 10098 } 10099 char* end_stage = psMetadataLookupPtr(&status, md, "end_stage"); 10100 if (!status) { 10101 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item end_stage"); 10102 return false; 10103 } 9818 10104 psTime* registered = psMetadataLookupPtr(&status, md, "registered"); 9819 10105 if (!status) { … … 9822 10108 } 9823 10109 9824 return warpRunRowAlloc(warp_id, mode, state, workdir, dvodb, registered);10110 return warpRunRowAlloc(warp_id, mode, state, workdir, workdir_state, dvodb, tess_id, end_stage, registered); 9825 10111 } 9826 10112 psArray *warpRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) -
trunk/ippdb/src/ippdb.h
r16154 r16177 1591 1591 char *workdir_state; 1592 1592 char *reduction; 1593 char *dvodb; 1594 char *tess_id; 1595 char *end_stage; 1593 1596 } newExpRow; 1594 1597 … … 1606 1609 const char *workdir, 1607 1610 const char *workdir_state, 1608 const char *reduction 1611 const char *reduction, 1612 const char *dvodb, 1613 const char *tess_id, 1614 const char *end_stage 1609 1615 ); 1610 1616 … … 1643 1649 const char *workdir, 1644 1650 const char *workdir_state, 1645 const char *reduction 1651 const char *reduction, 1652 const char *dvodb, 1653 const char *tess_id, 1654 const char *end_stage 1646 1655 ); 1647 1656 … … 2010 2019 char *workdir; 2011 2020 char *reduction; 2021 char *dvodb; 2022 char *tess_id; 2023 char *end_stage; 2012 2024 char *filter; 2013 2025 char *comment; … … 2071 2083 const char *workdir, 2072 2084 const char *reduction, 2085 const char *dvodb, 2086 const char *tess_id, 2087 const char *end_stage, 2073 2088 const char *filter, 2074 2089 const char *comment, … … 2153 2168 const char *workdir, 2154 2169 const char *reduction, 2170 const char *dvodb, 2171 const char *tess_id, 2172 const char *end_stage, 2155 2173 const char *filter, 2156 2174 const char *comment, … … 2909 2927 char *expgroup; 2910 2928 char *dvodb; 2929 char *tess_id; 2930 char *end_stage; 2911 2931 } chipRunRow; 2912 2932 … … 2925 2945 const char *reduction, 2926 2946 const char *expgroup, 2927 const char *dvodb 2947 const char *dvodb, 2948 const char *tess_id, 2949 const char *end_stage 2928 2950 ); 2929 2951 … … 2963 2985 const char *reduction, 2964 2986 const char *expgroup, 2965 const char *dvodb 2987 const char *dvodb, 2988 const char *tess_id, 2989 const char *end_stage 2966 2990 ); 2967 2991 … … 3587 3611 char *expgroup; 3588 3612 char *dvodb; 3613 char *tess_id; 3614 char *end_stage; 3589 3615 } camRunRow; 3590 3616 … … 3603 3629 const char *reduction, 3604 3630 const char *expgroup, 3605 const char *dvodb 3631 const char *dvodb, 3632 const char *tess_id, 3633 const char *end_stage 3606 3634 ); 3607 3635 … … 3641 3669 const char *reduction, 3642 3670 const char *expgroup, 3643 const char *dvodb 3671 const char *dvodb, 3672 const char *tess_id, 3673 const char *end_stage 3644 3674 ); 3645 3675 … … 4242 4272 char *state; 4243 4273 char *workdir; 4274 char *workdir_state; 4244 4275 char *dvodb; 4276 char *tess_id; 4277 char *end_stage; 4245 4278 psTime* registered; 4246 4279 } warpRunRow; … … 4256 4289 const char *state, 4257 4290 const char *workdir, 4291 const char *workdir_state, 4258 4292 const char *dvodb, 4293 const char *tess_id, 4294 const char *end_stage, 4259 4295 psTime* registered 4260 4296 ); … … 4291 4327 const char *state, 4292 4328 const char *workdir, 4329 const char *workdir_state, 4293 4330 const char *dvodb, 4331 const char *tess_id, 4332 const char *end_stage, 4294 4333 psTime* registered 4295 4334 ); -
trunk/ippdb/tests/alloc.c
r15792 r16177 245 245 newExpRow *object; 246 246 247 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" );247 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string" ); 248 248 249 249 if (!object) { … … 283 283 exit(EXIT_FAILURE); 284 284 } 285 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 286 psFree(object); 287 exit(EXIT_FAILURE); 288 } 289 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 290 psFree(object); 291 exit(EXIT_FAILURE); 292 } 293 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 294 psFree(object); 295 exit(EXIT_FAILURE); 296 } 285 297 286 298 psFree(object); … … 315 327 rawExpRow *object; 316 328 317 object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16 );329 object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16 ); 318 330 319 331 if (!object) { … … 360 372 exit(EXIT_FAILURE); 361 373 } 374 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 375 psFree(object); 376 exit(EXIT_FAILURE); 377 } 378 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 379 psFree(object); 380 exit(EXIT_FAILURE); 381 } 382 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 383 psFree(object); 384 exit(EXIT_FAILURE); 385 } 362 386 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 363 387 psFree(object); … … 784 808 chipRunRow *object; 785 809 786 object = chipRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" );810 object = chipRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string" ); 787 811 788 812 if (!object) { … … 826 850 exit(EXIT_FAILURE); 827 851 } 852 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 853 psFree(object); 854 exit(EXIT_FAILURE); 855 } 856 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 857 psFree(object); 858 exit(EXIT_FAILURE); 859 } 828 860 829 861 psFree(object); … … 959 991 camRunRow *object; 960 992 961 object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" );993 object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string" ); 962 994 963 995 if (!object) { … … 1001 1033 exit(EXIT_FAILURE); 1002 1034 } 1035 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 1036 psFree(object); 1037 exit(EXIT_FAILURE); 1038 } 1039 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 1040 psFree(object); 1041 exit(EXIT_FAILURE); 1042 } 1003 1043 1004 1044 psFree(object); … … 1110 1150 warpRunRow *object; 1111 1151 1112 object = warpRunRowAlloc(-64, "a string", "a string", "a string", "a string", " 0001-01-01T00:00:00Z" );1152 object = warpRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z" ); 1113 1153 1114 1154 if (!object) { … … 1132 1172 exit(EXIT_FAILURE); 1133 1173 } 1174 if (strncmp(object->workdir_state, "a string", MAX_STRING_LENGTH)) { 1175 psFree(object); 1176 exit(EXIT_FAILURE); 1177 } 1134 1178 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 1179 psFree(object); 1180 exit(EXIT_FAILURE); 1181 } 1182 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 1183 psFree(object); 1184 exit(EXIT_FAILURE); 1185 } 1186 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 1135 1187 psFree(object); 1136 1188 exit(EXIT_FAILURE); -
trunk/ippdb/tests/insert.c
r15792 r16177 118 118 } 119 119 120 if (!newExpInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" )) {120 if (!newExpInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string")) { 121 121 exit(EXIT_FAILURE); 122 122 } … … 148 148 } 149 149 150 if (!rawExpInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16)) {150 if (!rawExpInsert(dbh, -64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16)) { 151 151 exit(EXIT_FAILURE); 152 152 } … … 193 193 } 194 194 195 if (!chipRunInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" )) {195 if (!chipRunInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string")) { 196 196 exit(EXIT_FAILURE); 197 197 } … … 238 238 } 239 239 240 if (!camRunInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" )) {240 if (!camRunInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string")) { 241 241 exit(EXIT_FAILURE); 242 242 } … … 283 283 } 284 284 285 if (!warpRunInsert(dbh, -64, "a string", "a string", "a string", "a string", " 0001-01-01T00:00:00Z")) {285 if (!warpRunInsert(dbh, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z")) { 286 286 exit(EXIT_FAILURE); 287 287 } -
trunk/ippdb/tests/insertobject.c
r15792 r16177 168 168 } 169 169 170 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" );170 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"); 171 171 if (!object) { 172 172 exit(EXIT_FAILURE); … … 212 212 } 213 213 214 object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16);214 object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16); 215 215 if (!object) { 216 216 exit(EXIT_FAILURE); … … 278 278 } 279 279 280 object = chipRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" );280 object = chipRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"); 281 281 if (!object) { 282 282 exit(EXIT_FAILURE); … … 344 344 } 345 345 346 object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" );346 object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"); 347 347 if (!object) { 348 348 exit(EXIT_FAILURE); … … 410 410 } 411 411 412 object = warpRunRowAlloc(-64, "a string", "a string", "a string", "a string", " 0001-01-01T00:00:00Z");412 object = warpRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"); 413 413 if (!object) { 414 414 exit(EXIT_FAILURE); -
trunk/ippdb/tests/metadatafromobject.c
r15792 r16177 303 303 bool status; 304 304 305 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" );305 object = newExpRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"); 306 306 if (!object) { 307 307 exit(EXIT_FAILURE); … … 346 346 exit(EXIT_FAILURE); 347 347 } 348 if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) { 349 psFree(md); 350 exit(EXIT_FAILURE); 351 } 352 if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) { 353 psFree(md); 354 exit(EXIT_FAILURE); 355 } 356 if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) { 357 psFree(md); 358 exit(EXIT_FAILURE); 359 } 348 360 349 361 psFree(md); … … 387 399 bool status; 388 400 389 object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16);401 object = rawExpRowAlloc(-64, "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 64.64, 64.64, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, "a string", 32.32, -16); 390 402 if (!object) { 391 403 exit(EXIT_FAILURE); … … 437 449 exit(EXIT_FAILURE); 438 450 } 451 if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) { 452 psFree(md); 453 exit(EXIT_FAILURE); 454 } 455 if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) { 456 psFree(md); 457 exit(EXIT_FAILURE); 458 } 459 if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) { 460 psFree(md); 461 exit(EXIT_FAILURE); 462 } 439 463 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) { 440 464 psFree(md); … … 874 898 bool status; 875 899 876 object = chipRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" );900 object = chipRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"); 877 901 if (!object) { 878 902 exit(EXIT_FAILURE); … … 920 944 exit(EXIT_FAILURE); 921 945 } 946 if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) { 947 psFree(md); 948 exit(EXIT_FAILURE); 949 } 950 if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) { 951 psFree(md); 952 exit(EXIT_FAILURE); 953 } 922 954 923 955 psFree(md); … … 1068 1100 bool status; 1069 1101 1070 object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string" );1102 object = camRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string"); 1071 1103 if (!object) { 1072 1104 exit(EXIT_FAILURE); … … 1114 1146 exit(EXIT_FAILURE); 1115 1147 } 1148 if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) { 1149 psFree(md); 1150 exit(EXIT_FAILURE); 1151 } 1152 if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) { 1153 psFree(md); 1154 exit(EXIT_FAILURE); 1155 } 1116 1156 1117 1157 psFree(md); … … 1238 1278 bool status; 1239 1279 1240 object = warpRunRowAlloc(-64, "a string", "a string", "a string", "a string", " 0001-01-01T00:00:00Z");1280 object = warpRunRowAlloc(-64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z"); 1241 1281 if (!object) { 1242 1282 exit(EXIT_FAILURE); … … 1265 1305 exit(EXIT_FAILURE); 1266 1306 } 1307 if (strncmp(psMetadataLookupPtr(&status, md, "workdir_state"), "a string", MAX_STRING_LENGTH)) { 1308 psFree(md); 1309 exit(EXIT_FAILURE); 1310 } 1267 1311 if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) { 1312 psFree(md); 1313 exit(EXIT_FAILURE); 1314 } 1315 if (strncmp(psMetadataLookupPtr(&status, md, "tess_id"), "a string", MAX_STRING_LENGTH)) { 1316 psFree(md); 1317 exit(EXIT_FAILURE); 1318 } 1319 if (strncmp(psMetadataLookupPtr(&status, md, "end_stage"), "a string", MAX_STRING_LENGTH)) { 1268 1320 psFree(md); 1269 1321 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r15792 r16177 456 456 exit(EXIT_FAILURE); 457 457 } 458 if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) { 459 psFree(md); 460 exit(EXIT_FAILURE); 461 } 462 if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) { 463 psFree(md); 464 exit(EXIT_FAILURE); 465 } 466 if (!psMetadataAddStr(md, PS_LIST_TAIL, "end_stage", 0, NULL, "a string")) { 467 psFree(md); 468 exit(EXIT_FAILURE); 469 } 458 470 459 471 object = newExpObjectFromMetadata(md); … … 496 508 exit(EXIT_FAILURE); 497 509 } 510 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 511 psFree(object); 512 exit(EXIT_FAILURE); 513 } 514 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 515 psFree(object); 516 exit(EXIT_FAILURE); 517 } 518 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 519 psFree(object); 520 exit(EXIT_FAILURE); 521 } 498 522 499 523 psFree(object); … … 583 607 exit(EXIT_FAILURE); 584 608 } 609 if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) { 610 psFree(md); 611 exit(EXIT_FAILURE); 612 } 613 if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) { 614 psFree(md); 615 exit(EXIT_FAILURE); 616 } 617 if (!psMetadataAddStr(md, PS_LIST_TAIL, "end_stage", 0, NULL, "a string")) { 618 psFree(md); 619 exit(EXIT_FAILURE); 620 } 585 621 if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) { 586 622 psFree(md); … … 801 837 exit(EXIT_FAILURE); 802 838 } 839 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 840 psFree(object); 841 exit(EXIT_FAILURE); 842 } 843 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 844 psFree(object); 845 exit(EXIT_FAILURE); 846 } 847 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 848 psFree(object); 849 exit(EXIT_FAILURE); 850 } 803 851 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 804 852 psFree(object); … … 1481 1529 exit(EXIT_FAILURE); 1482 1530 } 1531 if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) { 1532 psFree(md); 1533 exit(EXIT_FAILURE); 1534 } 1535 if (!psMetadataAddStr(md, PS_LIST_TAIL, "end_stage", 0, NULL, "a string")) { 1536 psFree(md); 1537 exit(EXIT_FAILURE); 1538 } 1483 1539 1484 1540 object = chipRunObjectFromMetadata(md); … … 1524 1580 exit(EXIT_FAILURE); 1525 1581 } 1582 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 1583 psFree(object); 1584 exit(EXIT_FAILURE); 1585 } 1586 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 1587 psFree(object); 1588 exit(EXIT_FAILURE); 1589 } 1526 1590 1527 1591 psFree(object); … … 1797 1861 exit(EXIT_FAILURE); 1798 1862 } 1863 if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) { 1864 psFree(md); 1865 exit(EXIT_FAILURE); 1866 } 1867 if (!psMetadataAddStr(md, PS_LIST_TAIL, "end_stage", 0, NULL, "a string")) { 1868 psFree(md); 1869 exit(EXIT_FAILURE); 1870 } 1799 1871 1800 1872 object = camRunObjectFromMetadata(md); … … 1840 1912 exit(EXIT_FAILURE); 1841 1913 } 1914 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 1915 psFree(object); 1916 exit(EXIT_FAILURE); 1917 } 1918 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 1919 psFree(object); 1920 exit(EXIT_FAILURE); 1921 } 1842 1922 1843 1923 psFree(object); … … 2046 2126 exit(EXIT_FAILURE); 2047 2127 } 2128 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir_state", 0, NULL, "a string")) { 2129 psFree(md); 2130 exit(EXIT_FAILURE); 2131 } 2048 2132 if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) { 2049 2133 psFree(md); 2050 2134 exit(EXIT_FAILURE); 2051 2135 } 2136 if (!psMetadataAddStr(md, PS_LIST_TAIL, "tess_id", 0, NULL, "a string")) { 2137 psFree(md); 2138 exit(EXIT_FAILURE); 2139 } 2140 if (!psMetadataAddStr(md, PS_LIST_TAIL, "end_stage", 0, NULL, "a string")) { 2141 psFree(md); 2142 exit(EXIT_FAILURE); 2143 } 2052 2144 psFree(md); 2053 2145 exit(EXIT_FAILURE); … … 2077 2169 exit(EXIT_FAILURE); 2078 2170 } 2171 if (strncmp(object->workdir_state, "a string", MAX_STRING_LENGTH)) { 2172 psFree(object); 2173 exit(EXIT_FAILURE); 2174 } 2079 2175 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 2176 psFree(object); 2177 exit(EXIT_FAILURE); 2178 } 2179 if (strncmp(object->tess_id, "a string", MAX_STRING_LENGTH)) { 2180 psFree(object); 2181 exit(EXIT_FAILURE); 2182 } 2183 if (strncmp(object->end_stage, "a string", MAX_STRING_LENGTH)) { 2080 2184 psFree(object); 2081 2185 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.
