Drop unused condition check
[pcp.git] / qa / 1081
blobb547440da3cbb96546add6e3b8fd1ec078febd7a
1 #!/bin/sh
2 # PCP QA Test No. 1081
3 # Exercise the pcp-python(1) script.
5 # Copyright (c) 2015 Red Hat.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 which python2 >/dev/null 2>&1 || _notrun "No binary named python2 found"
17 which python3 >/dev/null 2>&1 || _notrun "No binary named python3 found"
19 status=1 # failure is the default!
20 $sudo rm -rf $tmp.* $seq.full
21 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
23 _filter_version()
25 sed -e 's/\..*//g'
28 # real QA test starts here
29 echo "Checking switch to python3:"
30 PCP_PYTHON_PROG=python3 $PCP_BIN_DIR/pcp python --version 2>&1 | _filter_version
31 echo "Checking switch to python2:"
32 PCP_PYTHON_PROG=python2 $PCP_BIN_DIR/pcp python --version 2>&1 | _filter_version
34 # success, all done
35 status=0
36 exit