def __init__(self, logger, stc_install_dir, tcl_interp=None): super().__init__(logger, tcl_interp) self.eval("set dir " + tcl_file_name(path.join(stc_install_dir, app_subdir))) self.source(path.join(stc_install_dir, app_subdir, "pkgIndex.tcl")) self.ver = self.eval("package require SpirentTestCenter") self.command_rc = None
def __init__(self, logger, tcl_lib_install_dir, avl_install_dir, tcl_interp=None): super(self.__class__, self).__init__(logger, tcl_interp) tcl_lib_85_dir = tcl_file_name(path.join(tcl_lib_install_dir, 'tcl8.5')) self.eval('set auto_path [linsert $auto_path 0 {} {}]'.format( tcl_file_name(tcl_lib_install_dir), tcl_lib_85_dir)) self.eval('lappend auto_path ' + tcl_file_name(path.join(avl_install_dir, avl_tcl_subdir))) self.eval('lappend auto_path ' + tcl_file_name(path.join(avl_install_dir, stc_tcl_subdir))) self.eval('package forget av') self.ver = self.eval('package require av')
def __init__(self, logger, stc_install_dir, tcl_interp=None): super(self.__class__, self).__init__(logger, tcl_interp) self.eval('set dir ' + tcl_file_name(path.join(stc_install_dir, app_subdir))) self.source(path.join(stc_install_dir, app_subdir, 'pkgIndex.tcl')) self.ver = self.eval('package require SpirentTestCenter')
def test_file_name(self): """ Test Tcl file names normalization. """ assert (tcl_file_name('a\\b/c').strip() == '{a/b/c}')
def saveConfig(self, config_file_name): self.execute('saveConfig', None, True, self.ixnCommand('writeTo', tcl_file_name(config_file_name)))
def loadConfig(self, config_file_name): self.execute('loadConfig', None, True, self.ixnCommand('readFrom', tcl_file_name(config_file_name)))
def test_file_name() -> None: """Test Tcl file names normalization.""" assert tcl_file_name("a\\b/c").strip() == "{a/b/c}"