PTL User's Guide
How to install PTL, how to run a test case, and how to verify the results you get.
Setting Up PTL
If you haven't already, get PBS Pro Source from GitHub
Install PTL
Building and Installing PTL from Source
1. Build PTL from Source
- Go to openpbs/openpbs
- Run autogen:
./autogen.sh
- To install PTL along with PBS Professional, use the "--enable-ptl" option with configure:
./configure --prefix=/opt/pbs --enable-ptl
2. Install Package Dependencies
To install PTL package dependencies, run the appropriate installation command as root. We list them by platform, for Python >=3.6:
CentOS
yum install python-beautifulsoup python2-defusedxml python-nose pexpect
Also install EPEL (Extra Packages for Enterprise Linux). The package name is "epel-release".
OpenSUSE
zypper install python-beautifulsoup python-defusedxml python-nose python-pexpect
Debian/Ubuntu
apt-get install python-beautifulsoup python-defusedxml python-nose python-pexpect
Inst
**Some of the above mentioned dependencies will require Extra packages for enterprise linux (EPEL) repository installed.
3. Make and Install PBS and PTL
- Run "make"
- Run "sudo make install"
PTL gets installed in the parent directory of where PBS Professional is installed.
For example if you have given install prefix=/opt/pbs, you can find your PTL installation in the /opt/ptl directory.
4. Update Your Paths
Use the following default path settings:
export PATH=$PATH:/opt/ptl/bin
export PYTHONPATH=$PYTHONPATH:/opt/ptl/lib/python3.6/site-packages/
Creating and Installing RPM Package for PTL
1. Create RPM Package for PTL
- Go to openpbs/openpbs
- Run autogen:
./autogen.sh
- To install PTL along with PBS Professional, use the "--enable-ptl" option with configure:
./configure --prefix=/opt/pbs --enable-ptl
- Run "make dist" command:
make dist
- Move the generated "openpbs-<version>.tar.gz" file to ~/rpmbuild/SOURCES
- Copy the openpbs.spec file to ~/rpmbuild/SPECS
- Run the “rpmbuild” command with the “–with ptl” argument:
rpmbuild -ba openpbs.spec --with ptl
The RPM will then be available in the “rpmbuild/RPMS” folder, along with the other openpbs rpms.
The rpm name for the PTL RPM will be openpbs-ptl-<version>.rpm
2. Install RPM Package
Use "yum install" for all the dependencies to install along with the package.
3. Update Your Paths
You may need to log in again to update your PATHs.
Configure PTL
Run the following as root:
pbs_config --make-ug
This creates the default users and groups, used for testing
Running a Test Case
Start PBS
/etc/init.d/pbs start
or
systemctl start pbs
Change Directory to Location of Test File
- Change directory to "tests", or the subdirectory where the test file resides:
cd pbspro/test/tests/
Run Your Tests Using pbs_benchpress
- To run only test_TestCase1 from TestsuiteName:
pbs_benchpress -t <TestsuiteName>.<test_TestCase1> -o ptl_test1.txt
- To run all test cases in a test suite:
pbs_benchpress -t <TestsuiteName> -o ptl_output.txt
- To run a test on a setup where the server runs on host M1 and MoMs run on hosts M1 and M2:
pbs_benchpress -t <TestsuiteName>.<test_TestCase2> -o ptl_test2.txt -l <log level> -p "servers=M1,moms=M1:M2"
Examples of Running Tests
- Example of running the "smoketest" test file:
pbs_benchpress -f pbspro/test/tests/pbs_smoketest.py -o ptl_output.txt # Using test file name
- Example of running the "smoketest" test suite:
pbs_benchpress -t SmokeTest -o ptl_output.txt
Verifying Results
Here is how to interpret the results:
pass
The test case passed with no failures. This test case did not find a bug in the product, and the test case ran without error.
fail
The test case failed with failure(s). Either the test case found a bug in the product (likely if the test case is stable), or there was a bug in the test case.
error
The test case errored with error(s). There was syntax error in a test case or in other PTL tests, or the test case found a bug in the product (unlikely), or there was a bug in the test case. Usually PTL reports errors when there is a syntax error, or steps are missing from the test case itself.
skip
The test case skipped because a required condition was not met. Required conditions can be anything such as a test case requiring two MoMs but the user specified only one MoM via '-p' when running pbs_benchpress.