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

Testing on Android: it should be possible to pass environment variables down to the device

XMLWordPrintable

    • Android
    • 0d5fe9c3d (dev), ee874e7ca (dev), 751d80f12 (6.6), f9892335f (tqtc/lts-6.5)
    • 2023wk48FOQtforAndroid

      Problem

      Android does not respect the custom test timeout that CMake sets with the environment variable QTEST_FUNCTION_TIMEOUT.

      Suggested solution

      In order to send a test with custom arguments to the (emulated) device, androidtestrunner executes:

      adb shell am start -e applicationArguments "whatever args we need"
      

      The key-value pair applicationArguments is then parsed by QtLoader.java:

      String parameters = intent.getStringExtra("applicationArguments");
      

      By the same logic we should be able to send custom environment variables, by doing for example:

      adb shell am start -e applicationArguments "arg1 arg2" -e environmentVariables "VAR1=blah VAR2=blue"
      

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

            assam Assam Boudjelthia
            jimis Dimitrios Apostolou
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes