Integrated Test Container inside Baremetal container.

This commit is contained in:
Amit Mahajan
2009-11-20 00:06:03 +05:30
parent 352d75f66c
commit 8a7b9dbcdf
21 changed files with 63 additions and 288 deletions

View File

@@ -77,27 +77,6 @@ def build_posix_container(config, projpaths, container):
container_packer = DefaultContainerPacker(container, images)
return container_packer.pack_container(config)
# We simply use SCons to figure all this out from container.id
# Builds the test container.
def build_test_container(config, projpaths, container):
images = []
cwd = os.getcwd()
os.chdir(TESTDIR)
print '\nBuilding the Test Container...'
scons_cmd = 'scons ' + 'cont=' + str(container.id)
print "Issuing scons command: %s" % scons_cmd
os.system(scons_cmd)
builddir = source_to_builddir(TESTDIR, container.id)
os.path.walk(builddir, glob_by_walk, ['*.elf', images])
# Calculate and store size of pager
pager_binary = "cont" + str(container.id) + "/test/main.elf"
config.containers[container.id].pager_size = \
conv_hex(elf_binary_size(join(BUILDDIR, pager_binary)))
container_packer = DefaultContainerPacker(container, images)
return container_packer.pack_container(config)
# This simply calls SCons on a given container, and collects
# all images with .elf extension, instead of using whole classes
# for building and packing.
@@ -128,8 +107,6 @@ def build_all_containers():
cont_images.append(build_default_container(config, projpaths, container))
elif container.type == 'posix':
cont_images.append(build_posix_container(config, projpaths, container))
elif container.type == 'test':
cont_images.append(build_test_container(config, projpaths, container))
else:
print "Error: Don't know how to build " + \
"container of type: %s" % (container.type)