Changeset 17142
- Timestamp:
- Mar 25, 2008, 12:32:53 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
-
ippTools/configure.ac (modified) (1 diff)
-
ippTools/src/camtool.c (modified) (1 diff)
-
ippTools/src/pxwarp.c (modified) (2 diffs)
-
ippTools/src/pxwarp.h (modified) (1 diff)
-
ippTools/src/warptool.c (modified) (2 diffs)
-
ippTools/src/warptoolConfig.c (modified) (1 diff)
-
ippdb/configure.ac (modified) (1 diff)
-
ippdb/src/ippdb.c (modified) (28 diffs)
-
ippdb/src/ippdb.h (modified) (9 diffs)
-
ippdb/tests/alloc.c (modified) (6 diffs)
-
ippdb/tests/insert.c (modified) (2 diffs)
-
ippdb/tests/insertobject.c (modified) (3 diffs)
-
ippdb/tests/metadatafromobject.c (modified) (6 diffs)
-
ippdb/tests/objectfrommetadata.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/configure.ac
r16733 r17142 18 18 PKG_CHECK_MODULES([PSLIB], [pslib >= 1.1.0]) 19 19 PKG_CHECK_MODULES([PSMODULES], [psmodules >= 1.1.0]) 20 PKG_CHECK_MODULES([IPPDB], [ippdb >= 1.1.3 1])20 PKG_CHECK_MODULES([IPPDB], [ippdb >= 1.1.32]) 21 21 22 22 PXTOOLS_CFLAGS="${PSLIB_CFLAGS=} ${PSMODULES_CFLAGS=} ${IPPDB_CFLAGS=}" -
trunk/ippTools/src/camtool.c
r16985 r17142 548 548 pendingRow->cam_id, 549 549 pendingRow->workdir, 550 pendingRow->label, 550 551 pendingRow->dvodb, 551 552 pendingRow->tess_id, -
trunk/ippTools/src/pxwarp.c
r16733 r17142 59 59 psS64 cam_id, 60 60 char *workdir, 61 char *label, 61 62 char *dvodb, 62 63 char *tess_id, … … 73 74 workdir, 74 75 "dirty", // workdir_state 76 label, 75 77 dvodb, 76 78 tess_id, -
trunk/ippTools/src/pxwarp.h
r16242 r17142 30 30 psS64 cam_id, 31 31 char *workdir, 32 char *label, 32 33 char *dvodb, 33 34 char *tess_id, -
trunk/ippTools/src/warptool.c
r16828 r17142 114 114 115 115 // optional 116 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); 116 117 PXOPT_LOOKUP_STR(dvodb, config->args, "-dvodb", false, false); 117 118 PXOPT_LOOKUP_STR(tess_id, config->args, "-tess_id", false, false); … … 130 131 workdir, 131 132 "dirty", // workdir_state 133 label, 132 134 dvodb, 133 135 tess_id, -
trunk/ippTools/src/warptoolConfig.c
r16733 r17142 55 55 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-workdir", 0, 56 56 "define workdir (required)", NULL); 57 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", 0, 58 "define label", NULL); 57 59 psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-dvodb", 0, 58 60 "define dvodb", NULL); -
trunk/ippdb/configure.ac
r16731 r17142 7 7 AC_PREREQ(2.61) 8 8 9 AC_INIT([ippdb], [1.1.3 1], [pan-starrs.ifa.hawaii.edu])9 AC_INIT([ippdb], [1.1.32], [pan-starrs.ifa.hawaii.edu]) 10 10 AC_CONFIG_SRCDIR([ippdb.pc.in]) 11 11 -
trunk/ippdb/src/ippdb.c
r16731 r17142 9503 9503 static void warpRunRowFree(warpRunRow *object); 9504 9504 9505 warpRunRow *warpRunRowAlloc(psS64 warp_id, psS64 cam_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, bool magiced)9505 warpRunRow *warpRunRowAlloc(psS64 warp_id, psS64 cam_id, const char *mode, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, const char *tess_id, const char *end_stage, psTime* registered, bool magiced) 9506 9506 { 9507 9507 warpRunRow *_object; … … 9516 9516 _object->workdir = psStringCopy(workdir); 9517 9517 _object->workdir_state = psStringCopy(workdir_state); 9518 _object->label = psStringCopy(label); 9518 9519 _object->dvodb = psStringCopy(dvodb); 9519 9520 _object->tess_id = psStringCopy(tess_id); … … 9531 9532 psFree(object->workdir); 9532 9533 psFree(object->workdir_state); 9534 psFree(object->label); 9533 9535 psFree(object->dvodb); 9534 9536 psFree(object->tess_id); … … 9570 9572 return false; 9571 9573 } 9574 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, "key", "64")) { 9575 psError(PS_ERR_UNKNOWN, false, "failed to add item label"); 9576 psFree(md); 9577 return false; 9578 } 9572 9579 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) { 9573 9580 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); … … 9608 9615 } 9609 9616 9610 bool warpRunInsert(psDB * dbh, psS64 warp_id, psS64 cam_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, bool magiced)9617 bool warpRunInsert(psDB * dbh, psS64 warp_id, psS64 cam_id, const char *mode, const char *state, const char *workdir, const char *workdir_state, const char *label, const char *dvodb, const char *tess_id, const char *end_stage, psTime* registered, bool magiced) 9611 9618 { 9612 9619 psMetadata *md = psMetadataAlloc(); … … 9638 9645 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir_state", PS_DATA_STRING, NULL, workdir_state)) { 9639 9646 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir_state"); 9647 psFree(md); 9648 return false; 9649 } 9650 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, label)) { 9651 psError(PS_ERR_UNKNOWN, false, "failed to add item label"); 9640 9652 psFree(md); 9641 9653 return false; … … 9689 9701 bool warpRunInsertObject(psDB *dbh, warpRunRow *object) 9690 9702 { 9691 return warpRunInsert(dbh, object->warp_id, object->cam_id, object->mode, object->state, object->workdir, object->workdir_state, object-> dvodb, object->tess_id, object->end_stage, object->registered, object->magiced);9703 return warpRunInsert(dbh, object->warp_id, object->cam_id, object->mode, object->state, object->workdir, object->workdir_state, object->label, object->dvodb, object->tess_id, object->end_stage, object->registered, object->magiced); 9692 9704 } 9693 9705 … … 9792 9804 return false; 9793 9805 } 9806 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, object->label)) { 9807 psError(PS_ERR_UNKNOWN, false, "failed to add item label"); 9808 psFree(md); 9809 return false; 9810 } 9794 9811 if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) { 9795 9812 psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb"); … … 9856 9873 return false; 9857 9874 } 9875 char* label = psMetadataLookupPtr(&status, md, "label"); 9876 if (!status) { 9877 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item label"); 9878 return false; 9879 } 9858 9880 char* dvodb = psMetadataLookupPtr(&status, md, "dvodb"); 9859 9881 if (!status) { … … 9882 9904 } 9883 9905 9884 return warpRunRowAlloc(warp_id, cam_id, mode, state, workdir, workdir_state, dvodb, tess_id, end_stage, registered, magiced);9906 return warpRunRowAlloc(warp_id, cam_id, mode, state, workdir, workdir_state, label, dvodb, tess_id, end_stage, registered, magiced); 9885 9907 } 9886 9908 psArray *warpRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 24898 24920 static void pstampRequestRowFree(pstampRequestRow *object); 24899 24921 24900 pstampRequestRow *pstampRequestRowAlloc(psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri )24922 pstampRequestRow *pstampRequestRowAlloc(psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri, psS16 resultsFile) 24901 24923 { 24902 24924 pstampRequestRow *_object; … … 24910 24932 _object->outFileset = psStringCopy(outFileset); 24911 24933 _object->uri = psStringCopy(uri); 24934 _object->resultsFile = resultsFile; 24912 24935 24913 24936 return _object; … … 24949 24972 return false; 24950 24973 } 24974 if (!psMetadataAdd(md, PS_LIST_TAIL, "resultsFile", PS_DATA_S16, NULL, 0)) { 24975 psError(PS_ERR_UNKNOWN, false, "failed to add item resultsFile"); 24976 psFree(md); 24977 return false; 24978 } 24951 24979 24952 24980 bool status = psDBCreateTable(dbh, PSTAMPREQUEST_TABLE_NAME, md); … … 24962 24990 } 24963 24991 24964 bool pstampRequestInsert(psDB * dbh, psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri )24992 bool pstampRequestInsert(psDB * dbh, psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri, psS16 resultsFile) 24965 24993 { 24966 24994 psMetadata *md = psMetadataAlloc(); … … 24987 25015 if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) { 24988 25016 psError(PS_ERR_UNKNOWN, false, "failed to add item uri"); 25017 psFree(md); 25018 return false; 25019 } 25020 if (!psMetadataAdd(md, PS_LIST_TAIL, "resultsFile", PS_DATA_S16, NULL, resultsFile)) { 25021 psError(PS_ERR_UNKNOWN, false, "failed to add item resultsFile"); 24989 25022 psFree(md); 24990 25023 return false; … … 25013 25046 bool pstampRequestInsertObject(psDB *dbh, pstampRequestRow *object) 25014 25047 { 25015 return pstampRequestInsert(dbh, object->req_id, object->ds_id, object->state, object->outFileset, object->uri );25048 return pstampRequestInsert(dbh, object->req_id, object->ds_id, object->state, object->outFileset, object->uri, object->resultsFile); 25016 25049 } 25017 25050 … … 25111 25144 return false; 25112 25145 } 25146 if (!psMetadataAdd(md, PS_LIST_TAIL, "resultsFile", PS_DATA_S16, NULL, object->resultsFile)) { 25147 psError(PS_ERR_UNKNOWN, false, "failed to add item resultsFile"); 25148 psFree(md); 25149 return false; 25150 } 25113 25151 25114 25152 … … 25145 25183 return false; 25146 25184 } 25147 25148 return pstampRequestRowAlloc(req_id, ds_id, state, outFileset, uri); 25185 psS16 resultsFile = psMetadataLookupS16(&status, md, "resultsFile"); 25186 if (!status) { 25187 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item resultsFile"); 25188 return false; 25189 } 25190 25191 return pstampRequestRowAlloc(req_id, ds_id, state, outFileset, uri, resultsFile); 25149 25192 } 25150 25193 psArray *pstampRequestSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 25264 25307 static void pstampJobRowFree(pstampJobRow *object); 25265 25308 25266 pstampJobRow *pstampJobRowAlloc(psS64 job_id, psS64 req_id, const char *state, psS32 result, const char *uri, const char *outputBase, const char *args)25309 pstampJobRow *pstampJobRowAlloc(psS64 job_id, psS64 req_id, const char *state, const char *jobType, psS32 result, const char *uri, const char *outputBase, const char *args) 25267 25310 { 25268 25311 pstampJobRow *_object; … … 25274 25317 _object->req_id = req_id; 25275 25318 _object->state = psStringCopy(state); 25319 _object->jobType = psStringCopy(jobType); 25276 25320 _object->result = result; 25277 25321 _object->uri = psStringCopy(uri); … … 25285 25329 { 25286 25330 psFree(object->state); 25331 psFree(object->jobType); 25287 25332 psFree(object->uri); 25288 25333 psFree(object->outputBase); … … 25308 25353 return false; 25309 25354 } 25355 if (!psMetadataAdd(md, PS_LIST_TAIL, "jobType", PS_DATA_STRING, NULL, "16")) { 25356 psError(PS_ERR_UNKNOWN, false, "failed to add item jobType"); 25357 psFree(md); 25358 return false; 25359 } 25310 25360 if (!psMetadataAdd(md, PS_LIST_TAIL, "result", PS_DATA_S32, NULL, 0)) { 25311 25361 psError(PS_ERR_UNKNOWN, false, "failed to add item result"); … … 25341 25391 } 25342 25392 25343 bool pstampJobInsert(psDB * dbh, psS64 job_id, psS64 req_id, const char *state, psS32 result, const char *uri, const char *outputBase, const char *args)25393 bool pstampJobInsert(psDB * dbh, psS64 job_id, psS64 req_id, const char *state, const char *jobType, psS32 result, const char *uri, const char *outputBase, const char *args) 25344 25394 { 25345 25395 psMetadata *md = psMetadataAlloc(); … … 25356 25406 if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, state)) { 25357 25407 psError(PS_ERR_UNKNOWN, false, "failed to add item state"); 25408 psFree(md); 25409 return false; 25410 } 25411 if (!psMetadataAdd(md, PS_LIST_TAIL, "jobType", PS_DATA_STRING, NULL, jobType)) { 25412 psError(PS_ERR_UNKNOWN, false, "failed to add item jobType"); 25358 25413 psFree(md); 25359 25414 return false; … … 25402 25457 bool pstampJobInsertObject(psDB *dbh, pstampJobRow *object) 25403 25458 { 25404 return pstampJobInsert(dbh, object->job_id, object->req_id, object->state, object-> result, object->uri, object->outputBase, object->args);25459 return pstampJobInsert(dbh, object->job_id, object->req_id, object->state, object->jobType, object->result, object->uri, object->outputBase, object->args); 25405 25460 } 25406 25461 … … 25490 25545 return false; 25491 25546 } 25547 if (!psMetadataAdd(md, PS_LIST_TAIL, "jobType", PS_DATA_STRING, NULL, object->jobType)) { 25548 psError(PS_ERR_UNKNOWN, false, "failed to add item jobType"); 25549 psFree(md); 25550 return false; 25551 } 25492 25552 if (!psMetadataAdd(md, PS_LIST_TAIL, "result", PS_DATA_S32, NULL, object->result)) { 25493 25553 psError(PS_ERR_UNKNOWN, false, "failed to add item result"); … … 25534 25594 return false; 25535 25595 } 25596 char* jobType = psMetadataLookupPtr(&status, md, "jobType"); 25597 if (!status) { 25598 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item jobType"); 25599 return false; 25600 } 25536 25601 psS32 result = psMetadataLookupS32(&status, md, "result"); 25537 25602 if (!status) { … … 25555 25620 } 25556 25621 25557 return pstampJobRowAlloc(job_id, req_id, state, result, uri, outputBase, args);25622 return pstampJobRowAlloc(job_id, req_id, state, jobType, result, uri, outputBase, args); 25558 25623 } 25559 25624 psArray *pstampJobSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) -
trunk/ippdb/src/ippdb.h
r16731 r17142 3926 3926 char *workdir; 3927 3927 char *workdir_state; 3928 char *label; 3928 3929 char *dvodb; 3929 3930 char *tess_id; … … 3945 3946 const char *workdir, 3946 3947 const char *workdir_state, 3948 const char *label, 3947 3949 const char *dvodb, 3948 3950 const char *tess_id, … … 3985 3987 const char *workdir, 3986 3988 const char *workdir_state, 3989 const char *label, 3987 3990 const char *dvodb, 3988 3991 const char *tess_id, … … 11383 11386 char *outFileset; 11384 11387 char *uri; 11388 psS16 resultsFile; 11385 11389 } pstampRequestRow; 11386 11390 … … 11395 11399 const char *state, 11396 11400 const char *outFileset, 11397 const char *uri 11401 const char *uri, 11402 psS16 resultsFile 11398 11403 ); 11399 11404 … … 11429 11434 const char *state, 11430 11435 const char *outFileset, 11431 const char *uri 11436 const char *uri, 11437 psS16 resultsFile 11432 11438 ); 11433 11439 … … 11588 11594 psS64 req_id; 11589 11595 char *state; 11596 char *jobType; 11590 11597 psS32 result; 11591 11598 char *uri; … … 11603 11610 psS64 req_id, 11604 11611 const char *state, 11612 const char *jobType, 11605 11613 psS32 result, 11606 11614 const char *uri, … … 11639 11647 psS64 req_id, 11640 11648 const char *state, 11649 const char *jobType, 11641 11650 psS32 result, 11642 11651 const char *uri, -
trunk/ippdb/tests/alloc.c
r16731 r17142 1172 1172 warpRunRow *object; 1173 1173 1174 object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", " 0001-01-01T00:00:00Z", true );1174 object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", true ); 1175 1175 1176 1176 if (!object) { … … 1202 1202 exit(EXIT_FAILURE); 1203 1203 } 1204 if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) { 1205 psFree(object); 1206 exit(EXIT_FAILURE); 1207 } 1204 1208 if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) { 1205 1209 psFree(object); … … 2845 2849 pstampRequestRow *object; 2846 2850 2847 object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string" );2851 object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", -16 ); 2848 2852 2849 2853 if (!object) { … … 2871 2875 exit(EXIT_FAILURE); 2872 2876 } 2877 if (!object->resultsFile == -16) { 2878 psFree(object); 2879 exit(EXIT_FAILURE); 2880 } 2873 2881 2874 2882 psFree(object); … … 2878 2886 pstampJobRow *object; 2879 2887 2880 object = pstampJobRowAlloc(-64, -64, "a string", -32, "a string", "a string", "a string" );2888 object = pstampJobRowAlloc(-64, -64, "a string", "a string", -32, "a string", "a string", "a string" ); 2881 2889 2882 2890 if (!object) { … … 2893 2901 } 2894 2902 if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) { 2903 psFree(object); 2904 exit(EXIT_FAILURE); 2905 } 2906 if (strncmp(object->jobType, "a string", MAX_STRING_LENGTH)) { 2895 2907 psFree(object); 2896 2908 exit(EXIT_FAILURE); -
trunk/ippdb/tests/insert.c
r16731 r17142 253 253 } 254 254 255 if (!warpRunInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", " 0001-01-01T00:00:00Z", true)) {255 if (!warpRunInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", true)) { 256 256 exit(EXIT_FAILURE); 257 257 } … … 763 763 } 764 764 765 if (!pstampRequestInsert(dbh, -64, -64, "a string", "a string", "a string" )) {766 exit(EXIT_FAILURE); 767 } 768 769 psDBCleanup(dbh); 770 } 771 772 { 773 psDB *dbh; 774 775 dbh = psDBInit("localhost", "test", NULL, "test"); 776 if (!dbh) { 777 exit(EXIT_FAILURE); 778 } 779 780 if (!pstampJobInsert(dbh, -64, -64, "a string", -32, "a string", "a string", "a string")) {765 if (!pstampRequestInsert(dbh, -64, -64, "a string", "a string", "a string", -16)) { 766 exit(EXIT_FAILURE); 767 } 768 769 psDBCleanup(dbh); 770 } 771 772 { 773 psDB *dbh; 774 775 dbh = psDBInit("localhost", "test", NULL, "test"); 776 if (!dbh) { 777 exit(EXIT_FAILURE); 778 } 779 780 if (!pstampJobInsert(dbh, -64, -64, "a string", "a string", -32, "a string", "a string", "a string")) { 781 781 exit(EXIT_FAILURE); 782 782 } -
trunk/ippdb/tests/insertobject.c
r16731 r17142 366 366 } 367 367 368 object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", " 0001-01-01T00:00:00Z", true);368 object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", true); 369 369 if (!object) { 370 370 exit(EXIT_FAILURE); … … 1114 1114 } 1115 1115 1116 object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string" );1116 object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", -16); 1117 1117 if (!object) { 1118 1118 exit(EXIT_FAILURE); … … 1136 1136 } 1137 1137 1138 object = pstampJobRowAlloc(-64, -64, "a string", -32, "a string", "a string", "a string");1138 object = pstampJobRowAlloc(-64, -64, "a string", "a string", -32, "a string", "a string", "a string"); 1139 1139 if (!object) { 1140 1140 exit(EXIT_FAILURE); -
trunk/ippdb/tests/metadatafromobject.c
r16731 r17142 1283 1283 bool status; 1284 1284 1285 object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", " 0001-01-01T00:00:00Z", true);1285 object = warpRunRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", true); 1286 1286 if (!object) { 1287 1287 exit(EXIT_FAILURE); … … 1317 1317 exit(EXIT_FAILURE); 1318 1318 } 1319 if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) { 1320 psFree(md); 1321 exit(EXIT_FAILURE); 1322 } 1319 1323 if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) { 1320 1324 psFree(md); … … 3162 3166 bool status; 3163 3167 3164 object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string" );3168 object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", -16); 3165 3169 if (!object) { 3166 3170 exit(EXIT_FAILURE); … … 3192 3196 exit(EXIT_FAILURE); 3193 3197 } 3198 psFree(md); 3199 exit(EXIT_FAILURE); 3200 } 3194 3201 3195 3202 psFree(md); … … 3201 3208 bool status; 3202 3209 3203 object = pstampJobRowAlloc(-64, -64, "a string", -32, "a string", "a string", "a string");3210 object = pstampJobRowAlloc(-64, -64, "a string", "a string", -32, "a string", "a string", "a string"); 3204 3211 if (!object) { 3205 3212 exit(EXIT_FAILURE); … … 3220 3227 } 3221 3228 if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) { 3229 psFree(md); 3230 exit(EXIT_FAILURE); 3231 } 3232 if (strncmp(psMetadataLookupPtr(&status, md, "jobType"), "a string", MAX_STRING_LENGTH)) { 3222 3233 psFree(md); 3223 3234 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r16731 r17142 2191 2191 exit(EXIT_FAILURE); 2192 2192 } 2193 if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) { 2194 psFree(md); 2195 exit(EXIT_FAILURE); 2196 } 2193 2197 if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) { 2194 2198 psFree(md); … … 2238 2242 } 2239 2243 if (strncmp(object->workdir_state, "a string", MAX_STRING_LENGTH)) { 2244 psFree(object); 2245 exit(EXIT_FAILURE); 2246 } 2247 if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) { 2240 2248 psFree(object); 2241 2249 exit(EXIT_FAILURE); … … 5129 5137 exit(EXIT_FAILURE); 5130 5138 } 5139 psFree(md); 5140 exit(EXIT_FAILURE); 5141 } 5131 5142 5132 5143 object = pstampRequestObjectFromMetadata(md); … … 5153 5164 } 5154 5165 if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) { 5166 psFree(object); 5167 exit(EXIT_FAILURE); 5168 } 5155 5169 psFree(object); 5156 5170 exit(EXIT_FAILURE); … … 5175 5189 exit(EXIT_FAILURE); 5176 5190 } 5191 if (!psMetadataAddStr(md, PS_LIST_TAIL, "jobType", 0, NULL, "a string")) { 5192 psFree(md); 5193 exit(EXIT_FAILURE); 5194 } 5177 5195 if (!psMetadataAddS32(md, PS_LIST_TAIL, "result", 0, NULL, -32)) { 5178 5196 psFree(md); … … 5210 5228 exit(EXIT_FAILURE); 5211 5229 } 5230 if (strncmp(object->jobType, "a string", MAX_STRING_LENGTH)) { 5231 psFree(object); 5232 exit(EXIT_FAILURE); 5233 } 5212 5234 if (!object->result == -32) { 5213 5235 psFree(object);
Note:
See TracChangeset
for help on using the changeset viewer.
