Difference between revisions of "Studio:WorkspaceSetup.pl"

From STRIDE Wiki
Jump to: navigation, search
(utility Folder)
(recovery Folder)
Line 88: Line 88:
 
===recovery Folder===
 
===recovery Folder===
  
This folder contains the OnError and OnTimeout scripts -- either a [[Creating Frameworks#OnError.pl (framework)|specific implementation]] provided by the Framework or the [[Creating Frameworks#OnError.pl (common)|default implementation]] provide by the STRIDE common files.
+
This folder contains the OnError and OnTimeout scripts – either a [[Creating Frameworks#OnError.pl (framework)|specific implementation]] provided by the Framework or the [[Creating Frameworks#OnError.pl (common)|default implementation]] provide by the STRIDE common files.
  
 
===Framework Folder===
 
===Framework Folder===

Revision as of 17:49, 27 November 2007

The WorkspaceSetup script (found in \Frameworks directory of the STRIDE install location) provides a simple command line tool for creating workspaces from a Framework. This script requires perl for execution as well as the STRIDE Test Utilities.

Usage

Summary

 perl WorkspaceSetup.pl --framework=FrameworkFoo --workspace=MyNewWorkspace [--package=PackageBar]
Parameters
-w | --workspace = WorkspaceName
Specifies the new workspace to be created (the given name is used both as the name of the workspace and the new directory in which the workspace is created).
-f | --framework = TargetFramework
Specifies the STRIDE Target Framework to use when creating the workspace. As of this writing, STRIDE provides two basic frameworks: StrideLinux for a Linux-based target and StrideWindowsHost for a host-based simulation. There is also an empty framework implementation called StrideDefault that will simply prompt users to manually complete the device-specific steps as necessary. Customers may create additional frameworks and specify additional search paths for this script to use to locate the frameworks. If not specified, the default value for this parameter is StrideDefault.
--frameworkdir = FrameworkSearchDirectory
Specifies an additional directory path to search for the specified framework. If the framework is not found in the default STRIDE Frameworks directory, these directories will be searched. This option can be specified multiple times to add multiple directories to the framework search path.
-p | --package = PackageName
Specifies a Test Package to add to the workspace when it is created. The name should match a directory name for the desired package as it appears in one of the package search directories (or in the default STRIDE packages directory). If no packages are specified, the workspace will be created without any tests or additional SCL source in it. This option can be specified multiple times to add multiple packages to the new workspace.
-d | --packagedir = PackageSearchDirectory
Specifies an additional directory path to search for packages. For any package that is specified with the --package option, we first look in the packages directory in the STRIDE insatllation directory. If it is not found there, we will search in the location(s) specified by this option. This option can be specified multiple times to add multiple additional directories to the packages search path.
-a | --altconfig = configname
Some frameworks include minor variations to support slightly different hardware. In these cases, only the CommonSettings.pm and WorkspaceConfig.pm files need to differ. Framework authors can create different versions of these files in a single framework. These alternate versions should be named CommonSettings_[altconfig].pm and WorkspaceConfig_[altconfig].pm. Specifying the altconfig parameter to WorkspaceSetup will cause it to use these alternate configuration files when creating the workspace instead of the standard one.

Workspace Layout

The workspaces that are created by WorkspaceSetup will have the following files and folders (items in <brackets> indicate folders):

 <Script Files>
   <build>
     CheckEnv.pl
     PreprocessTestClasses.pl
     CompileWorkspace.pl
     CreateInterceptModule.pl
     BuildStrideAgent.pl
     <Intercept Module Overrides>
       <{Package_X}>
         (optional package specific scripts, grouped into a package folder) 
       <...> 
   <setup>
     StartStrideAgent.pl
     ConnectPanel.pl
   <test>
       <{Package_X}>
         (package specific test scripts, grouped into a package folder)
       <...> 
   <teardown>
     DisconnectPanel.pl
     StopStrideAgent.pl
     TweakResults.pl
   <utility>
     (optional Framework specific utility libraries)
     <recovery>
       OnError.pl
       OnTimeout.pl
     CommonSettings.pm
     FrameworkUtilities.pm
 <Source Files>
   <Framework>
     strideIMProbe_SCL.h
     srTest.h
   <{Package_X}>
     (optional package specific source, grouped into a package folder) 
   <...>

build Folder

This folder contains the general and Framework-specific scripts necessary for building the STRIDE workspace and strideAgent device image.

Intercept Module Overrides Folder

This folder may contain one or more Test Package-specific scripts for properly configuring the Intercept Module settings for the interfaces associated with the package.

setup Folder

This folder contains the scripts necessary to transfer the strideAgent image, start strideAgent executing and initiate a STRIDE connection to the target application.

test Folder

This folder contains all package-specific tests, grouped in sub-folders by package name.

teardown Folder

This folder contains the scripts necessary to stop the strideAgent executable and clean up anything associated with the strideAgent (image file, application resources, etc).

utility Folder

This folder contains utility libraries that are associated with the workspace. Some files come from the common STRIDE Framework, while others are Framework-specific. Not all of the files in this directory tree are included in execution; as such, they are in the workspace primarily for convenience to the users.

recovery Folder

This folder contains the OnError and OnTimeout scripts – either a specific implementation provided by the Framework or the default implementation provide by the STRIDE common files.

Framework Folder

This folder contains source code required for general Framework test execution and recovery.