Skip to content

Commit 9b21c8f

Browse files
committed
Change to no-colour output for deps
1 parent 0cfb7ca commit 9b21c8f

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

build_platform.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,22 +354,28 @@ def extract_dependencies(output):
354354
if re.match(r'Used library', line):
355355
IS_LIBS_FOUND = True
356356
print("Found libraries token using regex")
357-
print("find Version:", str.find(line, 'Version'))
358-
print("find Path:", str.find(line, 'Path'))
359-
COLS = [0,str.find(line, 'Version'), str.find(line, 'Path')]
357+
print("find Version:", line.find(line, 'Version'))
358+
print("find Path:", line.find(line, 'Path'))
359+
COLS = [0,line.find('Version'), line.find('Path')]
360360
continue
361361
else:
362-
if str.find("Used library", line) != -1:
362+
if line.find("Used library") != -1:
363363
print("Found libraries token using find")
364364
IS_LIBS_FOUND = True
365-
print("non regex find Version:", str.find(line, 'Version'))
366-
print("find Path:", str.find(line, 'Path'))
367-
COLS = [0,str.find(line, 'Version'), str.find(line, 'Path')]
365+
print("non regex find Version:", line.find('Version'))
366+
print("find Path:", line.find('Path'))
367+
COLS = [0,line.find('Version'), line.find('Path')]
368368
else:
369369
if not IS_BSP_FOUND:
370370
if re.match(r'Used platform', line):
371+
print("Found platform token using regex")
371372
IS_BSP_FOUND = True
372-
COLS = [0,str.find(line, 'Version'), str.find(line, 'Path')]
373+
COLS = [0,line.find('Version'), line.find('Path')]
374+
continue
375+
elif line.find("Used platform") != -1:
376+
print("Found platform token using find")
377+
IS_BSP_FOUND = True
378+
COLS = [0,line.find('Version'), line.find('Path')]
373379
continue
374380
else:
375381
libraries.append([line[:COLS[1]].strip(),line[COLS[1]:COLS[2]].strip()])
@@ -460,6 +466,7 @@ def test_examples_in_folder(platform, folderpath):
460466

461467
if PRINT_DEPENDENCIES_AS_HEADER:
462468
cmd.append('--only-compilation-database')
469+
cmd.append('--no-color')
463470
elif INCLUDE_PRINT_DEPENDENCIES_HEADER:
464471
cmd.append('--build-property')
465472
cmd.append('"build.extra_flags=\'-DPRINT_DEPENDENCIES\'"')

0 commit comments

Comments
 (0)