8000 pmdastatsd new QA and small agent changes by Erbenos · Pull Request #836 · performancecopilot/pcp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pmdastatsd new QA and small agent changes #836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 6 additions & 32 deletions qa/1599
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# PCP QA Test No. 1599
# Run each of the statsd PMDA ruby tests.
# Run each of the statsd PMDA python tests.
#
# Copyright (c) 2019 Red Hat.
#
Expand All @@ -9,14 +9,11 @@ seq=`basename $0`
echo "QA output created by $seq"

# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check
. ./common.python

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider replacing the above three lines with common.python now.

test -e $PCP_PMDAS_DIR/statsd/pmdastatsd || _notrun "statsd PMDA not installed"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment at the start of this file refering to 'ruby' needs updating.

# NOTE: Miroslav is planning to re-work this in python/shell
which ruby >/dev/null 2>&1 || _notrun "ruby not installed"
_check_valgrind

_cleanup()
{
Expand All @@ -28,41 +25,18 @@ status=1 # failure is the default!
$sudo rm -rf $tmp $tmp.* $seq.full
trap "_cleanup; exit \$status" 0 1 2 3 15

pmdastatsd_remove()
{
echo
echo "=== remove statsd agent ==="
cd $PCP_PMDAS_DIR/statsd
$sudo ./Remove >$tmp.out 2>&1
_filter_pmda_remove <$tmp.out
}

pmdastatsd_install()
{
echo
echo "=== statsd agent installation ==="
cd $PCP_PMDAS_DIR/statsd
$sudo ./Install </dev/null >$tmp.out 2>&1
cat $tmp.out >>$here/$seq.full
_filter_pmda_install <$tmp.out
}

_prepare_pmda statsd
# note: _restore_auto_restart pmcd done in _cleanup_pmda()
trap "_cleanup_pmda statsd; exit \$status" 0 1 2 3 15
_stop_auto_restart pmcd

# real QA test starts here
pmdastatsd_install

cd $here/statsd
scripts=`ls *.rb | LC_COLLATE=POSIX sort`
cd $here/statsd/src
scripts=`find cases -name *.py | LC_COLLATE=POSIX sort`
for script in $scripts
do
ruby $script
$python $script $here/statsd/output
done
cd $here

pmdastatsd_remove
status=0
exit
Loading
0