コード例 #1
0
    def initialize(self) -> bool:
        """Initializes the plugin by creating the CfsTimeManager.
        This method is intended to be called by the plugin manager before the test script runs.
        """
        # ENHANCE - May want to have a single CTF time manager, that allows adding and removal
        #              of pre/post-command callbacks.
        #              When re-adding Trick CFS, the Trick cfs_time_manager should be the only time manager
        #              used. There is a potential that the cfs_time_manager is used instead. Need to figure out
        #              how to select a time manager.

        Global.set_time_manager(CfsTimeManager(self.targets))
        log.info("Initialized CfsPlugin")
        return True
コード例 #2
0
def _test_instance_inited():
    Global.set_time_manager(Mock())
    test = Test()
    status_manager = StatusManager(port=None)
    script_reader = JSONScriptReader(
        'functional_tests/cfe_6_7_tests/cfe_tests/CfeEsTest.json')
    script_reader.process_tests()
    script_list = [script_reader.script]
    status_manager.set_scripts(script_list)

    instructions = script_reader.script.tests[0].instructions
    test.instructions = instructions

    status_manager.start()
    test.status_manager = status_manager
    return test
コード例 #3
0
ファイル: test_ctf_global.py プロジェクト: nasa/CTF
def test_ctf_global_time_manager():
    assert Global.get_time_manager() is None
    Global.set_time_manager(Mock())
    assert Global.get_time_manager() == Global.time_manager
コード例 #4
0
ファイル: test_script_manager.py プロジェクト: nasa/CTF
def init_global():
    Global.load_config("./configs/default_config.ini")
    Global.set_time_manager(Mock())