IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17142


Ignore:
Timestamp:
Mar 25, 2008, 12:32:53 PM (18 years ago)
Author:
jhoblitt
Message:

add warpRun.label

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/configure.ac

    r16733 r17142  
    1818PKG_CHECK_MODULES([PSLIB], [pslib >= 1.1.0])
    1919PKG_CHECK_MODULES([PSMODULES], [psmodules >= 1.1.0])
    20 PKG_CHECK_MODULES([IPPDB], [ippdb >= 1.1.31])
     20PKG_CHECK_MODULES([IPPDB], [ippdb >= 1.1.32])
    2121
    2222PXTOOLS_CFLAGS="${PSLIB_CFLAGS=} ${PSMODULES_CFLAGS=} ${IPPDB_CFLAGS=}"
  • trunk/ippTools/src/camtool.c

    r16985 r17142  
    548548            pendingRow->cam_id,
    549549            pendingRow->workdir,
     550            pendingRow->label,
    550551            pendingRow->dvodb,
    551552            pendingRow->tess_id,
  • trunk/ippTools/src/pxwarp.c

    r16733 r17142  
    5959                    psS64 cam_id,
    6060                    char *workdir,
     61                    char *label,
    6162                    char *dvodb,
    6263                    char *tess_id,
     
    7374        workdir,
    7475        "dirty",    // workdir_state
     76        label,
    7577        dvodb,
    7678        tess_id,
  • trunk/ippTools/src/pxwarp.h

    r16242 r17142  
    3030                    psS64 cam_id,
    3131                    char *workdir,
     32                    char *label,
    3233                    char *dvodb,
    3334                    char *tess_id,
  • trunk/ippTools/src/warptool.c

    r16828 r17142  
    114114
    115115    // optional
     116    PXOPT_LOOKUP_STR(label, config->args, "-label", false, false);
    116117    PXOPT_LOOKUP_STR(dvodb, config->args, "-dvodb", false, false);
    117118    PXOPT_LOOKUP_STR(tess_id, config->args, "-tess_id", false, false);
     
    130131            workdir,
    131132            "dirty",    // workdir_state
     133            label,
    132134            dvodb,
    133135            tess_id,
  • trunk/ippTools/src/warptoolConfig.c

    r16733 r17142  
    5555    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-workdir", 0,
    5656            "define workdir (required)", NULL);
     57    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-label", 0,
     58            "define label", NULL);
    5759    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-dvodb", 0,
    5860            "define dvodb", NULL);
  • trunk/ippdb/configure.ac

    r16731 r17142  
    77AC_PREREQ(2.61)
    88
    9 AC_INIT([ippdb], [1.1.31], [pan-starrs.ifa.hawaii.edu])
     9AC_INIT([ippdb], [1.1.32], [pan-starrs.ifa.hawaii.edu])
    1010AC_CONFIG_SRCDIR([ippdb.pc.in])
    1111
  • trunk/ippdb/src/ippdb.c

    r16731 r17142  
    95039503static void warpRunRowFree(warpRunRow *object);
    95049504
    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)
     9505warpRunRow *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)
    95069506{
    95079507    warpRunRow      *_object;
     
    95169516    _object->workdir = psStringCopy(workdir);
    95179517    _object->workdir_state = psStringCopy(workdir_state);
     9518    _object->label = psStringCopy(label);
    95189519    _object->dvodb = psStringCopy(dvodb);
    95199520    _object->tess_id = psStringCopy(tess_id);
     
    95319532    psFree(object->workdir);
    95329533    psFree(object->workdir_state);
     9534    psFree(object->label);
    95339535    psFree(object->dvodb);
    95349536    psFree(object->tess_id);
     
    95709572        return false;
    95719573    }
     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    }
    95729579    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, "255")) {
    95739580        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     
    96089615}
    96099616
    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)
     9617bool 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)
    96119618{
    96129619    psMetadata *md = psMetadataAlloc();
     
    96389645    if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir_state", PS_DATA_STRING, NULL, workdir_state)) {
    96399646        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");
    96409652        psFree(md);
    96419653        return false;
     
    96899701bool warpRunInsertObject(psDB *dbh, warpRunRow *object)
    96909702{
    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);
    96929704}
    96939705
     
    97929804        return false;
    97939805    }
     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    }
    97949811    if (!psMetadataAdd(md, PS_LIST_TAIL, "dvodb", PS_DATA_STRING, NULL, object->dvodb)) {
    97959812        psError(PS_ERR_UNKNOWN, false, "failed to add item dvodb");
     
    98569873        return false;
    98579874    }
     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    }
    98589880    char* dvodb = psMetadataLookupPtr(&status, md, "dvodb");
    98599881    if (!status) {
     
    98829904    }
    98839905
    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);
    98859907}
    98869908psArray *warpRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    2489824920static void pstampRequestRowFree(pstampRequestRow *object);
    2489924921
    24900 pstampRequestRow *pstampRequestRowAlloc(psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri)
     24922pstampRequestRow *pstampRequestRowAlloc(psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri, psS16 resultsFile)
    2490124923{
    2490224924    pstampRequestRow *_object;
     
    2491024932    _object->outFileset = psStringCopy(outFileset);
    2491124933    _object->uri = psStringCopy(uri);
     24934    _object->resultsFile = resultsFile;
    2491224935
    2491324936    return _object;
     
    2494924972        return false;
    2495024973    }
     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    }
    2495124979
    2495224980    bool status = psDBCreateTable(dbh, PSTAMPREQUEST_TABLE_NAME, md);
     
    2496224990}
    2496324991
    24964 bool pstampRequestInsert(psDB * dbh, psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri)
     24992bool pstampRequestInsert(psDB * dbh, psS64 req_id, psS64 ds_id, const char *state, const char *outFileset, const char *uri, psS16 resultsFile)
    2496524993{
    2496624994    psMetadata *md = psMetadataAlloc();
     
    2498725015    if (!psMetadataAdd(md, PS_LIST_TAIL, "uri", PS_DATA_STRING, NULL, uri)) {
    2498825016        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");
    2498925022        psFree(md);
    2499025023        return false;
     
    2501325046bool pstampRequestInsertObject(psDB *dbh, pstampRequestRow *object)
    2501425047{
    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);
    2501625049}
    2501725050
     
    2511125144        return false;
    2511225145    }
     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    }
    2511325151
    2511425152
     
    2514525183        return false;
    2514625184    }
    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);
    2514925192}
    2515025193psArray *pstampRequestSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
     
    2526425307static void pstampJobRowFree(pstampJobRow *object);
    2526525308
    25266 pstampJobRow *pstampJobRowAlloc(psS64 job_id, psS64 req_id, const char *state, psS32 result, const char *uri, const char *outputBase, const char *args)
     25309pstampJobRow *pstampJobRowAlloc(psS64 job_id, psS64 req_id, const char *state, const char *jobType, psS32 result, const char *uri, const char *outputBase, const char *args)
    2526725310{
    2526825311    pstampJobRow    *_object;
     
    2527425317    _object->req_id = req_id;
    2527525318    _object->state = psStringCopy(state);
     25319    _object->jobType = psStringCopy(jobType);
    2527625320    _object->result = result;
    2527725321    _object->uri = psStringCopy(uri);
     
    2528525329{
    2528625330    psFree(object->state);
     25331    psFree(object->jobType);
    2528725332    psFree(object->uri);
    2528825333    psFree(object->outputBase);
     
    2530825353        return false;
    2530925354    }
     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    }
    2531025360    if (!psMetadataAdd(md, PS_LIST_TAIL, "result", PS_DATA_S32, NULL, 0)) {
    2531125361        psError(PS_ERR_UNKNOWN, false, "failed to add item result");
     
    2534125391}
    2534225392
    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)
     25393bool 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)
    2534425394{
    2534525395    psMetadata *md = psMetadataAlloc();
     
    2535625406    if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, state)) {
    2535725407        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");
    2535825413        psFree(md);
    2535925414        return false;
     
    2540225457bool pstampJobInsertObject(psDB *dbh, pstampJobRow *object)
    2540325458{
    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);
    2540525460}
    2540625461
     
    2549025545        return false;
    2549125546    }
     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    }
    2549225552    if (!psMetadataAdd(md, PS_LIST_TAIL, "result", PS_DATA_S32, NULL, object->result)) {
    2549325553        psError(PS_ERR_UNKNOWN, false, "failed to add item result");
     
    2553425594        return false;
    2553525595    }
     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    }
    2553625601    psS32 result = psMetadataLookupS32(&status, md, "result");
    2553725602    if (!status) {
     
    2555525620    }
    2555625621
    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);
    2555825623}
    2555925624psArray *pstampJobSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit)
  • trunk/ippdb/src/ippdb.h

    r16731 r17142  
    39263926    char            *workdir;
    39273927    char            *workdir_state;
     3928    char            *label;
    39283929    char            *dvodb;
    39293930    char            *tess_id;
     
    39453946    const char      *workdir,
    39463947    const char      *workdir_state,
     3948    const char      *label,
    39473949    const char      *dvodb,
    39483950    const char      *tess_id,
     
    39853987    const char      *workdir,
    39863988    const char      *workdir_state,
     3989    const char      *label,
    39873990    const char      *dvodb,
    39883991    const char      *tess_id,
     
    1138311386    char            *outFileset;
    1138411387    char            *uri;
     11388    psS16           resultsFile;
    1138511389} pstampRequestRow;
    1138611390
     
    1139511399    const char      *state,
    1139611400    const char      *outFileset,
    11397     const char      *uri
     11401    const char      *uri,
     11402    psS16           resultsFile
    1139811403);
    1139911404
     
    1142911434    const char      *state,
    1143011435    const char      *outFileset,
    11431     const char      *uri
     11436    const char      *uri,
     11437    psS16           resultsFile
    1143211438);
    1143311439
     
    1158811594    psS64           req_id;
    1158911595    char            *state;
     11596    char            *jobType;
    1159011597    psS32           result;
    1159111598    char            *uri;
     
    1160311610    psS64           req_id,
    1160411611    const char      *state,
     11612    const char      *jobType,
    1160511613    psS32           result,
    1160611614    const char      *uri,
     
    1163911647    psS64           req_id,
    1164011648    const char      *state,
     11649    const char      *jobType,
    1164111650    psS32           result,
    1164211651    const char      *uri,
  • trunk/ippdb/tests/alloc.c

    r16731 r17142  
    11721172        warpRunRow      *object;
    11731173
    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    );
    11751175
    11761176        if (!object) {
     
    12021202            exit(EXIT_FAILURE);
    12031203        }
     1204        if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) {
     1205            psFree(object);
     1206            exit(EXIT_FAILURE);
     1207        }
    12041208        if (strncmp(object->dvodb, "a string", MAX_STRING_LENGTH)) {
    12051209            psFree(object);
     
    28452849        pstampRequestRow *object;
    28462850
    2847         object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string"    );
     2851        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", -16    );
    28482852
    28492853        if (!object) {
     
    28712875            exit(EXIT_FAILURE);
    28722876        }
     2877        if (!object->resultsFile == -16) {
     2878            psFree(object);
     2879            exit(EXIT_FAILURE);
     2880        }
    28732881
    28742882        psFree(object);
     
    28782886        pstampJobRow    *object;
    28792887
    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"    );
    28812889
    28822890        if (!object) {
     
    28932901        }
    28942902        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)) {
    28952907            psFree(object);
    28962908            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/insert.c

    r16731 r17142  
    253253        }
    254254
    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)) {
    256256            exit(EXIT_FAILURE);
    257257        }
     
    763763        }
    764764
    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")) {
    781781            exit(EXIT_FAILURE);
    782782        }
  • trunk/ippdb/tests/insertobject.c

    r16731 r17142  
    366366        }
    367367
    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);
    369369        if (!object) {
    370370            exit(EXIT_FAILURE);
     
    11141114        }
    11151115
    1116         object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string");
     1116        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", -16);
    11171117        if (!object) {
    11181118            exit(EXIT_FAILURE);
     
    11361136        }
    11371137
    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");
    11391139        if (!object) {
    11401140            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/metadatafromobject.c

    r16731 r17142  
    12831283        bool            status;
    12841284
    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);
    12861286        if (!object) {
    12871287            exit(EXIT_FAILURE);
     
    13171317            exit(EXIT_FAILURE);
    13181318        }
     1319        if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) {
     1320            psFree(md);
     1321            exit(EXIT_FAILURE);
     1322        }
    13191323        if (strncmp(psMetadataLookupPtr(&status, md, "dvodb"), "a string", MAX_STRING_LENGTH)) {
    13201324            psFree(md);
     
    31623166        bool            status;
    31633167
    3164         object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string");
     3168        object = pstampRequestRowAlloc(-64, -64, "a string", "a string", "a string", -16);
    31653169        if (!object) {
    31663170            exit(EXIT_FAILURE);
     
    31923196            exit(EXIT_FAILURE);
    31933197        }
     3198            psFree(md);
     3199            exit(EXIT_FAILURE);
     3200        }
    31943201
    31953202        psFree(md);
     
    32013208        bool            status;
    32023209
    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");
    32043211        if (!object) {
    32053212            exit(EXIT_FAILURE);
     
    32203227        }
    32213228        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)) {
    32223233            psFree(md);
    32233234            exit(EXIT_FAILURE);
  • trunk/ippdb/tests/objectfrommetadata.c

    r16731 r17142  
    21912191            exit(EXIT_FAILURE);
    21922192        }
     2193        if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) {
     2194            psFree(md);
     2195            exit(EXIT_FAILURE);
     2196        }
    21932197        if (!psMetadataAddStr(md, PS_LIST_TAIL, "dvodb", 0, NULL, "a string")) {
    21942198            psFree(md);
     
    22382242        }
    22392243        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)) {
    22402248            psFree(object);
    22412249            exit(EXIT_FAILURE);
     
    51295137            exit(EXIT_FAILURE);
    51305138        }
     5139            psFree(md);
     5140            exit(EXIT_FAILURE);
     5141        }
    51315142
    51325143        object = pstampRequestObjectFromMetadata(md);
     
    51535164        }
    51545165        if (strncmp(object->uri, "a string", MAX_STRING_LENGTH)) {
     5166            psFree(object);
     5167            exit(EXIT_FAILURE);
     5168        }
    51555169            psFree(object);
    51565170            exit(EXIT_FAILURE);
     
    51755189            exit(EXIT_FAILURE);
    51765190        }
     5191        if (!psMetadataAddStr(md, PS_LIST_TAIL, "jobType", 0, NULL, "a string")) {
     5192            psFree(md);
     5193            exit(EXIT_FAILURE);
     5194        }
    51775195        if (!psMetadataAddS32(md, PS_LIST_TAIL, "result", 0, NULL, -32)) {
    51785196            psFree(md);
     
    52105228            exit(EXIT_FAILURE);
    52115229        }
     5230        if (strncmp(object->jobType, "a string", MAX_STRING_LENGTH)) {
     5231            psFree(object);
     5232            exit(EXIT_FAILURE);
     5233        }
    52125234        if (!object->result == -32) {
    52135235            psFree(object);
Note: See TracChangeset for help on using the changeset viewer.