root/tester/dpytest

Revision 67c4ffa64923191771e255746fbcbf382bc1aabc, 1.1 KB (checked in by Frederic Lepied <frederic.lepied@…>, 3 years ago)

display only requested tests

  • Property mode set to 100755
Line 
1#!/usr/bin/python
2#---------------------------------------------------------------
3# Project         : tester
4# File            : dpytest
5# Copyright       : 2009 Splitted-Desktop Systems
6# Author          : Frederic Lepied
7# Created On      : Sun Feb  1 13:54:41 2009
8# Purpose         : report the list of available tests or information
9#                 about tests for one system.
10#---------------------------------------------------------------
11
12import sys
13import settings
14from pxe.models import *
15from pxe.common import *
16from tester.models import *
17
18if len(sys.argv) != 2:
19    error('Usage: %s <system name>|-l' % sys.argv[0])
20
21if sys.argv[1] == '-l':
22    for s in TestName.objects.all():
23        print s.name
24else:
25    try:
26        system = System.objects.get(name=sys.argv[1])
27    except System.DoesNotExist:
28        error('System %s not defined' % sys.argv[1])
29   
30    print 'Name:', system.name
31   
32    logs = TestLog.objects.filter(system=system, status='R').order_by('-date')
33
34    for l in logs:
35        print l.date, l.test_name.name, l.status
36   
37# dpytest ends here
Note: See TracBrowser for help on using the browser.