Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-32974

Add the option to load testability library by reading an environment variable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.1.1
    • Core: Other
    • None

    Description

      Summary

      Add the option to load the testability library based on whether an environment variable is set, in addition to the current "-testability" flag.

      Rationale

      The Autopilot project currently uses the -testability flag when launching Qt apps to load the autopilot testability driver. This mostly works, but has a few problems:

      1. It relies on the application author passing char** argv to the QApplication constructor. This happens less often than you might think.
      1. We want to load the testability driver recursively. For example, if autopilot launches 'app_a' with -testability, and this application launches another Qt app, we want that to load with testability as well. Currently this requires that the 'app_a' author codes this behavior in.
      1. Some Ubuntu Touch applications are going to be launched by upstart jobs. This makes it harder to set, or remove the -testability command line option.

      Proposed Solution

      I propose we check an environment variable QT_LOAD_TESTABILITY. If it exists and is set to something other than an empty string, we should load the testability library.

      Attached is a three line patch that, when applied to src/widgets/kernel/qapplication.cpp adds this functionality.

      Attachments

        For Gerrit Dashboard: QTBUG-32974
        # Subject Branch Project Status CR V

        Activity

          People

            Unassigned Unassigned
            thomir Thomi Richards
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes