Skip to content

Commit 5ae9f7d

Browse files
authored
[fix]
1 parent 41ebd5e commit 5ae9f7d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tools/ci/bsp_buildings.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ def build_bsp(bsp, scons_args='',name='default'):
7272

7373
if res != 0:
7474
success = False
75-
#拷贝当前的文件夹下面的所有以elf结尾的文件拷贝到rt-thread/output文件夹下
76-
import glob
77-
# 拷贝编译生成的文件到output目录,文件拓展为 elf,bin,hex
78-
for file_type in ['*.elf', '*.bin', '*.hex']:
79-
files = glob.glob(f'{rtt_root}/bsp/{bsp}/{file_type}')
80-
for file in files:
81-
shutil.copy(file, f'{rtt_root}/output/bsp/{bsp}/{name}.{file_type[2:]}')
75+
else:
76+
#拷贝当前的文件夹下面的所有以elf结尾的文件拷贝到rt-thread/output文件夹下
77+
import glob
78+
# 拷贝编译生成的文件到output目录,文件拓展为 elf,bin,hex
79+
for file_type in ['*.elf', '*.bin', '*.hex']:
80+
files = glob.glob(f'{rtt_root}/bsp/{bsp}/{file_type}')
81+
for file in files:
82+
shutil.copy(file, f'{rtt_root}/output/bsp/{bsp}/{name}.{file_type[2:]}')
8283

8384
os.chdir(f'{rtt_root}/bsp/{bsp}')
8485
run_cmd('scons -c', output_info=False)

0 commit comments

Comments
 (0)