CPE Sanity Tests
If you are interested in running a small set of sanity tests on your Container, please follow these instructions.
Pre-requisite
In order to extract the RPM, the system must have a tool similar to
rpm2cpio
. The installation steps below uses the rpm2cpio
tool to
extract the RPM.
Installation
Create testing directories
mkdir cpe_sanity_tests && cd cpe_sanity_tests
Download the RPM from the CPE Package Repository
wget https://<email-address>:<token>@update1.linux.hpe.com/repo/cpe/<version>/<type>/<os_ver>/<arch>/cpe-tests-<version>.rpm
Extract RPM using the
rpm2cpio
tool
rpm2cpio <CPE Test RPM> | cpio -idmv
A directory listing will display an opt directory and the CPE Test RPM
ls -l
total 40
-rw-r--r-- 1 detest employee 39981 May 24 14:50 cpe-tests-24.05-20240524195021_1837f5c9c8d1.x86_64.rpm
drwxr-xr-x 3 detest employee 18 May 24 14:52 opt
Running The Tests
Once the RPM has been extracted, navigate into the bin directory
cd opt/cray/tests/bin
The
bin
directory contains the test driverpetest.sh
It is important to explicit set the
RESOURCES
environment variable to the location of the resources directory when using thepetest.sh
driver as there are several tests that depend on this directory. The resources directory can be found underopt/cray/tests/cpe-tests/shasta/smoke/uan/
To execute the tests
RESOURCES=$(pwd)/../cpe-tests/shasta/smoke/uan/ ./petest.sh ../cpe-tests/shasta/smoke/uan/ 2>&1 | tee /tmp/cpe-tests.log
It’s a good idea to capture the output into a file so that it can be analyzed in case of failures.