File: check_cli_tools.py

package info (click to toggle)
pcp 6.3.8-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 235,180 kB
  • sloc: ansic: 1,253,622; sh: 173,998; xml: 160,490; cpp: 83,331; python: 20,482; perl: 18,302; yacc: 6,886; makefile: 2,955; lex: 2,862; 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))