tbottest.initconfig
¶
helper functions¶
- tbottest.initconfig.init_get_config(cfgp: RawConfigParser, name: str, default: str) str [source]¶
returns value of key name from configparser.
Searches first for a “TC_BOARDNAME” section and if it there is not the key, search in section “TC”. If not found, return default value. If default value is “None” return None
- Parameters:
cfgp – current config parser
name – name of key
default – default value if key is not found
- tbottest.initconfig.generic_get_boardname()[source]¶
return the boards name in your lab setup
setup the boardname through tbot.flag selectableboardname
You can overwrite this by defining your own board_set_boardname() in boardspecific.py if you need another approach.
- tbottest.initconfig.copy_file(filename, newfile)[source]¶
copy file filename to newfile
- Parameters:
filename – full path and name of source file
newfile – full path and name of target file
- tbottest.initconfig.replace_in_file(filename, string, newv)[source]¶
replace string in filename with string newv
- Parameters:
filename – full path and name of source file
string – searchstring
newv – new value
classes¶
IniTBotConfig
- Init generic setup from tbot.ini.
IniConfig
- Init generic setup from BOARDNAME.ini.
- class tbottest.initconfig.IniConfig[source]¶
Bases:
object
reads board config
see: boardspecfic runtime adaptions
- get_config(name: str, default: str)[source]¶
returns value of key name from configparser.
use internal function init_get_config
- Parameters:
name – name of key
default – default value if key is not found