Fixing tar_file and proxy-stc

Change-Id: I51ee55151975ba22d168ccad58efe92d55acd9e1
This commit is contained in:
Brian O'Connor 2017-08-14 19:11:29 -07:00 committed by Thomas Vachuska
parent ee993b1188
commit 30322dd4cb
4 changed files with 20 additions and 4 deletions

1
BUCK
View File

@ -55,6 +55,7 @@ tar_file(
'tools/dev/bin/onos-create-app',
'tools/build/envDefaults'
],
other_tars = [ '//tools/package:onos-package-runtime' ],
)
only_lib_dep_pom(

View File

@ -313,14 +313,19 @@ def osgi_jar_with_tests(
def tar_file(
name,
srcs,
other_tars = [],
root = None,
out = None,
visibility = [ 'PUBLIC' ],
):
cmd = ( 'mkdir -p $TMP/%(root_dir)s && '
'cp -R -L $SRCDIR/* $TMP/%(root_dir)s && '
'tar -C $TMP -zcf $OUT %(root_dir)s' ) % {
cmds = [ 'mkdir -p $TMP/%(root_dir)s',
'cp -R -L $SRCDIR/* $TMP/%(root_dir)s' ]
for t in other_tars:
cmds += [ 'tar -zxf $(location %s)' % t + ' -C $TMP/%(root_dir)s' ]
cmds += [ 'tar -C $TMP -zcf $OUT %(root_dir)s' ]
cmd = ' && '.join(cmds) % {
'root_dir': root if root is not None else name
}

View File

@ -39,6 +39,14 @@ staged_apps = ['$(location %s)' % a for a in APPS]
sources = [ '$(location :onos-features)', ]
sources += staged_repos + staged_apps
tar_file(
name = 'onos-package-runtime',
srcs = glob(['runtime/bin/*']),
root = 'tools/package',
out = 'package-runtime.tar.gz',
visibility = [ 'PUBLIC' ],
)
genrule(
name = 'onos-package',
srcs = glob(['bin/*', 'etc/*', 'init/*', 'config/*', 'runtime/bin/*']),

View File

@ -32,9 +32,11 @@ ssh -t -t $ONOS_USER@$OCT "
topo default
export stcDumpLogs=true
export stcColor=$stcColor
stc fast
stc $1
"
status=$?
mkdir -p /tmp/stc
scp -r ${ONOS_USER}@${OCT}:/tmp/stc/* /tmp/stc/
exit $status