boinc/test/test_1sec.py

29 lines
778 B
Python
Raw Normal View History

#!/usr/bin/env python
## $Id$
# This tests whether the client handles multiple projects, and whether CPU
# time is divided correctly between projects The client should do work for
# project 2 5 times faster than for project 1
from boinc import *
from test_uc import *
if __name__ == '__main__':
test_msg("multiple projects with resource share");
host = Host()
user = UserUC()
projects = []
for i in range(2):
project = ProjectUC(users=[user], hosts=[host],
short_name="test_1sec_%d"%i,
redundancy=5)
project.resource_share = [1, 5][i]
projects.append(project)
project.run()
host.run()
for project in projects:
project.check()
project.stop()