log_file = log_path + '/more/run_station.log' logging.info('---log_file--- : %s'%log_file) # config file config_file =config_path + 'config.xml' logging.info('---config file--- : %s'%config_file) config = Getconfig(config_file) # history data folder history_path = history_path + '/' + time_result_folder logging.info('---history data--- : %s'%history_path) # result flag Execute_Result = 1 logging.info('-----------------------------------') logging.info('------Run : 1,Check Configuration------') if config.getAttr(runner_name,'enable') == 'yes': logging.info('------Run : 2,Get Binary From Ftp Server') ret = down_from_ftp(config.getValue('host'), config.getValue('user'), config.getValue('pwd'), '/', 21, local_bin, remote_bin) if ret: logging.info('Get Binary failed') send_log(config.getValue('host'), config.getValue('user'), config.getValue('pwd'), '/', 21,
# log file log_file = log_path + '/more/run_station.log' logging.info('---log_file--- : %s' % log_file) # config file config_file = config_path + 'config.xml' logging.info('---config file--- : %s' % config_file) config = Getconfig(config_file) # history data folder history_path = history_path + '/' + time_result_folder logging.info('---history data--- : %s' % history_path) # result flag Execute_Result = 1 logging.info('-----------------------------------') logging.info('------Run : 1,Check Configuration------') if config.getAttr(runner_name, 'enable') == 'yes': logging.info('------Run : 2,Get Binary From Ftp Server') ret = down_from_ftp(config.getValue('host'), config.getValue('user'), config.getValue('pwd'), '/', 21, local_bin, remote_bin) if ret: logging.info('Get Binary failed') send_log(config.getValue('host'), config.getValue('user'), config.getValue('pwd'), '/', 21, log_path, remote_log_path) notify_scheduler_run(config.getValue('Scheduler_IP'), Execute_Result, str(request_id)) #shutil.copytree(log_path,history_path) os._exit(1) else: logging.info('Run : 3,Create Runner') if debugger == 'lauterbach': software_debugger = 'trace32'
from getconfig import Getconfig from helper import Helper from station_on_off import register, offline import station_map config_file = config_path + 'config.xml' config = Getconfig(config_file) # get configuration scheduler = config.getValue('Scheduler_IP') machine_name = config.getValue('machine_name') machine_type = sys.argv[1] # build_station:0 run_station:1 mac = config.getValue('local_mac') ip = config.getValue('local_ip') # public:1 private:2 if config.getAttr('token', 'private') == 'yes': machine_range = '2' token = config.getValue('token') else: machine_range = '1' token = '-1' status = sys.argv[2] # get ide list ide_list = [] IDE = config.getAttr_list('IDE') for ide in IDE: if IDE[ide] == 'yes': ide_list.append(station_map.compiler_map[ide]) if len(ide_list) != 0: ide = ','.join(ide_list)
# config file config_file = config_path + 'config.xml' logging.info('---config file--- : %s' % config_file) config = Getconfig(config_file) # history data folder history_path = history_path + '/' + time_result_folder logging.info('---history data--- : %s' % history_path) # result flag Execute_Result = 1 local_bin = None remote_bin = 'default' logging.info('-----------------------------------') logging.info('------Run : 1,Check Configuration------') if config.getAttr(builder_name, 'enable') == 'yes' and config.getAttr( 'IDE', compiler) == 'yes': logging.info('Run : 2,Create Builder') builder_module_name = builder_name + '_builder' builder_dir = config.getValue(builder_name) app_scope = config.getValue('default_app_scope') app_value = config.getValue('default_app_value') timeout = int(config.getValue('executor_timeout')) # repo item name if test_type == 'oobe': repo_item = 'MQX_dir' elif test_type == 'kptk': repo_item = 'kptk_dir' elif test_type == 'demo': repo_item = 'demo_dir' elif test_type == 'ksdk_oobe':
logging.info('---config file--- : %s'%config_file) config = Getconfig(config_file) # history data folder history_path = history_path + '/' + time_result_folder logging.info('---history data--- : %s'%history_path) # result flag Execute_Result = 1 local_bin = None remote_bin = 'default' logging.info('-----------------------------------') logging.info('------Run : 1,Check Configuration------') if config.getAttr(builder_name,'enable') == 'yes' and config.getAttr('IDE',compiler) == 'yes': logging.info('Run : 2,Create Builder') builder_module_name = builder_name + '_builder' builder_dir = config.getValue(builder_name) app_scope = config.getValue('default_app_scope') app_value = config.getValue('default_app_value') timeout = int(config.getValue('executor_timeout')) # repo item name if test_type == 'oobe': repo_item = 'MQX_dir' elif test_type == 'kptk': repo_item = 'kptk_dir' elif test_type == 'demo': repo_item = 'demo_dir' elif test_type == 'ksdk_oobe': repo_item = 'demo_dir'