[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH OSSTEST v5 9/9] mfi-common, make-flight: create XSM test jobs



On Tue, Feb 03, 2015 at 11:22:44AM +0000, Ian Campbell wrote:
> On Tue, 2015-02-03 at 10:36 +0000, Wei Liu wrote:
> > Duplicate Debian PV and HVM test jobs for XSM testing.
> 
> If ~/.xen-osstest/config contains e.g. "PlatformsArmhf midway cubietruck
> arndale" (correspodning to the platform-{...} flag being set on some
> host) then I think this will generate a per platform XSM test, which
> doesn't seem necessary since XSM isn't platform specific.
> 
> So:
> 
> > +  for xsm in $test_xsm ; do
> > +
> > +    # Basic PV Linux test with xl
> > +    for platform in '' `getplatforms $xenarch` ; do
> > +      suffix=${platform:+-$platform}
> > +      hostflags=${most_hostflags}${platform:+,platform-$platform}
> > +
> > +      job_create_test test-$xenarch$kern-$dom0arch-xl$suffix test-debian 
> > xl \
> > +                      $xenarch $dom0arch                                   
> >  \
> > +                      enable_xsm=$xsm                                      
> >  \
> > +                      $debian_runvars all_hostflags=$hostflags
> > +    done
> 
> I think you could pull the for platform loop outside of the for xsm one
> and remove '' from it, and readd the generic one standalone inside the
> xsm loop. (You can also simplify the suffix stuff in the platform loop
> since that is just to handle '' correctly).
> 
> Or add "if xsm = true and platform != '' -> continue"? 
> 

I use the "continue" trick and now the function looks like:

do_pv_debian_tests () {
-  # Basic PV Linux test with xl
-  for platform in '' `getplatforms $xenarch` ; do
-    suffix=${platform:+-$platform}
-    hostflags=${most_hostflags}${platform:+,platform-$platform}
-
-    job_create_test test-$xenarch$kern-$dom0arch-xl$suffix test-debian xl \
-            $xenarch $dom0arch                                   \
-            $debian_runvars all_hostflags=$hostflags
+  test_xsm=$(xenbranch_xsm_variants)
+
+  for xsm in $test_xsm ; do
+    # Basic PV Linux test with xl
+    for platform in '' `getplatforms $xenarch` ; do
+
+      # xsm test is not platform specifc
+      if [ "x$xsm" = "xtrue" -a "x$platform" != "x" ]; then
+          continue
+      fi
+
+      suffix=${platform:+-$platform}
+      hostflags=${most_hostflags}${platform:+,platform-$platform}
+
+      job_create_test test-$xenarch$kern-$dom0arch-xl$suffix test-debian xl \
+                      $xenarch $dom0arch                                    \
+                      enable_xsm=$xsm                                       \
+                      $debian_runvars all_hostflags=$hostflags
+    done
   done

-  job_create_test test-$xenarch$kern-$dom0arch-libvirt test-debian libvirt \
-            $xenarch $dom0arch                                       \
-            $debian_runvars all_hostflags=$most_hostflags
+  for xsm in $test_xsm ; do
+    job_create_test test-$xenarch$kern-$dom0arch-libvirt test-debian libvirt \
+                    $xenarch $dom0arch                                       \
+                    enable_xsm=$xsm                                          \
+                    $debian_runvars all_hostflags=$most_hostflags
+  done
 }


> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.