1from unit.applications.proto import TestApplicationProto 2from unit.option import option 3 4 5class TestApplicationPerl(TestApplicationProto): 6 application_type = "perl" 7 8 def load(self, script, name='psgi.pl', **kwargs): 9 script_path = f'{option.test_dir}/perl/{script}' 10 11 self._load_conf( 12 { 13 "listeners": {"*:7080": {"pass": f"applications/{script}"}}, 14 "applications": { 15 script: { 16 "type": self.get_application_type(), 17 "processes": {"spare": 0}, 18 "working_directory": script_path, 19 "script": f'{script_path}/{name}', 20 } 21 }, 22 }, 23 **kwargs, 24 ) 25