summaryrefslogtreecommitdiffstats
path: root/scripts/lib/perl5/QtQA/Proc
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-06-088-216/+16
| | | | | | | | | | | Replace the current license header in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: master Task-number: QTBUG-67283 Change-Id: I6ae743e055bbf1cf514abe604157068923fb03c6 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix licensingJani Heikkinen2017-06-018-136/+96
| | | | | | | | | | - Remove unnecessary license files and license header templates - Tools and test are licensed under GPL-EXCEPT nowdays, update correct license header there - Update test data to match current license headers Change-Id: Ia25c9e0989be326e0edeb0325af399edc26f0054 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Update copyright headersAntti Kokko2015-02-138-177/+113
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I5999ee256134fe82ab13f6f06fcd1d0aa150b688 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Fixed compatibility issues with perl >= 5.18Rohan McGovern2014-10-131-1/+1
| | | | | | | | | | | | | | | Remove an unnecessary usage of smartmatch. This has been marked experimental in newer perl, which generates warnings on use, causing test failures. The intent was to let the code work with regexes and plain strings, but since the code was only ever used with regexes, simply change to =~. Remove a wrong usage of defined() on an array. This code didn't mean what the author thought it meant (see perldoc -f defined), and using it this way is now deprecated, generating a warning. Change-Id: I388bb2e4cbd16ea468db099593763cfed9953f23 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Fix "missing AutoLoader" complain in OSX 10.9Simo Fält2014-05-091-0/+1
| | | | | | | | | Requiring AutoLoader module on testrunner fixes the "Can't locate package AutoLoader for @Proc::Reliable::ISA" warning, seen in OSX 10.9 nodes. Change-Id: Ie00318d7b2fe1df7d445b661f96cccc00b8fed38 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-148-8/+8
| | | | | | Change-Id: I02eaa709ff91d158a3e34f4e719254f2adce873e Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Make tests work without scripts/lib/perl5 in PERL5LIBRohan McGovern2012-10-053-3/+14
| | | | | | | | | | | | | | The tests and modules were a little inconsistent; some would add the lib directory to the includepath themselves, others expected the caller to take care of it (usually test.pl). Make it consistent: all tests should do it themselves, so that a plain `prove' command can work. Change-Id: I112dd0a1aa966404ab1a3c3b9467dcc83d1ddd0d Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-248-193/+193
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I0122cd74f6246a5f20eee2b33ceb328df77a32db Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QtQA::Proc::Reliable::Win32: fixed handling of (>8)-bit exit codesRohan McGovern2012-03-061-4/+54
| | | | | | | | | | | | | | | | | POSIX uses 16 bits for exit status; 8 bits of that comprise the exit code. Windows, on the other hand, uses a 32-bit exit code. In practice, exit codes larger than 8 bits are used when a process crashes or otherwise exits abnormally. Using perl's normal system(), $?, exit() etc, POSIX semantics are retained, which means portions of the exit code are discarded, effectively destroying information about processes which exit abnormally. Use some native Windows API to avoid this. Change-Id: I5386c80c7785f500d343bd7ee7df1a531a99f274 Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Fixed QtQA::Proc::Reliable::Win32 when passed output from Getopt::LongRohan McGovern2012-02-291-0/+14
| | | | | | | | | | | | | | | | In some cases, Getopt::Long (since 2.37) does not return plain scalars, but rather returns complex objects which happen to stringify to the values passed on the command-line. This is documented. Normally this is no problem, but QtQA::Proc::Reliable::Win32 needs to serialize the arguments to send to another process, and coderefs can't be serialized. So, stringify everything ourselves. Change-Id: Id4b200cf27701fedec44ef7ec980028a1c3a2a9f Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Implemented proper stdout_cb/stderr_cb callbacks on Windows.Rohan McGovern2012-02-293-38/+560
| | | | | | | | | | | | | | | | | | | | | | | The initial implementation of QtQA::Proc::Reliable::Win32 used a trivial and just-barely-good-enough implementation for the stdout/stderr callbacks. That is no longer good enough; we need proper stdout/stderr capturing on Windows to implement output buffering for parallel tests, and to implement the testrunner --tee-logs feature. Therefore, implement stdout_cb/stderr_cb with the same semantics as on Linux and Mac. The main caveat of the implementation is the use of interpreter threads; there is one thread used to run the process, one thread to read STDOUT, and one thread to read STDERR. The usage of threads should not matter in the majority of cases, but some code (e.g. Test::More) may be affected by the presence of multiple threads. Change-Id: Ic3e80afd9b61c79a4c5557c40a7323d1339ba9ef Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Fixed bugs in stdout_cb/stderr_cb callbacks on WindowsRohan McGovern2012-02-291-4/+4
| | | | | | | | | | | | | | | | | The first parameter of the callback is supposed to be the handle (STDOUT or STDERR), not the Proc::Reliable object. This was unnoticed because none of the users of stdout_cb/stderr_cb on Windows are using that parameter. The callback would be activated one time more than necessary, with empty text, due to line splitting regex matching on \z (zero-width end of string). Change-Id: Iccadc4ece285162f3cc7a2b764a694484929ceb0 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Fixed stdout_cb/stderr_cb stopping on first blank lineRohan McGovern2012-02-231-1/+1
| | | | | | | | | The regex used for iterating over the stdout/stderr lines was incorrectly requiring every line to be at least 1 character in length, so it would incorrectly stop at the first blank linke. Change-Id: Ic3f2811b7fbe6b3be6890ce1c71df770c5f5a18d Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-308-8/+8
| | | | | | | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Note that the "All rights reserved" line has not been removed from the test data for the license checker's selftest, but the extra blank line has been added to those files. Change-Id: Icf3080dcdb51c2cbf0e825f2f374cb9666eea44c Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-238-8/+8
| | | | | | | | | | | | Replace Nokia contact email address with Qt Project website. Note that the test data for the license checker's selftest are intentionally excluded from this commit, except for the last line of the LGPL-ONLY license text. The test data will be updated when/if the license checker stops allowing the old contact address. Change-Id: I82ef842d2536a4a9bea99832099f53247c8d4b4b Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QtQA::Proc::Reliable: don't retry successful commandsRohan McGovern2012-01-102-1/+14
| | | | | | | | | | If the output of commands matched any "probably junk" patterns, the command would be retried even if it exited with a 0 exit code. Change-Id: Ice728cb135336bba31853924a45f253802bf7a3d Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jyri Tahtela <jyri.tahtela@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-058-8/+8
| | | | | | Change-Id: I37b39e61a52db58885e99a4c8f2ba654de09f3c9 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add missing license headersJason McDonald2011-08-128-0/+328
| | | | | | | | Change-Id: Ie46c826863e546ee2f60796a037cd5c61f9a5192 Reviewed-on: http://codereview.qt.nokia.com/2606 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* testrunner: add support for --timeout option on WindowsRohan McGovern2011-07-311-2/+98
| | | | | | | | | | | | | Use Win32::Job to safely terminate a process (and all child processes) after a timeout. Special care is taken to try to preserve argument processing to be as close as possible to a plain system(@args). Change-Id: I9b552587787f1a4bec3015f985fac27951d8fa05 Reviewed-on: http://codereview.qt.nokia.com/2157 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Automatically recover from some transient errors in test scriptsRohan McGovern2011-07-2710-0/+1623
When running complex test procedures, it is unfortunately relatively common that certain types of errors may arise which are unrelated to the code under test. One example of this is a test procedure which attempts to perform a git clone from a remote host. If implemented simply, this test procedure will fail whenever the remote host is undergoing maintenance or a temporary network outage has occurred. This is usually undesirable. This commit adds some infrastructure for test scripts to transparently recover from these types of errors without having to explicitly code for them. Currently handled are various errors from git, ssh and scp relating to network problems. Task: QTQAINFRA-223 Change-Id: I8fb0a505cdbb8ad00f6bd036854b30e24201419b Reviewed-on: http://codereview.qt.nokia.com/644 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>