root/trunk/libffado/support/tools/ffado-diag-static

Revision 1821, 2.8 kB (checked in by arnonym, 11 years ago)

Some layouting (spaces between the words and the dots). And fix #277 by checking for pyuic4 to see if a Qt4 version of pyqt is installed.

  • Property svn:mergeinfo set to
  • Property svn:executable set to *
Line 
1 #!/usr/bin/python
2 #
3
4 #
5 # Copyright (C) 2008 Pieter Palmers
6 #               2009 Arnold Krilles
7 #
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, version 3 of the License.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 #
20
21 #
22 # Test for common FFADO problems
23 #
24
25 import sys
26
27 # Add the path of the installed dependent files
28 import os
29 import commands
30 import re
31 import logging
32
33 from ffado_diag_helpers import *
34
35 welcome_msg = """
36
37 FFADO static diagnostic utility
38 ============================
39 (C) 2008 Pieter Palmers
40 (C) 2009 Arnold Krille
41
42 """
43
44 help_msg = """
45 Usage: ffado-diag [verboselevel]
46
47   verboselevel : verbosity level. (optional)
48
49 """
50
51 ## logging setup
52 logging.basicConfig()
53 log = logging.getLogger('staticdiag')
54
55 ## main program
56 if __name__== '__main__':
57
58     print welcome_msg
59
60     num_args = len(sys.argv)
61     if num_args not in [1,2]:
62         print help
63         sys.exit(0)
64
65     if num_args == 2:
66         loglevel = eval(sys.argv[1])
67         if loglevel == 1:
68             logging.getLogger('staticdiag').setLevel(logging.INFO)
69         elif loglevel == 2:
70             logging.getLogger('staticdiag').setLevel(logging.DEBUG)
71
72     print "=== CHECK ==="
73
74     # check libraries
75     print "   gcc ............... %s" % get_version_first_line('gcc --version')
76     print "   g++ ............... %s" % get_version_first_line('g++ --version')
77     print "   PyQt4 (by pyuic4) . %s" % get_version_first_line('pyuic4 --version')
78     print "   jackd ............. %s" % get_version_first_line('jackd --version')
79     print "     path ............ %s" % get_command_path('jackd')
80     print "     flags ........... %s" % get_package_flags("jack")
81     print "   libraw1394 ........ %s" % get_package_version("libraw1394")
82     print "     flags ........... %s" % get_package_flags("libraw1394")
83     print "   libavc1394 ........ %s" % get_package_version("libavc1394")
84     print "     flags ........... %s" % get_package_flags("libavc1394")
85     print "   libiec61883 ....... %s" % get_package_version("libiec61883")
86     print "     flags ........... %s" % get_package_flags("libiec61883")
87     print "   libxml++-2.6 ...... %s" % get_package_version("libxml++-2.6")
88     print "     flags ........... %s" % get_package_flags("libxml++-2.6")
89     print "   dbus-1 ............ %s" % get_package_version("dbus-1")
90     print "     flags ........... %s" % get_package_flags("dbus-1")
91
Note: See TracBrowser for help on using the browser.