Add detail build result

This commit is contained in:
Rogerz Zhang 2013-01-20 21:51:20 +08:00
parent 6a60d40334
commit e0048ee456
2 changed files with 70 additions and 64 deletions

View File

@ -2,11 +2,12 @@ language: c
install: install:
- mkdir ~/toolchain - mkdir ~/toolchain
- curl -s https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 | tar xjf - -C ~/toolchain - "[ $RTT_CPU = 'arm' ] && curl -s https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 | tar xjf - -C ~/toolchain"
before_script: before_script:
- export RTT_EXEC_PATH=~/toolchain/arm-2011.03/bin - export RTT_EXEC_PATH=~/toolchain/arm-2011.03/bin
- export RTT_ROOT=`pwd` - export RTT_ROOT=`pwd`
- export RTT_CC='gcc'
- cd tools - cd tools
script: script:
@ -16,4 +17,4 @@ notifications:
email: false email: false
env: env:
- RTT_CC='gcc' - RTT_CPU='arm'

View File

@ -1,69 +1,74 @@
import os import os
import sys import sys
bsp_to_cpu = {
'bf533': 'unknown',
'dev3210': 'unknown',
'jz47xx': 'unknown',
'ls1bdev': 'unknown',
'm16c62p': 'unknown',
'microblaze': 'unknown',
'mini4020': 'unknown',
'nuc140': 'unknown',
'nios_ii': 'unknown',
'pic32ethernet': 'unknown',
'upd70f3454': 'unknown',
'wh44b0': 'unknown',
'xplorer4330': 'unknown',
'avr32uc3b0': 'avr',
'taihu': 'ppc',
'simulator': 'x86',
'x86': 'x86',
'at91sam9260': 'arm',
'efm32': 'arm',
'lm3s8962': 'arm',
'lm3s9b9x': 'arm',
'lm4f232': 'arm',
'lpc1114': 'arm',
'lpc122x': 'arm',
'lpc176x': 'arm',
'lpc178x': 'arm',
'lpc2148': 'arm',
'lpc2478': 'arm',
'mb9bf500r': 'arm',
'mb9bf506r': 'arm',
'mini2440': 'arm',
'sam7s': 'arm',
'sam7x': 'arm',
'stm32f0x': 'arm',
'stm32f107': 'arm',
'stm32f10x': 'arm',
'stm32f20x': 'arm',
'stm32f40x': 'arm',
}
results = {
'success': [],
'fail': [],
'ignore': []
}
fail = False
BSP_ROOT = '../bsp' BSP_ROOT = '../bsp'
unsupported = """ for bsp,cpu in bsp_to_cpu.iteritems():
bf533 project_dir = os.path.join(BSP_ROOT, bsp)
dev3210 if os.getenv('RTT_CPU') == cpu and os.path.isfile(os.path.join(project_dir, 'SConstruct')):
jz47xx
ls1bdev
m16c62p
microblaze
mini4020
nuc140
nios_ii
pic32ethernet
upd70f3454
wh44b0
xplorer4330
"""
failed = """
stm32f0x
"""
avr = """
avr32uc3b0
"""
ppc = """
taihu
"""
x86 = """
simulator
x86
"""
arm = """
at91sam9260
efm32
lm3s8962
lm3s9b9x
lm4f232
lpc1114
lpc122x
lpc176x
lpc178x
lpc2148
lpc2478
mb9bf500r
mb9bf506r
mini2440
sam7s
sam7x
stm32f107
stm32f10x
stm32f20x
stm32f40x
""".split()
for item in arm:
project_dir = os.path.join(BSP_ROOT, item)
if os.path.isfile(os.path.join(project_dir, 'SConstruct')):
if os.system('scons --directory=' + project_dir) != 0: if os.system('scons --directory=' + project_dir) != 0:
print 'build failed!!' results['fail'].append(bsp)
sys.exit(1) fail = True
else:
results['success'].append(bsp)
else:
results['ignore'].append(bsp)
sys.exit(0) for result,bsp_list in results.iteritems():
print "## {0}: {1}\n".format(result, len(bsp_list))
for bsp in bsp_list:
print "* " + bsp
if fail:
sys.exit(1)
else:
sys.exit(0)