Fixing tar_file and proxy-stc
Change-Id: I51ee55151975ba22d168ccad58efe92d55acd9e1
diff --git a/BUCK b/BUCK
index dec82d9..b5c7537 100644
--- a/BUCK
+++ b/BUCK
@@ -55,6 +55,7 @@
'tools/dev/bin/onos-create-app',
'tools/build/envDefaults'
],
+ other_tars = [ '//tools/package:onos-package-runtime' ],
)
only_lib_dep_pom(
diff --git a/bucklets/onos.bucklet b/bucklets/onos.bucklet
index d6eb053..03b13a9 100644
--- a/bucklets/onos.bucklet
+++ b/bucklets/onos.bucklet
@@ -313,14 +313,19 @@
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
}
diff --git a/tools/package/BUCK b/tools/package/BUCK
index 4e8ab7e..8f429c9 100644
--- a/tools/package/BUCK
+++ b/tools/package/BUCK
@@ -39,6 +39,14 @@
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/*']),
diff --git a/tools/test/bin/proxy-stc b/tools/test/bin/proxy-stc
index af264d0..ac840e4 100755
--- a/tools/test/bin/proxy-stc
+++ b/tools/test/bin/proxy-stc
@@ -32,9 +32,11 @@
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
\ No newline at end of file