diff mbox

[OSSTEST,1/2] coverity: Parameterise CoverityToolsStripComponents

Message ID 1501075992-2476-1-git-send-email-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Jackson July 26, 2017, 1:33 p.m. UTC
No functional change with current production-config.

(In fact, this needs to be 2 for cov-analysis-linux64-2017.07.tar.gz)

Reported-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 production-config | 1 +
 ts-coverity-build | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Wei Liu July 26, 2017, 1:36 p.m. UTC | #1
On Wed, Jul 26, 2017 at 02:33:11PM +0100, Ian Jackson wrote:
> No functional change with current production-config.
> 
> (In fact, this needs to be 2 for cov-analysis-linux64-2017.07.tar.gz)
> 
> Reported-by: Wei Liu <wei.liu2@citrix.com>
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>

Reviewed-by: Wei Liu <wei.liu2@citrix.com>
diff mbox

Patch

diff --git a/production-config b/production-config
index 1bc56d8..bc961e6 100644
--- a/production-config
+++ b/production-config
@@ -115,6 +115,7 @@  CoverityEmail security@xen.org
 # gets the default/dummy path
 CoverityUploadUrl https://scan.coverity.com/builds?project=XenProject
 CoverityTools cov-analysis-linux64-2017.07.tar.gz
+CoverityToolsStripComponents 1
 
 # We use the IP address because Citrix can't manage reliable nameservice
 #DebianMirrorHost debian.uk.xensource.com
diff --git a/ts-coverity-build b/ts-coverity-build
index 6e29102..dc6320a 100755
--- a/ts-coverity-build
+++ b/ts-coverity-build
@@ -37,12 +37,14 @@  sub checkout () {
 
 sub covtools () {
     target_putfile($ho, 100, "$c{Images}/$c{CoverityTools}", "$builddir/covtools.tar.gz");
+    my $strip = $c{CoverityToolsStripComponents} // 0;
+    $strip = $strip ? "--strip-components=$strip" : '';
     target_cmd($ho, <<END, 100);
 set -xe
 c=$builddir/covtools
 mkdir -p \$c
 cd \$c
-tar --strip-components=1 -xaf $builddir/covtools.tar.gz
+tar $strip -xaf $builddir/covtools.tar.gz
 END
 }