MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / bsp_update_sconstruct

Function bsp_update_sconstruct

tools/mkdist.py:101–110  ·  view source on GitHub ↗
(dist_dir)

Source from the content-addressed store, hash-verified

99 ignore_patterns('build', '__pycache__', 'dist', '*.pyc', '*.old', '*.map', 'rtthread.bin', '.sconsign.dblite', '*.elf', '*.axf', 'cconfig.h'))
100
101def bsp_update_sconstruct(dist_dir):
102 with open(os.path.join(dist_dir, 'SConstruct'), 'r') as f:
103 data = f.readlines()
104 with open(os.path.join(dist_dir, 'SConstruct'), 'w') as f:
105 for line in data:
106 if line.find('RTT_ROOT') != -1:
107 if line.find('sys.path') != -1:
108 f.write('# set RTT_ROOT\n')
109 f.write('if not os.getenv("RTT_ROOT"): \n RTT_ROOT="rt-thread"\n\n')
110 f.write(line)
111
112def bsp_update_kconfig_testcases(dist_dir):
113 # delete testcases in rt-thread/Kconfig

Callers 1

MkDistFunction · 0.85

Calls 3

openFunction · 0.50
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected