Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Basic Changes Needed to Move Test Executive 1.0 to Win95 or WinNT

Primary Software: LabWindows/CVI Add-ons>>Test Executive
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software:

Problem: What basic changes are necessary to move my Test Executive 1.0 to Win95 or WinNT?

Solution: The version 1.0 of the LabWindows/CVI Test Executive requires modifications in order to run in LabWindows/CVI 4.x for Windows 95/NT. Test Executive version 1.1 contains these changes and more so upgrading is the best solution. However, if you need to run the Test Executive 1.0 in LabWindows/CVI 4.x, perform the following 5 steps listed below to the Test Executive code.

  1. Open testexec\txlogin.c. Go to ~ line 149 that currently reads:

    char projDir[256];

    change that to:

    char projDir[260];

    Close txlogin.c, saving changes.


  2. Open testexec\cvitxfun.h. Go to ~ line 14 that currently reads:

    #define FILE_NAME_MAX 256

    change that to:

    #define FILE_NAME_MAX 260

    Close cvitxfun.h, saving changes.


  3. Change the following 5 areas in testexec\txprecnd.c:

    a) In PC_LoadNode function, ~line 623 reads:

    err = TX_ReadByte(hndl, (char *)&type) <= 0;

    Delete that line and insert in its place:

    char tempByte;

    err = TX_ReadByte(hndl, (char *)&tempByte);
    type = (NodeType)tempByte;
    if (err < 0)
    goto Error

    b) After that change, ~line 633 will read:

    while (!err && type != END_NODE) {

    Delete that line and insert in its place:

    while (err >= 0 && type != END_NODE) {

    c) After that change, lines ~638 to 645 will read:

    err = err || PC_LoadNode(hndl, &(curr->subNodes)) != NO_ERROR;
    break;
    case TEST_NODE:
    curr->type = TEST_NODE;
    err = err ||
    TX_ReadInt(hndl, &(curr->testIndex)) <= 0;
    err = err ||
    TX_ReadInt(hndl, &(curr->isPassTest))<= 0;

    Delete those lines, and insert in its place:

    err = PC_LoadNode(hndl, &(curr->subNodes));
    if (err < 0)
    goto Error;
    break;
    case TEST_NODE:
    curr->type = TEST_NODE;
    err = TX_ReadInt(hndl, &(curr->testIndex));
    if (err < 0)
    goto Error;
    err = TX_ReadInt(hndl, &(curr->isPassTest));
    if (err < 0)
    goto Error;

    d) After that change, lines ~656 to 657 will read:

    }
    err = err || TX_ReadByte(hndl, (char *)&type) <= 0;

    Delete those lines, insert in its place:

    default:
    goto Error;
    }
    err = TX_ReadByte(hndl, (char *)&tempByte);
    type = (NodeType)tempByte;
    if (err < 0)
    goto Error;

    e) After that change, lines ~673 to 675 will read:

    if (err)
    return TX_ReportEngineError(ERR_READING_FROM_FILE);
    return NO_ERROR;

    Delete those lines, insert in its place:

    #ifdef OLD
    if (err)
    return TX_ReportEngineError(ERR_READING_FROM_FILE);
    #endif
    return NO_ERROR;
    Error:
    return TX_ReportEngineError(ERR_READING_FROM_FILE);

    f) Close txprecnd.c and changes.


  4. Recompile each .c file in the Test Executive project into a new .obj file. To do so, load the .c file and from the source window, select Create Object File from the Options menu. It will ask you if you want to create the .obj file the current compatibility mode or all compilers. Just leave the option set at the current compatibility mode, and click OK. When prompted, replace the current version of the .obj with the new one.

    The files that you should recompile are:

    txengine.c
    txsavres.c
    txreport.c
    txprecnd.c
    txedpc.c
    txedseq.c
    txmain.c
    txlogin.c


  5. Recompile any of your object files that contain test functions.



Related Links:

Attachments:





Report Date: 01/28/1997
Last Updated: 11/12/2003
Document ID: 0TRGI3TL

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit