Пример #1
0
 def test_pbench_file_lister(self):
     obj = PBenchExecutor()
     obj.engine = EngineEmul()
     obj.settings = BetterDict()
     obj.engine.config = BetterDict()
     obj.engine.config.merge(
         {ScenarioExecutor.EXEC: {"executor": "pbench", "scenario": {"script": "/opt/data/script.src"}}}
     )
     obj.execution = obj.engine.config["execution"]
     obj.settings.merge({"path": os.path.join(os.path.dirname(__file__), "..", "phantom.sh")})
     resource_files = obj.resource_files()
     self.assertEqual(1, len(resource_files))
     self.assertEqual(resource_files[0], "script.src")
Пример #2
0
 def test_pbench_file_lister(self):
     obj = PBenchExecutor()
     obj.engine = EngineEmul()
     obj.settings = BetterDict()
     obj.engine.config = BetterDict()
     obj.engine.config.merge(
             {'execution': {"executor": "pbench", "scenario": {"script": "script.src"}}})
     obj.execution = obj.engine.config['execution']
     obj.settings.merge({
         "path": os.path.join(os.path.dirname(__file__), "..", "resources", "pbench", "phantom.sh"),
     })
     resource_files = obj.resource_files()
     self.assertEqual(1, len(resource_files))
     self.assertEqual(resource_files[0], 'script.src')
Пример #3
0
 def test_pbench_file_lister(self):
     obj = PBenchExecutor()
     obj.engine = EngineEmul()
     obj.settings = BetterDict()
     obj.engine.config = BetterDict()
     obj.engine.config.merge({
         'execution': {
             "executor": "pbench",
             "scenario": {
                 "script": "script.src"
             }
         }
     })
     obj.execution = obj.engine.config['execution']
     obj.settings.merge({
         "path": RESOURCES_DIR + "pbench/phantom.sh",
     })
     resource_files = obj.resource_files()
     self.assertEqual(1, len(resource_files))
     self.assertEqual(resource_files[0], 'script.src')