From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment Utility can't find files

One of the standard search directories is “Current workspace directory”.

I’ve discovered that the Deployment Utility may or may not look there (regardless of whether it is checked), and it may or may not look in its subdirectories (regardless of whether “Search Subdirectories” is checked.

It works OK on some of our computers, but not on others.

In order to insure that the build always finds the files, I have to explicitly include in the search directories the folder that contains the .tsw file.

Is there a way to force the Deployment Utility to really look in the “Current workspace directory”?

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 1 of 8
(6,036 Views)

Good Day

 

I am curious by the fact the Deployment Utility works as expected on some machines but not others. Do you get different results from trying to deploy the same .tsd file from two different computers? Do you run into any error messages saying it cannot find the Workspace File location?

 

Regards,

Connor

0 Kudos
Message 2 of 8
(6,000 Views)

Yes, it's the same .tsd file.

No, no error msg about .tsw.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 8
(5,986 Views)

You may want to compare the TestExec.ini file on both computers. This file contains what search directories TestStand searches in. If they do not include the directory that the Workspace is in then it will not search it. 

0 Kudos
Message 4 of 8
(5,940 Views)

The deployment utility will create a list of top-level files to deploy from a workspace, a directory or both. The distribution sources (workspace and directory) will only point to the root element which we will use to create the tree of files to include, these files will be specified with an absolute path to the file and we will not use the search directories to find them.

 

During the analysis phase the deployment utility will find all the required top-level files for the deployment. If you selected to deploy files from a workspace, the deployment utility will iterate over every worskpace object in the workspace and call GetAbsolutePath to get its path. If the problem you are seeing is with top-level files, then I would recommend calling into this method to verify that the files are found in the correct location.

 

Once we get all the absolute paths for the workspace objects we search those files, depending on their type. At this point things start getting a bit more complicated because of the large number of file types. If your workspace contains a sequence (we will find the path of the sequence by calling GetAbsolutePath on the workspace object, see the previous step), then we will analyze the sequence and for every step we will call the public API of its adapter to get the path; for example, for the LabVIEW adapter we will use VIPath and ProjectPath (in general, there are some special cases where we call other methods) to figure out which VI to deploy. If the problem is with one of your code modules I would recommend calling into the public path methods in the adapter that is calling into your code and making sure that the files are found in the correct location.

 

Without more information about your problem it is hard to give you a good answer, because the deployment utility (and test systems in general) are complicated pieces of code that deal with a great deal of complexity. Some of the things that might help us give you a more specific answer to your problem are:

 

  • What version of TestStand are you using?
  • What kind of deployment are you creating (VIs, DLLs, .Net assemblies? Creating Packed Libraries? Sending to multiple destinations?)?
  • Can you simplify the test case so that we can reproduce with relatively few files? Could you provide a sample that shows the error?
  • Are there any differences that you can think of between the computers where the deployment works and the computers where it doesn't?
  • When is the error happening? What is happening exactly? For example: Are you getting an error in TSDU that says that files couldn't be found? Are you building the deployment and the files don't show up in the image directory? 

 

I hope this helps.

 

- Francisco

Message 5 of 8
(5,872 Views)

Your description of the Deployment Utility does not match the behavior that I observe.

Whether or not it finds files does indeed depend upon what the search directories are set to.

It does not iterate over every worskpace object (well, maybe it does, but if so, it certainly doesn't include everything that it would come across).

 

I am using Teststand 2013.

I don't find a setting in the Deployment Utility for a "kind of deployment" (but my code modules are VIs).  I'm only sending to a single destination.

I've tried copying the Teststand .INI files from computers on which it works, to those on which it doesn't, but that had no effect.

I don't know of any significant differences between the computers on which TSDU works, and those on which it doesn't.

The first indication of a problem is when it analyzes the source files.  Many necessary source files are missing from the list.

When a build is attempted, there is a warning: Warning: The deployment utility did not locate the following file(s), which causes an error when building a deployable image or an installer:

It then lists all the files it couldn't find.  After that it throws an error: Error: The following code module(s) were not located:

It lists only a single file (presumably the first one that it couldn't find).

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 8
(5,852 Views)

CAR 245156 has been issued for this problem.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 8
(5,723 Views)

To provide a bit more detail, we discovered that Paul's issue is occurring because of a relatively unusual folder hierarchy where Sequence Files and Code Modules folders are both subfolders of the workspace file directory. If a relative path is specified for the code modules in the sequence files, that path will be relative to the workspace file. Although this works for executing the sequence, the TestStand Deployment Utility is not able to locate VIs with a path relative to the workspace file.

 

If anyone else encounters this problem, here are two ways to work around the issue:

 

A) Before deployment, configure a search directory to point at the same directory the workspace file is in. This will allow the Deployment Utility to locate the files.

 

B) Rearrange the file structure so that the sequence files are in the same directory as the workspace file, or above the code modules in the hierarchy. This will allow the relative paths to resolve properly. 

 

TestStand R&D is aware of this issue and will be considering our options for addressing it in a future version of TestStand. If anyone else encounters this issue and is unable to use one of the above workarounds, please let me know.

0 Kudos
Message 8 of 8
(5,704 Views)