mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
Integrated Test Container inside Baremetal container.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user