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

Details

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • None
    • Android

    Description

      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"
      

      Attachments

        Issue Links

          Activity

            People

              qtandroidteam Qt Android Team
              jimis Dimitrios Apostolou
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: