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
|
#!/usr/bin/python
import os
import sys
import subprocess
xephyr = subprocess.Popen(['Xephyr', ':2.0', '-screen', '1024x768' ])
os.environ['DISPLAY'] = ':2.0'
passed = 0
base_args = lambda test: ('--port 9999 --qemu rhel6 --guestdebug 2 --second --shutdown --wintest %s' % test).split()
tests = [
# ("shutdown", []),
# ("shutdown", ['--qxl', '2']),
("suspend", []),
("resolution1", []),
("suspend2", ['--qxl', '2']),
("resolution2", ['--qxl', '2']),
]
for test, extra in tests:
print "-- %15s -------------------------------------------" % test
if os.system('win7 %s' % (' '.join(extra + base_args(test)))):
print "failed %s" % test
sys.exit(1)
passed += 1
print "-"*80
print "passed %d/%d" % (passed, len(tests))
xephyr.kill()
|