#143 Enable IoT testing with install and base tests
Merged 4 years ago by adamwill. Opened 4 years ago by adamwill.

@@ -0,0 +1,15 @@ 

+ {

+   "area": [

+     {

+       "ypos": 13,

+       "height": 20,

+       "width": 124,

+       "type": "match",

+       "xpos": 764

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "version_31_ident"

+   ]

+ } 

\ No newline at end of file

file modified
+51
@@ -133,6 +133,30 @@ 

              },

              "version": "*"

          },

+         "fedora-IoT-dvd_ostree-iso-aarch64-*": {

+             "arch": "aarch64",

+             "distri": "fedora",

+             "flavor": "IoT-dvd_ostree-iso",

+             "settings": {

+                 "CANNED": "1",

+                 "PACKAGE_SET": "default",

+                 "CONSOLE_INITIAL_SETUP": "1",

+                 "TEST_TARGET": "ISO"

+             },

+             "version": "*"

+         },

+         "fedora-IoT-dvd_ostree-iso-x86_64-*": {

+             "arch": "x86_64",

+             "distri": "fedora",

+             "flavor": "IoT-dvd_ostree-iso",

+             "settings": {

+                 "CANNED": "1",

+                 "PACKAGE_SET": "default",

+                 "CONSOLE_INITIAL_SETUP": "1",

+                 "TEST_TARGET": "ISO"

+             },

+             "version": "*"

+         },

          "fedora-KDE-live-iso-x86_64-*": {

              "arch": "x86_64",

              "distri": "fedora",
@@ -310,6 +334,18 @@ 

              "machine": "uefi",

              "product": "fedora-Everything-boot-iso-x86_64-*"

          },

+         "fedora-IoT-dvd_ostree-iso-aarch64-*-aarch64": {

+             "machine": "aarch64",

+             "product": "fedora-IoT-dvd_ostree-iso-aarch64-*"

+         },

+         "fedora-IoT-dvd_ostree-iso-x86_64-*-64bit": {

+             "machine": "64bit",

+             "product": "fedora-IoT-dvd_ostree-iso-x86_64-*"

+         },

