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

  1. Create testing directories

mkdir cpe_sanity_tests && cd cpe_sanity_tests
  1. 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
  1. Extract RPM using the rpm2cpio tool

rpm2cpio <CPE Test RPM> | cpio -idmv
  1. 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

  1. Once the RPM has been extracted, navigate into the bin directory

cd opt/cray/tests/bin
  1. The bin directory contains the test driver petest.sh

  2. It is important to explicit set the RESOURCES environment variable to the location of the resources directory when using the petest.sh driver as there are several tests that depend on this directory. The resources directory can be found under opt/cray/tests/cpe-tests/shasta/smoke/uan/

  3. 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.