Skip to contentSkip to conversation

BuildSupport: Honour new runvar make_njobs

PATCH New Ian Jackson 1 participant 2 messages Jul 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 BuildSupport: Honour new runvar make_njobs

Having a hardcoded -j4, and having this come via DefMakeFlags, is not brilliant. But at least this make_njobs variable has better semantics so won't make it harder to make this more sophisticated later.

---
 Osstest/BuildSupport.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Osstest/BuildSupport.pm +4 -1
index b96ce76..4367b40 100644
@@ -104,7 +104,10 @@ sub selectbuildhost {
 sub builddirsprops {
     my (%xbuildopts) = @_;
 
-    $xbuildopts{DefMakeFlags} ||= '-j4';
+    if (!defined ) {
+	my $njobs = $r{make_njobs} // 4;
+	$xbuildopts{DefMakeFlags} = "-j$njobs";
+    }
     $builddir= target_jobdir($ho);
     $makeflags= get_host_property($ho, 'build make flags',
 				  $xbuildopts{DefMakeFlags});
Signature · 7 lines
2.1.4


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

PATCH 2/2 libvirt build: Set make_njobs=1 except when testing libvirt

libvirt has a -j bug. This is allegedly going to be fixed in upstream RSN ? Anyway, for now, serialise all the builds on other branches so they are not affected.

---
 mfi-common | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
mfi-common +7 -1
index 9b6c947..baf5380 100644
@@ -356,11 +356,17 @@ create_build_jobs () {
 
     if [ "x$REVISION_LIBVIRT" != xdisable ]; then
 
+    libvirt_build_runvars=''
+    case "$branch" in
+    libvirt*) ;;
+    *)        libvirt_build_runvars+=" make_njobs=1";;
+    esac
+
     job_create_build build-$arch-libvirt build-libvirt                       \
                 arch=$arch                                                   \
         tree_xen=$TREE_XEN                                                   \
                 $RUNVARS $BUILD_RUNVARS $BUILD_LIBVIRT_RUNVARS $arch_runvars \
-                $hostos_runvars                                              \
+                $hostos_runvars $libvirt_build_runvars                       \
                 host_hostflags=$build_hostflags                              \
                 buildjob=${bfi}build-$arch                                   \
                 tree_libvirt=$TREE_LIBVIRT revision_libvirt=$REVISION_LIBVIRT\
Signature · 7 lines
2.1.4


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