+         "fedora-IoT-dvd_ostree-iso-x86_64-*-uefi": {

+             "machine": "uefi",

+             "product": "fedora-IoT-dvd_ostree-iso-x86_64-*"

+         },

          "fedora-KDE-live-iso-x86_64-*-64bit": {

              "machine": "64bit",

              "product": "fedora-KDE-live-iso-x86_64-*"
@@ -411,6 +447,8 @@ 

          },

          "base_reboot_unmount": {

              "profiles": {

+                 "fedora-IoT-dvd_ostree-iso-aarch64-*-aarch64": 20,

+                 "fedora-IoT-dvd_ostree-iso-x86_64-*-64bit": 40,

                  "fedora-KDE-live-iso-x86_64-*-64bit": 50,

                  "fedora-Server-dvd-iso-aarch64-*-aarch64": 40,

                  "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 20,
@@ -431,6 +469,8 @@ 

          },

          "base_selinux": {

              "profiles": {

+                 "fedora-IoT-dvd_ostree-iso-aarch64-*-aarch64": 20,

+                 "fedora-IoT-dvd_ostree-iso-x86_64-*-64bit": 40,

                  "fedora-KDE-live-iso-x86_64-*-64bit": 42,

                  "fedora-Server-dvd-iso-aarch64-*-aarch64": 40,

                  "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 40,
@@ -451,6 +491,8 @@ 

          },

          "base_service_manipulation": {

              "profiles": {

+                 "fedora-IoT-dvd_ostree-iso-aarch64-*-aarch64": 20,

+                 "fedora-IoT-dvd_ostree-iso-x86_64-*-64bit": 40,

                  "fedora-KDE-live-iso-x86_64-*-64bit": 42,

                  "fedora-Server-dvd-iso-aarch64-*-aarch64": 40,

                  "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 40,
@@ -471,6 +513,8 @@ 

          },

          "base_services_start": {

              "profiles": {

+                 "fedora-IoT-dvd_ostree-iso-aarch64-*-aarch64": 40,

+                 "fedora-IoT-dvd_ostree-iso-x86_64-*-64bit": 40,

                  "fedora-KDE-live-iso-x86_64-*-64bit": 42,

                  "fedora-Server-dvd-iso-aarch64-*-aarch64": 40,

                  "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 40,
@@ -505,6 +549,8 @@ 

          },

          "base_system_logging": {

              "profiles": {

+                 "fedora-IoT-dvd_ostree-iso-aarch64-*-aarch64": 20,

+                 "fedora-IoT-dvd_ostree-iso-x86_64-*-64bit": 20,

                  "fedora-KDE-live-iso-x86_64-*-64bit": 22,

                  "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 20,

                  "fedora-Server-dvd-iso-x86_64-*-64bit": 20,
@@ -819,6 +865,7 @@ 

          },

          "install_default": {

              "profiles": {

+                 "fedora-IoT-dvd_ostree-iso-x86_64-*-uefi": 21,

                  "fedora-Everything-boot-iso-ppc64le-*-ppc64le": 62,

                  "fedora-Everything-boot-iso-x86_64-*-64bit": 10,

                  "fedora-Everything-boot-iso-x86_64-*-uefi": 11,
@@ -838,6 +885,8 @@ 

          },

          "install_default_upload": {

              "profiles": {

+                 "fedora-IoT-dvd_ostree-iso-aarch64-*-aarch64": 20,

+                 "fedora-IoT-dvd_ostree-iso-x86_64-*-64bit": 20,

                  "fedora-KDE-live-iso-x86_64-*-64bit": 15,

                  "fedora-Server-dvd-iso-aarch64-*-aarch64": 10,

                  "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 10,
@@ -1502,6 +1551,8 @@ 

          },

          "release_identification": {

              "profiles": {

+                 "fedora-IoT-dvd_ostree-iso-aarch64-*-aarch64": 20,

+                 "fedora-IoT-dvd_ostree-iso-x86_64-*-64bit": 20,

                  "fedora-KDE-live-iso-x86_64-*-64bit": 50,

                  "fedora-Server-dvd-iso-ppc64le-*-ppc64le": 50,

                  "fedora-Server-dvd-iso-x86_64-*-64bit": 50,

@@ -15,6 +15,16 @@ 

          $wait_time = 180;

      }

  

+     # handle initial-setup, if we're expecting it (the variable is set

+     # and this is an install test)

+     my $testname = get_var("TEST");

+     if (get_var("CONSOLE_INITIAL_SETUP") && index($testname, 'install') != -1) {

+         assert_screen "console_initial_setup", $wait_time;

+         type_string "q\n";

+         type_string "yes\n";

+         $wait_time = 180;

+     }

+ 

      # Wait for the text login

      boot_to_login_screen(timeout => $wait_time);

  

@@ -154,6 +154,12 @@ 

      # OK, if we're here, we got actions, so head to a console. Switch

      # to console after liveinst sometimes takes a while, so 30 secs

      $self->root_console(timeout=>30);

+     # this is something a couple of actions may need to know

+     my $mount = "/mnt/sysimage";

+     if (get_var("CANNED")) {

+         # finding the actual host system root is fun for ostree...

+         $mount = "/mnt/sysimage/ostree/deploy/fedora*/deploy/*.?";

+     }

      if (grep {$_ eq 'consoletty0'} @actions) {

          # somehow, by this point, localized keyboard layout has been

          # loaded for this tty, so for French and Arabic at least we
@@ -164,20 +170,15 @@ 

          # in boot messages going to serial console on aarch64, we need

          # them on tty0. We also need 'quiet' so we don't get kernel

          # messages, which screw up some needles

-         assert_script_run 'sed -i -e "s,\(GRUB_CMDLINE_LINUX.*\)\",\1 console=tty0 quiet\",g" /mnt/sysimage/etc/default/grub';

+         assert_script_run 'sed -i -e "s,\(GRUB_CMDLINE_LINUX.*\)\",\1 console=tty0 quiet\",g" ' . $mount . '/etc/default/grub';

          # regenerate the bootloader config

-         assert_script_run "chroot /mnt/sysimage grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg";

+         assert_script_run "chroot $mount grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg";

      }

      if (grep {$_ eq 'abrt'} @actions) {

           # Chroot in the newly installed system and switch on ABRT systemwide

-          assert_script_run "chroot /mnt/sysimage abrt-auto-reporting 1";

+          assert_script_run "chroot $mount abrt-auto-reporting 1";

      }

      if (grep {$_ eq 'rootpw'} @actions) {

-         my $mount = "/mnt/sysimage";

-         if (get_var("CANNED")) {

-             # finding the actual host system root is fun for ostree...

-             $mount = "/mnt/sysimage/ostree/deploy/fedora/deploy/*.?";

-         }

          my $root_password = get_var("ROOT_PASSWORD") || "weakpassword";

          assert_script_run "echo 'root:$root_password' | chpasswd -R $mount";

      }

file modified
+14 -11
@@ -34,15 +34,15 @@ 

          # correct variables to compare the system data with.

          # First, we know the basic stuff

          my $id = get_var("DISTRI"); # Should be "fedora"

-         my $isovar = get_var("ISO"); # Takes the build string for Silverblue variants.

+         my $isovar = get_var("ISO"); # Takes the build string for canned variants.

          # Split the ISO variable at "-" and read fields 4 (release version)

          # and 5 (the build number).

-         my ($sbver, $sbnum) = (split /-/, $isovar)[4, 5];

+         my ($cannedver, $cannednum) = (split /-/, $isovar)[4, 5];

          # Get rid of the ".iso" part of the tag.

-         $sbnum =~ s/\.iso//g;

-         # Now, we merge the fields into one expression to create the correct Silverblue tag

+         $cannednum =~ s/\.iso//g;

+         # Now, we merge the fields into one expression to create the correct canned tag

          # that will contain both the version number and the build number.

-         my $silvertag = "$sbver.$sbnum";

+         my $cannedtag = "$cannedver.$cannednum";

          my $name = ucfirst($id);

          my $version_id = get_var("VERSION"); # Should be the version number or Rawhide.

          my $varstr = spell_version_number($version_id);
@@ -69,6 +69,7 @@ 

              CoreOS => ["coreos", "CoreOS"],

              KDE => ["kde", "KDE Plasma"],

              Silverblue => ["workstation", "Workstation Edition"],

+             IoT => ["iot", "IoT Edition"],

          );

          if (exists($variants{$subvariant})) {

              ($variant_id, $variant) = @{$variants{$subvariant}};
@@ -76,16 +77,18 @@ 

          }

  

          my $version = "$version_id ($varstr)";

-         # Version looks differently when the build is a Silverblue. We need to form

-         # a different string here by using the above createad silvertag.

-         if ($subvariant eq "Silverblue") {

-             $version = "$silvertag ($varstr)";

+         # Version looks different when the build is canned (because

+         # rpm-ostree fiddles around with it, documented at

+         # https://github.com/projectatomic/rpm-ostree/blob/master/docs/manual/treefile.md )

+         # We need to form a different string here by using the above created cannedtag.

+         if (get_var("CANNED")) {

+             $version = "$cannedtag ($varstr)";

          }

          my $platform_id = "platform:f$version_id";

          my $pretty = "$name $version_id ($varstr)";

          # Same problem is when testing the PRETTY_NAME.

-         if ($subvariant eq "Silverblue") {

-             $pretty = "$name $silvertag ($varstr)";

+         if (get_var("CANNED")) {

+             $pretty = "$name $cannedtag ($varstr)";

          }

  

          #Now. we can start testing the real values from the installed system.

IoT is becoming a release-blocking edition for F32, so we should
be testing it for sure. We may add specific tests, but for now
let's run the install and base tests on it.

Signed-off-by: Adam Williamson awilliam@redhat.com

rebased onto 7ccaf06e993ea2e94ceab130484a9650854b864e

4 years ago

Build succeeded.

@pbrobinson , for information. The set of tests run at present looks like this:

https://openqa.stg.fedoraproject.org/tests/overview?groupid=1&version=31&distri=fedora&build=Fedora-IoT-31-20200209.0

all tests pass for F31, as you can see. For F32 everything fails in the most recent compose due to the known installer boot bug.

I noticed just after submitting this, though, that it's broken on aarch64; looks like a workaround we do for an aarch64-specific console output...thing...isn't working with ostree payloads. I'll try and fix that today.

We could probably do a disk image boot test too, I'll look into that.

rebased onto f5c514f83129d292b160db768e2f656fdc060a74

4 years ago

OK, aarch64 works now.

Build succeeded.

rebased onto dc9533831e87d1de560f4c7b5ca323de591d2ced

4 years ago

rebased onto 0f8f608

4 years ago

Build succeeded.

Gonna go ahead and merge this now. fedora_openqa is adjusted too.

Pull-Request has been merged by adamwill

4 years ago