Example #1
0
def before_all(context):
    """Setup evolution stuff
    Being executed once before any test
    """

    try:
        # Close running evo instances
        os.system("evolution --force-shutdown > /dev/null")

        # Skip dogtail actions to print to stdout
        config.logDebugToStdOut = False
        config.typingDelay = 0.2

        # Include assertion object
        context.assertion = dummy()

        # Cleanup existing data before any test
        cleanup()

        # Store scenario start time for session logs
        context.log_start_time = strftime("%Y-%m-%d %H:%M:%S", localtime())

        context.app_class = App("evolution")

    except Exception as e:
        print("Error in before_all: %s" % e.message)
Example #2
0
def before_all(context):
    """Setup evolution stuff
    Being executed once before any test
    """

    try:
        # Close running evo instances
        os.system("evolution --force-shutdown > /dev/null")

        # Skip dogtail actions to print to stdout
        config.logDebugToStdOut = False
        config.typingDelay = 0.2

        # Include assertion object
        context.assertion = dummy()

        # Cleanup existing data before any test
        cleanup()

        # Store scenario start time for session logs
        context.log_start_time = strftime("%Y-%m-%d %H:%M:%S", localtime())

        context.app_class = App('evolution')

    except Exception as e:
        print("Error in before_all: %s" % e.message)
def before_all(context):
    """Setup soffice stuff
    Being executed before all features
    """

    try:
        # Cleanup abrt crashes
        [x.delete() for x in problem.list()]

        # Skip dogtail actions to print to stdout
        config.logDebugToStdOut = False
        config.typingDelay = 0.5

        # Include assertion object
        context.assertion = dummy()

        # Kill initial setup
        os.system("killall /usr/libexec/gnome-initial-setup")

        # Store scenario start time for session logs
        context.log_start_time = strftime("%Y-%m-%d %H:%M:%S", localtime())

        context.app = LOApp('soffice', forceKill=True, parameters='--norecovery')

    except Exception as e:
        print("Error in before_all: %s" % e.message)
Example #4
0
def before_all(context):
    """Setup soffice stuff
    Being executed before all features
    """

    try:
        # Cleanup abrt crashes
        [x.delete() for x in problem.list()]

        # Skip dogtail actions to print to stdout
        config.logDebugToStdOut = False
        config.typingDelay = 0.5

        # Include assertion object
        context.assertion = dummy()

        # Kill initial setup
        os.system("killall /usr/libexec/gnome-initial-setup")

        # Store scenario start time for session logs
        context.log_start_time = strftime("%Y-%m-%d %H:%M:%S", localtime())

        context.app = LOApp('soffice',
                            forceKill=True,
                            parameters='--norecovery')

    except Exception as e:
        print("Error in before_all: %s" % e.message)
Example #5
0
def before_all(context):
    """Setup stuff
    Being executed once before any test
    """

    try:
        if not os.path.isfile('/tmp/boxes_configured'):
            print("** Turning off gnome idle")
            if call("gsettings set org.gnome.desktop.session idle-delay 0", shell=True) == 0:
                print("* Done\n")
            else:
                print("* Warning: unable to turn off screensaver. This can cause failures")

            # Download Core-5.3.iso and images for import if not there
            downloadfile('http://distro.ibiblio.org/tinycorelinux/5.x/x86/archive/5.3/Core-5.3.iso')
            downloadfile('http://distro.ibiblio.org/tinycorelinux/7.x/x86/release/Core-current.iso')
            downloadfile('https://dl.dropboxusercontent.com/u/93657599/vbenes/Core-5.3.vmdk')
            downloadfile('https://dl.dropboxusercontent.com/u/93657599/vbenes/Core-5.3.qcow2')
            call('cp ~/Downloads/Core-5.3.iso /tmp', shell=True)
            call('cp ~/Downloads/Core-5.3.qcow2 /tmp', shell=True)

            if not os.path.isfile('/home/test/Downloads/Core-current.iso'):
                downloadfile('http://distro.ibiblio.org/tinycorelinux/7.x/x86/release/Core-7.0.iso')
                call('mv -f ~/Downloads/Core-7.0.iso ~/Downloads/Core-current.iso', shell=True)
                print ("* Using 7.0 as Core-current as download is broken from time to time")

            if os.path.isfile('/home/test/Downloads/Core-current.iso') and \
                os.path.isfile('/home/test/Downloads/Core-5.3.iso') and \
                os.path.isfile('/tmp/Core-5.3.iso') and \
                os.path.isfile('/tmp/Core-5.3.qcow2'):
                call('tracker-control -f /home/test/Downloads/Core-current.iso', shell=True)
                print ("* Downloading complete!")
                call('touch /tmp/boxes_configured', shell=True)
            else:
                print ("* Downloading broken let's give it another try next time")

        # Skip dogtail actions to print to stdout
        config.logDebugToStdOut = False
        config.typingDelay = 0.1
        config.childrenLimit = 500
        config.actionDelay = 1

        # Include assertion object
        context.assertion = dummy()

        # Store scenario start time for session logs
        context.log_start_time = strftime("%Y-%m-%d %H:%M:%S", localtime())

        context.app_class = App('gnome-boxes', recordVideo=True)

    except Exception as e:
        print("Error in before_all: %s" % e.message)

    do_backup()
