2003-06-19 00:19:22 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
## $Id$
|
|
|
|
|
|
|
|
# tests whether command-line arg passing works
|
|
|
|
|
2003-07-18 21:43:12 +00:00
|
|
|
from testbase import *
|
2003-06-19 00:19:22 +00:00
|
|
|
|
|
|
|
class WorkConcat(Work):
|
2003-08-18 23:51:46 +00:00
|
|
|
def __init__(self, redundancy, **kwargs):
|
2003-06-26 00:20:44 +00:00
|
|
|
Work.__init__(self, redundancy=redundancy)
|
2003-06-19 00:19:22 +00:00
|
|
|
self.wu_template = "concat_wu"
|
|
|
|
self.result_template = "concat_result"
|
|
|
|
self.input_files = ['input']*2
|
2003-08-18 23:51:46 +00:00
|
|
|
self.__dict__.update(kwargs)
|
2003-06-19 00:19:22 +00:00
|
|
|
|
2003-07-18 21:43:12 +00:00
|
|
|
class ProjectConcat(TestProject):
|
2003-08-18 23:51:46 +00:00
|
|
|
def __init__(self, works=None, users=None, hosts=None):
|
|
|
|
(num_wu, redundancy) = get_redundancy_args()
|
2003-07-18 21:43:12 +00:00
|
|
|
TestProject.__init__(self,
|
|
|
|
appname = 'concat',
|
2003-08-18 23:51:46 +00:00
|
|
|
num_wu=num_wu, redundancy=redundancy,
|
|
|
|
expected_result = Result(),
|
2003-08-15 23:04:36 +00:00
|
|
|
works = works or [WorkConcat(redundancy=redundancy)],
|
2003-07-18 21:43:12 +00:00
|
|
|
users = users,
|
2003-08-18 23:51:46 +00:00
|
|
|
hosts = hosts)
|
|
|
|
|
|
|
|
# def check(self):
|
|
|
|
# self.sched_run('validate_test')
|
|
|
|
# result = {}
|
|
|
|
# result['server_state'] = RESULT_SERVER_STATE_OVER
|
|
|
|
# self.check_results(result)
|
|
|
|
# self.check_files_match("upload/concat_wu_%d_0", "concat_correct_output", count=self.redundancy)
|
|
|
|
# self.sched_run('assimilator')
|
|
|
|
# self.sched_run('file_deleter')
|
|
|
|
# self.check_deleted("download/input")
|
|
|
|
# self.check_deleted("upload/concat_wu_%d_0", count=self.redundancy)
|
|
|
|
|
|
|
|
# def run(self):
|
|
|
|
# self.install()
|
|
|
|
# self.sched_install('feeder')
|
|
|
|
# self.start_servers()
|
2003-06-19 00:19:22 +00:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
test_msg("standard concat application");
|
2003-06-24 21:06:32 +00:00
|
|
|
ProjectConcat()
|
|
|
|
run_check_all()
|