pcp
[Top] [All Lists]

Script to run individual QA test cases

To: pcp developers <pcp@xxxxxxxxxxx>
Subject: Script to run individual QA test cases
From: Marko Myllynen <myllynen@xxxxxxxxxx>
Date: Mon, 7 Mar 2016 15:39:45 +0200
Delivered-to: pcp@xxxxxxxxxxx
Organization: Red Hat
Reply-to: Marko Myllynen <myllynen@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
Hi,

FWIW, I'm using the below kind of script to setup my environment
to allow me running individual QA test cases with a non-system
PCP installation. This is handy when working on some completely
isolated features.

1) PCP installation under /tmp/pcp:

SYSTEMD_SYSTEMUNITDIR=/tmp/pcp/lib/systemd/system ./configure --prefix=/tmp/pcp 
--with-secure-sockets=no --with-static-probes=yes --with-infiniband=no 
--with-discovery=no --with-webapi=no --with-manager=no --with-pmdajson=no 
--with-perfevent=yes --with-qt=yes --with-x=yes
make -j 4
make -j 4 install

2) Setup the test environment and run a test case to make sure
all is ok:

#!/bin/sh

PCP_INSTALL=/tmp/pcp
PCP_QA_TEST=$PCP_INSTALL/var/lib/pcp/testsuite
PCP_PYTHON_VER=3.3

mkdir -p $PCP_INSTALL/var/tmp $PCP_INSTALL/var/lib/pcp/pmns
cp -p /NotBackedUp/src/pcp.build/src/pmns/* /tmp/pcp/var/lib/pcp/pmns/

printf "#!/bin/sh\nexit 0\n" > $PCP_QA_TEST/994

echo
echo export PATH=$PCP_INSTALL/bin:\$PATH
echo export LD_LIBRARY_PATH=$PCP_INSTALL/lib
echo export PCP_DIR=$PCP_INSTALL
echo export PYTHONPATH=$PCP_INSTALL/lib64/python$PCP_PYTHON_VER/site-packages/
echo here=$PCP_QA_TEST
echo cd \$here
echo

echo "Configuring and testing QA..."
export PATH=$PCP_INSTALL/bin:$PATH
export LD_LIBRARY_PATH=$PCP_INSTALL/lib
export PCP_DIR=$PCP_INSTALL
export PYTHONPATH=$PCP_INSTALL/lib64/python$PCP_PYTHON_VER/site-packages/
cd $PCP_QA_TEST
if [ ! -f ./localconfig ]; then
  printf "y\ny\n" | ./chk.setup
fi
./check 1069

Cheers,

-- 
Marko Myllynen

<Prev in Thread] Current Thread [Next in Thread>
  • Script to run individual QA test cases, Marko Myllynen <=