def tsuite_setup(trun, declr, enum):
suite = copy.deepcopy(TESTSUITE)  <EOL>suite["<STR_LIT:name>"] = declr.get("<STR_LIT:name>")<EOL>if suite["<STR_LIT:name>"] is None:<EOL><INDENT>cij.err("<STR_LIT>")<EOL>return None<EOL><DEDENT>suite["<STR_LIT>"] = declr.get("<STR_LIT>")<EOL>suite["<STR_LIT>"] = "<STR_LIT>" % (suite["<STR_LIT:name>"], enum)<EOL>suite["<STR_LIT>"] = os.sep.join([trun["<STR_LIT>"]["<STR_LIT>"], suite["<STR_LIT>"]])<EOL>suite["<STR_LIT>"] = os.sep.join([suite["<STR_LIT>"], "<STR_LIT>"])<EOL>suite["<STR_LIT>"].update(copy.deepcopy(trun["<STR_LIT>"]))<EOL>suite["<STR_LIT>"].update(copy.deepcopy(declr.get("<STR_LIT>", {})))<EOL>os.makedirs(suite["<STR_LIT>"])<EOL>os.makedirs(suite["<STR_LIT>"])<EOL>suite["<STR_LIT>"] = hooks_setup(trun, suite, declr.get("<STR_LIT>"))<EOL>suite["<STR_LIT>"] = declr.get("<STR_LIT>", [])<EOL>suite["<STR_LIT>"] = "<STR_LIT>" % suite["<STR_LIT:name>"]<EOL>suite["<STR_LIT>"] = os.sep.join([trun["<STR_LIT>"]["<STR_LIT>"], suite["<STR_LIT>"]])<EOL>tcase_fpaths = []                               <EOL>if os.path.exists(suite["<STR_LIT>"]):              <EOL><INDENT>suite_lines = (<EOL>l.strip() for l in open(suite["<STR_LIT>"]).read().splitlines()<EOL>)<EOL>tcase_fpaths.extend(<EOL>(l for l in suite_lines if len(l) > <NUM_LIT:1> and l[<NUM_LIT:0>] != "<STR_LIT:#>")<EOL>)<EOL><DEDENT>else:                                           <EOL><INDENT>tcase_fpaths.extend(declr.get("<STR_LIT>", []))<EOL><DEDENT>if len(set(tcase_fpaths)) != len(tcase_fpaths):<EOL><INDENT>cij.err("<STR_LIT>")<EOL>return None<EOL><DEDENT>for tcase_fname in tcase_fpaths:                <EOL><INDENT>tcase = tcase_setup(trun, suite, tcase_fname)<EOL>if not tcase:<EOL><INDENT>cij.err("<STR_LIT>")<EOL>return None<EOL><DEDENT>suite["<STR_LIT>"].append(tcase)<EOL><DEDENT>return suite<EOL>
Creates and initialized a TESTSUITE struct and site-effects such as creating
output directories and forwarding initialization of testcases