Problem Building a Distribution with BuildTSD.exe Using TestStand 2016

Updated Jan 10, 2018

Reported In

Software

  • TestStand 2016 SP1
  • TestStand 2013

Issue Details

I have recently upgraded TestStand from 2013 32-bit to 2016 SP1 32-bit and now when I'm trying to build a distribution with TestStand Command Line Deployment it only returns error 2:

Aborted: The TSDU was aborted while building, the installer was not built.

I am using LabVIEW and the System Exec VI to run the command and check the error code. The command I am using looks like this:

BuildTSD.exe /copyLogFiles "C:\Deployment\TsLog" /autoIncrementVersion True /SaveTSDFile "C:\Deployment\TestTS_new.tsd" "C:\Deployment\TestTS_old.tsd"

I am supporting a large number of test stations with this code and it is needed daily. 

Solution

This is a known issue with TestStand 2016 and is set to be fixed in the 2017 release. You are able to build the the deployment successfully, but the System Exec VI still returns error code 2. Even if you would ignore this code, there are the following problems:
 
  • What would happen if the user manually presses the "Abort" button in the TSDU pop-up window?
  • What if there is a real abort event?
In general, the command is written like this:

BuildTSD.exe <Optional Changes> <TSD File to Build>

The Build Status tab would return warning code 19200 if you have any optional changes to the BuildTSD.exe command, see example below:



Clearly, you cannot ignore error code 2 for all cases as it could be a real error. As a workaround, you could instead look at the log file written. The log file will contain information if the build is successful or if it failed. For example:
 
  1. If any code except code 2 is thrown, the deployment build will work as usual.
  2. If error code 2 is thrown and the log file contains the text: build_status="failed", code 2 will be thrown as it should. This happens if there is a real abort, either initiated from the user or from a faulty configuration.
  3. If error code 2 is thrown but the log file does not contain the text: build_status="failed" code 0 will be thrown.
See example below:



In the LabVIEW code above, you would replace the following sections:
 
  • <Folder path to your logfile> → C:\Deployment\TsLog
  • <File path to your new deployment> → C:\Deployment\TestTS_new.tsd
  • <File path to your old deployment> → C:\Deployment\TestTS_old.tsd

WAS THIS ARTICLE HELPFUL?

Not Helpful