summaryrefslogtreecommitdiffstats
path: root/src/tools/androidtestrunner
Commit message (Collapse)AuthorAgeFilesLines
* androidtestrunner: Fix warnings about missing parameter to QStringLiteralFriedemann Kleint2019-11-281-1/+1
| | | | | | | | Use QString instead, fixing: src\tools\androidtestrunner\main.cpp(474): warning C4003: not enough arguments for function-like macro invocation 'QStringLiteral' Change-Id: I88b8c0f1dfa7828460e8952510e3d4150ab68896 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix typoBogDan Vatra2019-10-251-1/+1
| | | | | Change-Id: I9a429805414fb50aa059677beb5f8f8a48b72d9b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Don't excessively check all output files for failuresJan Arve Sæther2019-08-221-1/+1
| | | | | | | | | | | | | | | | | This is really just an optimization, but I suspect the author of the code assumed that the bitwise &= operator short-cicuits. (It doesn't). So this patch should then fix the code to have the intended behavior. We don't have to check for failures in the remaining output files once we've found one. pullFiles() returns just a bool indicating if one of the output files has a recorded fail, so checking the remaining output files after the first found failure is just a waste (and ideally they should contain the same failure (however, flaky tests might break this ideal)). Drive-by fix. Change-Id: I951e500a69198e7ed124be32199ac81bbddb9bf7 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix escaping of additional app parameters in adb shell commandDaniel Smith2019-08-191-1/+1
| | | | | Change-Id: I80e5b98efbc9654c684b3d78ba0d6688c21bd0f3 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix 'make check' for android-mingw32Jan Arve Sæther2019-07-031-1/+1
| | | | | | | | | | | | | | | | | | | g_options.buildPath did not have native separators. This caused INSTALL_ROOT to not have native path separators, which again made 'mingw32-make check' fail to deploy the .apk. (The actual failure was that mkdir failed because it did not accept paths with forward-slashes, so the install_target rule failed. For the record, the command of that rule had the following call to mkdir: mkdir $(INSTALL_ROOT:@msyshack@%=%)\libs\x86 Change-Id: Id792c36986b52a527546d48aa9f7d9587e7a18d9 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix androidtestrunner for windowsJan Arve Sæther2019-06-191-12/+6
| | | | | | | | | | | | | | | | | | | First, we cannot quote the whole command in double quotes, since the command itself very often have double quotes inside it. Secondly, we should use the same that the ssh(1) command does: Instead of adb shell setprop foo 'a b' we should use adb shell setprop foo "'a b'" as explained here: [https://developer.android.com/studio/command-line/adb#shellcommands] Last hunk in isRunning(): The pipe character got eaten by the shell if we used a single quote (so the stuff after the pipe (grep) was actually run locally). Switching to ssh-style quoting fixed that. Change-Id: I3075cdf8595ac2549cec8019f2cba79f77815e0b Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Run prebuilt android test APKsBogDan Vatra2019-06-131-11/+43
| | | | | | | | | | | | androidtestrunner now checks is the apk is build and if it is, it will skip the build phase. Now we can build the apks in parallel (which takes most of the time) and run them sequentially. This way running tests on Android is much faster. Change-Id: I82f34723ac08f7728cc0daab3366e03821335eed Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Android: Nuke ant supportBogDan Vatra2019-06-061-1/+1
| | | | | | | | | | | | | Ant is history for so many years, yet we forgot to remove it from androiddeployqt. [ChangeLog][Android] Remove ant support from androiddeployqt Change-Id: I093295e18e8710c565e9d101e21c49b3c62f6322 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Say hello to androidtestrunnerBogDan Vatra2019-06-062-0/+477
androidtestrunner is a tool needed to run qt tests on Android. Now you can run tests as simple as you run them on Linux, macOS, Windows. "$ make check" it's all you need to run tests on the default android device. ANDROID_DEVICE_SERIAL env variable can be used to use a specific android serial. Use cases: $ make -j1 check -j1 is needed to make sure we don't run multiple tests in parallel. $ ANDROID_DEVICE_SERIAL="emulator-5554" make check Run the test on "emulator-5554" $ make TESTARGS="-- -xml" check Switch to xml output. All params after -- are passed to test application. $ make TESTARGS="-- -o out.xml,xml -o out.txt,txt -o -,tap -vs" check Create two files out.xml and out.txt in the current folder and print "tap" format to stdout and enable logging of every signal emission. [ChangeLog][Android] Make it easy to run Qt tests on Android. "$ make check" is all it's needed to run a test on an Android device. Change-Id: I1a7f64b62608f7367b5a6aabf5d6c6e7e50242e6 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>