- 
    Task 
- 
    Resolution: Fixed
- 
    P3: Somewhat important 
- 
    None
- 
    None
- 
        
- 
        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"
- relates to
- 
                    QTBUG-106479 androidtestrunner does not honour QTEST_FUNCTION_TIMEOUT -         
- Closed
 
-         
- mentioned in
- 
                    Page Loading... 
| For Gerrit Dashboard: QTBUG-106478 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 521503,7 | AndroidTestRunner: pass testlib env vars to the test app | dev | qt/qtbase | Status: MERGED | +2 | 0 | 
| 521506,9 | Android: accept both spaces and tabs separators for env vars and args | dev | qt/qtbase | Status: MERGED | +2 | 0 | 
| 522407,2 | AndroidTestRunner: pass testlib env vars to the test app | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 | 
| 522677,2 | AndroidTestRunner: pass testlib env vars to the test app | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |