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):
|
|
|
|
def __init__(self, redundancy=2):
|
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-07-18 21:43:12 +00:00
|
|
|
class ProjectConcat(TestProject):
|
2003-06-26 00:20:44 +00:00
|
|
|
def __init__(self, works=None, users=None, hosts=None, redundancy=2):
|
2003-07-18 21:43:12 +00:00
|
|
|
TestProject.__init__(self,
|
|
|
|
appname = 'concat',
|
|
|
|
works = works or [WorkConcat()],
|
|
|
|
users = users,
|
|
|
|
hosts = hosts,
|
|
|
|
redundancy=redundancy)
|
2003-06-19 00:19:22 +00:00
|
|
|
|
2003-06-19 02:01:18 +00:00
|
|
|
def check(self):
|
2003-06-26 00:20:44 +00:00
|
|
|
self.sched_run('validate_test')
|
2003-06-19 00:19:22 +00:00
|
|
|
result = {}
|
|
|
|
result['server_state'] = RESULT_SERVER_STATE_OVER
|
2003-06-26 00:20:44 +00:00
|
|
|
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')
|
2003-06-19 00:19:22 +00:00
|
|
|
self.check_deleted("download/input")
|
2003-06-26 00:20:44 +00:00
|
|
|
self.check_deleted("upload/concat_wu_%d_0", count=self.redundancy)
|
2003-06-19 00:19:22 +00:00
|
|
|
|
|
|
|
def run(self):
|
|
|
|
self.install()
|
2003-06-26 00:20:44 +00:00
|
|
|
self.sched_install('feeder')
|
2003-06-19 00:19:22 +00:00
|
|
|
self.start_servers()
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
test_msg("standard concat application");
|
2003-06-24 21:06:32 +00:00
|
|
|
ProjectConcat()
|
|
|
|
run_check_all()
|