File: check_cli_tools.py

package info (click to toggle)
pcp 7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,748 kB
  • sloc: ansic: 1,483,656; sh: 182,366; xml: 160,462; cpp: 83,813; python: 24,980; perl: 18,327; yacc: 6,877; lex: 2,864; makefile: 2,738; awk: 165; fortran: 60; java: 52
file content (39 lines) | stat: -rw-r--r-- 1,014 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3


import unittest
import subprocess


class TestCliTools(unittest.TestCase):
    def test_pmerr(self):
        subprocess.check_call(['pmerr', '-2']);

    def test_pminfo(self):
        subprocess.check_call(['pminfo', 'proc.nprocs'])

    def test_pcp(self):
        subprocess.check_call(['pcp'])

    def test_pmstat(self):
        subprocess.check_call(['pmstat', '-s', '1'])

    def test_pmdate(self):
        subprocess.check_call(['pmdate', '-7d', '%d%m%Y'])

    def test_pmprobe(self):
        subprocess.check_call(['pmprobe'])

    def test_pmclient(self):
        subprocess.check_call(['pmclient', '-s', '1'])

    def test_pmval(self):
        subprocess.check_call(['pmval', 'proc.nprocs', '-s', '1'])

    def test_pmiostat(self):
        subprocess.check_call(['pcp', 'iostat', '-s', '2'])

if __name__ == "__main__":
    import sys
    unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout,
                                                     verbosity=2))