Skip to contentSkip to conversation

coverity: Parameterise CoverityToolsStripComponents

PATCH In review Ian Jackson 2 participants 4 messages Jul 26, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 coverity: Parameterise CoverityToolsStripComponents

No functional change with current production-config.

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

---
 production-config | 1 +
 ts-coverity-build | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
production-config +1 -0
index 1bc56d8..bc961e6 100644
@@ -115,6 +115,7 @@ CoverityEmail [email protected]
 # 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
ts-coverity-build +3 -1
index 6e29102..dc6320a 100755
@@ -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
 }
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

PATCH 2/2 coverity: Set CoverityToolsStripComponents to 2

This needs to be 2 for cov-analysis-linux64-2017.07.tar.gz because that contains "./" at the start of its paths, which tar counts as a component it's stripping.

---
 production-config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
production-config +1 -1
index bc961e6..8d94990 100644
@@ -115,7 +115,7 @@ CoverityEmail [email protected]
 # gets the default/dummy path
 CoverityUploadUrl https://scan.coverity.com/builds?project=XenProject
 CoverityTools cov-analysis-linux64-2017.07.tar.gz
-CoverityToolsStripComponents 1
+CoverityToolsStripComponents 2
 
 # We use the IP address because Citrix can't manage reliable nameservice
 #DebianMirrorHost debian.uk.xensource.com
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 2/2
#2 lore raw

Re: [OSSTEST PATCH 2/2] coverity: Set CoverityToolsStripComponents to 2

Quoted 5 lines · Ian Jackson

This needs to be 2 for cov-analysis-linux64-2017.07.tar.gz because that contains "./" at the start of its paths, which tar counts as a component it's stripping.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel