Framework Setup: Difference between revisions
(11 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
* add the '''STRIDE Compiler''' (aka ''Build tools'') to the software build system. | * add the '''STRIDE Compiler''' (aka ''Build tools'') to the software build system. | ||
The desktops supported are Windows | The desktops supported are Windows and Linux. | ||
= Packages = | = Packages = | ||
Line 11: | Line 11: | ||
;Windows (x86) | ;Windows (x86) | ||
:<tt>STRIDE_framework-windows_5.x.yy.zip</tt> | :<tt>STRIDE_framework-windows_5.x.yy.zip</tt> | ||
;Linux ( | ;Linux (x86_64) | ||
:<tt>STRIDE_framework-linux_5 | :<tt>STRIDE_framework-x86_64-linux_5.x.yy.tgz</tt> | ||
Please see the appropriate installation instructions below. | Please see the appropriate installation instructions below. | ||
Line 49: | Line 47: | ||
* Remove <tt>\stride</tt> directory. | * Remove <tt>\stride</tt> directory. | ||
= Linux | = Linux = | ||
The following installation example assumes the the installation package is located in your home directory and that the directory <tt>~/stride</tt> exists. You can choose to install to a different location (all instructions below assume you are installing into <tt>~/stride</tt>). | The following installation example assumes the the installation package is located in your home directory and that the directory <tt>~/stride</tt> exists. You can choose to install to a different location (all instructions below assume you are installing into <tt>~/stride</tt>). | ||
Line 75: | Line 73: | ||
stride -h | stride -h | ||
=== Uninstalling === | === Uninstalling === | ||
Line 102: | Line 86: | ||
<u>''NOTE:''</u> ''It's not necessary to understand the workings of Stride to perform evaluation or training. The framework package contains a [[Stride Sandbox]] that utilizes a SDK that is set up with appropriate options and settings to enable "out of the box" functionality.'' | <u>''NOTE:''</u> ''It's not necessary to understand the workings of Stride to perform evaluation or training. The framework package contains a [[Stride Sandbox]] that utilizes a SDK that is set up with appropriate options and settings to enable "out of the box" functionality.'' | ||
==<tt>bin</tt>== | ===<tt>bin</tt>=== | ||
This directory contains the [[Build Tools|Stride Build Tools]] and the [[Stride Runner]]. | This directory contains the [[Build Tools|Stride Build Tools]] and the [[Stride Runner]]. | ||
Line 109: | Line 93: | ||
The [[Stride Runner]] is the program you use to run tests from the host. | The [[Stride Runner]] is the program you use to run tests from the host. | ||
==<tt>lib</tt>== | ===<tt>lib</tt>=== | ||
This directory contains a set of Stride specific core scripting libraries along with prebuild binaries intended to be used for Perl based test scripts. | This directory contains a set of Stride specific core scripting libraries along with prebuild binaries intended to be used for Perl based test scripts. | ||
==<tt>samples</tt>== | ===<tt>samples</tt>=== | ||
The Samples directory contains a number of source files used for training and evaluation. | The Samples directory contains a number of source files used for training and evaluation. | ||
==<tt>SDK</tt>== | ===<tt>SDK</tt>=== | ||
This directory contains the sub-directories <tt>Posix/Windows</tt> and <tt>Runtime</tt>, which contain source code that comprises the [[STRIDE Runtime]]. These sources are built in to a static libary (e.g. STRIDE Runtime library - <tt>stride.a/lib</tt>) as a dependency of your Test Application. | This directory contains the sub-directories <tt>Posix/Windows</tt> and <tt>Runtime</tt>, which contain source code that comprises the [[STRIDE Runtime]]. These sources are built in to a static libary (e.g. STRIDE Runtime library - <tt>stride.a/lib</tt>) as a dependency of your Test Application. | ||
Line 126: | Line 110: | ||
= Perl Installation (Optional) = | = Perl Installation (Optional) = | ||
If you intend to use '''Test Scripts''' you will need a recent version of Perl ( | If you intend to use '''Test Scripts''' you will need a recent version of Perl (x86_64 with threads support) installed. | ||
As of this writing, we support only | As of this writing, we support only versions 5.18.x, 5.20.x, 5.22.x, 5.24.x, 5.26.x, 5.28.x and 5.30.x of Perl. | ||
== Windows == | == Windows == | ||
It is required to use the | It is required to use one of the '''64-bit''' Perl distributions from [http://strawberryperl.com/releases.html Strawberry Perl] (or one provided by [http://www.activestate.com/activeperl/downloads ActiveState]). | ||
Depending on the way the installation was performed, you may have to update your PATH and reset any custom PERL5LIB, e.g.: | Depending on the way the installation was performed, you may have to update your PATH and reset any custom PERL5LIB, e.g.: | ||
Line 145: | Line 129: | ||
* [http://search.cpan.org/perldoc/Config::Tiny Config::Tiny] | * [http://search.cpan.org/perldoc/Config::Tiny Config::Tiny] | ||
For Strawberry Perl, simplest method for installing packages is via the <tt>cpanm.bat</tt> utility script. To install the latest stable version of PACKAGE_NAME (the package to install) simply execute: | |||
cpanm.bat PACKAGE_NAME | |||
For ActiveState Perl, you can easily install these packages using the [http://docs.activestate.com/activeperl/5.16/faq/ActivePerl-faq2.html ppm tool]. If you access the Internet via a proxy make sure to read [http://docs.activestate.com/activeperl/5.16/faq/ActivePerl-faq2.html#ppm_and_proxies this]. Simple command-line installation of PACKAGE_NAME (the package to install) typically just requires typing: | |||
ppm install PACKAGE_NAME | ppm install PACKAGE_NAME | ||
== Linux | == Linux == | ||
We recommend you to use the standard | We recommend you to use the standard '''64-bit''' Perl distribution that comes with your OS version (or one provided by [http://www.activestate.com/activeperl/downloads ActiveState]). | ||
Depending on the way the installation was performed, you may have to update your PATH and reset any custom PERL5LIB, e.g.: | Depending on the way the installation was performed, you may have to update your PATH and reset any custom PERL5LIB, e.g.: | ||
Line 162: | Line 147: | ||
The following additional (non-standard) Perl packages are also required for full functionality of Stride tests in perl: | The following additional (non-standard) Perl packages are also required for full functionality of Stride tests in perl: | ||
* [http://search.cpan.org/perldoc/Time::HiRes Time::HiRes] | |||
* [http://search.cpan.org/perldoc/YAML::XS YAML::XS] | * [http://search.cpan.org/perldoc/YAML::XS YAML::XS] | ||
* [http://search.cpan.org/perldoc/Class::ISA Class::ISA] | * [http://search.cpan.org/perldoc/Class::ISA Class::ISA] |
Latest revision as of 23:03, 8 March 2023
Introduction
The packages described below contain all of the source and binary components required to
- setup a desktop with the STRIDE Runner
- integrate the STRIDE Runtime with the target device
- add the STRIDE Compiler (aka Build tools) to the software build system.
The desktops supported are Windows and Linux.
Packages
Files are installed by unzipping the provided package to your PC. Packages are available targeting the following operating systems (your version number may be different than that shown):
- Windows (x86)
- STRIDE_framework-windows_5.x.yy.zip
- Linux (x86_64)
- STRIDE_framework-x86_64-linux_5.x.yy.tgz
Please see the appropriate installation instructions below.
Windows
The following installation example assumes the the installation package is located in your root directory and that the directory \stride exists. You can choose to install to a different location (all instructions below assume you are installing into \stride).
The example uses the open source 7-Zip utility to unzip the archive.
cd \stride "\Program Files\7-Zip\7z" x ..\STRIDE_framework-windows_5.x.yy.zip
Once unzipped, files will have been installed under the \stride directory.
Updated PATH
As a final step, you will need to update your PATH environment variable to include \stride\bin. For instructions on modifying it, please see http://support.microsoft.com/kb/310519.
NOTE: Make sure to insert no spaces before and after the semicolon separators(;).
Create/Update STRIDE_DIR
Verify that the STRIDE_DIR environment variable exists and is set to the root installation directory (\stride). If this environment variable does not yet exist, you should create it as a user environment variable.
To confirm installation and display help run the following command in a console window:
stride -h
Uninstalling
To uninstall STRIDE simply:
- Remove any reference to \stride\bin in your PATH environment variable.
- Remove STRIDE_DIR environment variable.
- Remove \stride directory.
Linux
The following installation example assumes the the installation package is located in your home directory and that the directory ~/stride exists. You can choose to install to a different location (all instructions below assume you are installing into ~/stride).
cd ~/stride tar -zxvf ../STRIDE_framework-linux_5.x.yy.tgz
Once unzipped, files will have been installed under the ~/stride directory.
Updated PATH
As a final step, you will need to update your PATH environment variable to include ~/stride/bin.
If you use the bash shell, enter the following at a command prompt, or to automatically set at each login, add to your .bashrc:
export PATH=$PATH:~/stride/bin
For other shells, and more information, please see the following articles:
- http://www.linuxheadquarters.com/howto/basic/path.shtml.
- http://en.wikipedia.org/wiki/Environment_variable
Create/Update STRIDE_DIR
Verify that the STRIDE_DIR environment variable exists and is set to the root installation directory (~/stride). If this environment variable does not yet exist, you should automatically set at each login, add to your .bashrc:
export STRIDE_DIR=~/stride
To confirm installation and display help run the following command in a console window:
stride -h
Uninstalling
To uninstall STRIDE simply:
- Remove any reference to ~/stride/bin in your PATH environment variable.
- Remove STRIDE_DIR environment variable.
- Remove ~/stride directory.
Directories and Files
To integrate Stride in to your target build system it is required to understand the directories layout and the files inside then. A quick orientation is shown below.
NOTE: It's not necessary to understand the workings of Stride to perform evaluation or training. The framework package contains a Stride Sandbox that utilizes a SDK that is set up with appropriate options and settings to enable "out of the box" functionality.
bin
This directory contains the Stride Build Tools and the Stride Runner.
The build tools are invoked early on in the target software build process to generate special Stride artifacts that are used in subsequent build steps and later when running tests against the target. When using the Stride Sandbox, these files are needed on the host computer since this is where we are building the target application. In a production environment, these files are needed only on the computer that performs the target software build.
The Stride Runner is the program you use to run tests from the host.
lib
This directory contains a set of Stride specific core scripting libraries along with prebuild binaries intended to be used for Perl based test scripts.
samples
The Samples directory contains a number of source files used for training and evaluation.
SDK
This directory contains the sub-directories Posix/Windows and Runtime, which contain source code that comprises the STRIDE Runtime. These sources are built in to a static libary (e.g. STRIDE Runtime library - stride.a/lib) as a dependency of your Test Application.
The Posix and Windows directories contain the target operating system specific source and configuration. If you are interested in the details, consult the articles Posix SDK and Windows SDK. Each of them contains the following sub-directories:
- settings
- This directory contains a set of stride.XXX.s2scompile files, where XXX coresponds to the target CPU architecture (i.e. X86, ARM...). These files, used by the STRIDE Compiler, specify target CPU characteristics (endian-ness, data sizes and alignments). On Windows, this directory also contains a set of files for building with Visual Studio.
- src
- This directory contains the source of the target Platform Abstraction Layer PAL. In addition there is a sample Makefile used to produce a sandbox TestApp.
Perl Installation (Optional)
If you intend to use Test Scripts you will need a recent version of Perl (x86_64 with threads support) installed.
As of this writing, we support only versions 5.18.x, 5.20.x, 5.22.x, 5.24.x, 5.26.x, 5.28.x and 5.30.x of Perl.
Windows
It is required to use one of the 64-bit Perl distributions from Strawberry Perl (or one provided by ActiveState).
Depending on the way the installation was performed, you may have to update your PATH and reset any custom PERL5LIB, e.g.:
set PATH=...\perl\bin;%PATH% set PERL5LIB=
The following additional (non-standard) Perl packages are also required for full functionality of STRIDE tests in perl:
For Strawberry Perl, simplest method for installing packages is via the cpanm.bat utility script. To install the latest stable version of PACKAGE_NAME (the package to install) simply execute:
cpanm.bat PACKAGE_NAME
For ActiveState Perl, you can easily install these packages using the ppm tool. If you access the Internet via a proxy make sure to read this. Simple command-line installation of PACKAGE_NAME (the package to install) typically just requires typing:
ppm install PACKAGE_NAME
Linux
We recommend you to use the standard 64-bit Perl distribution that comes with your OS version (or one provided by ActiveState).
Depending on the way the installation was performed, you may have to update your PATH and reset any custom PERL5LIB, e.g.:
export PATH=.../perl/bin:$PATH export PERL5LIB=
The following additional (non-standard) Perl packages are also required for full functionality of Stride tests in perl:
The simplest method for installing packages is via the CPAN shell. If you access the Internet via a proxy make sure to set the appropriate CPAN config variables. To start the shell in interactive mode:
perl -MCPAN -e shell
NOTE: If your perl is installed in a system directory (/usr/bin/perl, for instance), you will need root access to install shared modules.
Once in the shell, search for and install the latest stable version of PACKAGE_NAME (the package to install):
install PACKAGE_NAME
The STRIDE perl packages also need to load your system's libperl.so (shared object file) at runtime. Depending on your system, this file should be loadable from a perl CORE directory or from one of the shared system directories. If you DO NOT have this shared library on your system, you might need to install a libperl-dev, perl-devel or perl-libs package in order to get it. Here is how you can do that on the console of some Linux distributions:
- Debian / Ubuntu
sudo apt-get install libperl-dev
- Fedora / CentOS / RHEL
sudo yum -y install perl-devel
Validation
Once you have installed Perl we recommend you to run the following command in a console window:
stride --diagnostics Perl --output PerlCheck
If everything was properly set up you should get the following output:
Executing diagnostics... script "/Perl" > 2 passed, 0 failed, 0 in progress, 0 not in use, 486.95 ms. --------------------------------------------------------------------- Summary: 2 passed, 0 failed, 0 in progress, 0 not in use, 486.95 ms Saving result file...
In addition a report file with name PerlCheck.xml will be created in the current directory. If interested in the details you could open that report file in a browser of your choice.