[PATCH] If there's no attached ANACTEST device, don't attempt to mount and run it.
Chris Lumens
clumens at redhat.com
Wed Oct 15 20:07:10 UTC 2014
It's really only by accident nothing's happening here now. This just makes it
explicit.
---
tests/gui/anaconda-autogui-testing.ks | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/tests/gui/anaconda-autogui-testing.ks b/tests/gui/anaconda-autogui-testing.ks
index e54e711..7fbb1d6 100644
--- a/tests/gui/anaconda-autogui-testing.ks
+++ b/tests/gui/anaconda-autogui-testing.ks
@@ -14,25 +14,28 @@ part / --fstype="ext4" --size=4400
%post
cat >> /etc/rc.d/init.d/livesys << EOF
-# Mount the attached disk containing test suite information.
-mkdir /mnt/anactest
-mount -L ANACTEST /mnt/anactest
-chown -R liveuser.liveuser /mnt/anactest
-
-if [ -f /usr/share/applications/anaconda.desktop ]; then
- # Make anaconda start automatically.
- if [ -f ~liveuser/.config/autostart/fedora-welcome.desktop ]; then
- rm ~liveuser/.config/autostart/fedora-welcome.desktop
- fi
-
- cp /usr/share/applications/anaconda.desktop ~liveuser/.config/autostart/
- sed -i -e '/Exec=/ s|/usr/bin/liveinst|python /mnt/anactest/suite.py|' ~liveuser/.config/autostart/anaconda.desktop
-
- # Enable accessibility needed for testing.
- cat >> /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.override << FOE
+# Mount the attached disk containing test suite information, if it exists.
+blkid -l -t LABEL=ANACTEST
+if [ \$? = 0 ]; then
+ mkdir /mnt/anactest
+ mount -L ANACTEST /mnt/anactest
+ chown -R liveuser.liveuser /mnt/anactest
+
+ if [ -f /usr/share/applications/anaconda.desktop ]; then
+ # Make anaconda start automatically.
+ if [ -f ~liveuser/.config/autostart/fedora-welcome.desktop ]; then
+ rm ~liveuser/.config/autostart/fedora-welcome.desktop
+ fi
+
+ cp /usr/share/applications/anaconda.desktop ~liveuser/.config/autostart/
+ sed -i -e '/Exec=/ s|/usr/bin/liveinst|python /mnt/anactest/suite.py|' ~liveuser/.config/autostart/anaconda.desktop
+
+ # Enable accessibility needed for testing.
+ cat >> /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.override << FOE
[org.gnome.desktop.interface]
toolkit-accessibility=true
FOE
+ fi
fi
EOF
--
1.9.3
More information about the anaconda-patches
mailing list