Example #6
0
def before_all(context):
    """Setup stuff
    Being executed once before any test
    """

    try:
        if not os.path.isfile('/tmp/boxes_configured'):
            print("** Turning off gnome idle")
            if call("gsettings set org.gnome.desktop.session idle-delay 0",
                    shell=True) == 0:
                print("PASS\n")
            else:
                print(
                    "FAIL: unable to turn off screensaver. This can cause failures"
                )

            # Download Core-5.3.iso and images for import if not there
            downloadfile(
                'http://distro.ibiblio.org/tinycorelinux/5.x/x86/archive/5.3/Core-5.3.iso'
            )
            downloadfile(
                'https://dl.dropboxusercontent.com/u/93657599/vbenes/Core-5.3.vmdk'
            )
            downloadfile(
                'https://dl.dropboxusercontent.com/u/93657599/vbenes/Core-5.3.qcow2'
            )
            call('cp ~/Downloads/Core-5.3.iso /tmp', shell=True)
            call('cp ~/Downloads/Core-5.3.qcow2 /tmp', shell=True)
            call('touch /tmp/boxes_configured', shell=True)

        # Skip dogtail actions to print to stdout
        config.logDebugToStdOut = False
        config.typingDelay = 0.1
        config.childrenLimit = 500

        # Include assertion object
        context.assertion = dummy()

        # Store scenario start time for session logs
        context.log_start_time = strftime("%Y-%m-%d %H:%M:%S", localtime())

        context.app_class = App('gnome-boxes')

    except Exception as e:
        print("Error in before_all: %s" % e.message)

    do_backup()
Example #7
0
def before_all(context):
    """Setup stuff
    Being executed once before any test
    """

    try:
        if not os.path.isfile('/tmp/boxes_configured'):
            print("** Turning off gnome idle")
            if call("gsettings set org.gnome.desktop.session idle-delay 0", shell=True) == 0:
                print("PASS\n")
            else:
                print("FAIL: unable to turn off screensaver. This can cause failures")

            # Download Core-5.3.iso and images for import if not there
            downloadfile('http://distro.ibiblio.org/tinycorelinux/5.x/x86/archive/5.3/Core-5.3.iso')
            downloadfile('https://dl.dropboxusercontent.com/u/93657599/vbenes/Core-5.3.vmdk')
            downloadfile('https://dl.dropboxusercontent.com/u/93657599/vbenes/Core-5.3.qcow2')
            call('cp ~/Downloads/Core-5.3.iso /tmp', shell=True)
            call('cp ~/Downloads/Core-5.3.qcow2 /tmp', shell=True)
            call('touch /tmp/boxes_configured', shell=True)

        # Skip dogtail actions to print to stdout
        config.logDebugToStdOut = False
        config.typingDelay = 0.1
        config.childrenLimit = 500

        # Include assertion object
        context.assertion = dummy()

        # Store scenario start time for session logs
        context.log_start_time = strftime("%Y-%m-%d %H:%M:%S", localtime())

        context.app_class = App('gnome-boxes')

    except Exception as e:
        print("Error in before_all: %s" % e.message)

    do_backup()