Skip to content
Snippets Groups Projects
Commit e9af222f authored by Tomasz Grabiec's avatar Tomasz Grabiec Committed by Pekka Enberg
Browse files

modules: support running more than one simple app


Now since we have support for parallel launching in the command line
we can implement support for it in the modules.

Example (image config):

 run = [
   api.require('netperf').default,
   api.require('mgmt').shell
 ]

Result:

$ scripts/run.py
OSv v0.05-132-g779307c
Starting netserver with host 'IN(6)ADDR_ANY' port '12865' and family AF_INET

[/]%

Reviewed-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: default avatarTomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent de83169b
No related branches found
No related tags found
No related merge requests found
......@@ -655,7 +655,7 @@ usr.img: bare.img $(out)/usr.manifest $(out)/cmdline
$(src)/scripts/upload_manifest.py -o $@ -m $(out)/usr.manifest \
-D jdkbase=$(jdkbase) -D gccbase=$(gccbase) -D \
glibcbase=$(glibcbase) -D miscbase=$(miscbase)
$(call quiet, $(src)/scripts/imgedit.py setargs $@ $(shell cat $(out)/cmdline), IMGEDIT $@)
$(call quiet, $(src)/scripts/imgedit.py setargs $@ "$(shell cat $(out)/cmdline)", IMGEDIT $@)
$(jni): INCLUDES += -I /usr/lib/jvm/java/include -I /usr/lib/jvm/java/include/linux/
......
......@@ -73,18 +73,14 @@ def generate_manifests(modules, basic_apps):
for app in basic_apps:
app.prepare_manifest(resolve.get_build_path(), manifest_type, manifest)
def get_command_line(basic_apps):
if not basic_apps:
raise Exception("No apps")
if len(basic_apps) > 1:
raise Exception("Running more than one basic app not supported")
cmdline = basic_apps[0].get_launcher_args()
if isinstance(cmdline, basestring):
return cmdline
def format_args(args):
if isinstance(args, basestring):
return args
else:
return ' '.join(cmdline)
return ' '.join(args)
def get_command_line(basic_apps):
return '&'.join((format_args(app.get_launcher_args()) for app in basic_apps))
def make_modules(modules):
for module in modules:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment