Commit Graph

200 Commits

Author SHA1 Message Date
Christian Stenger
248ac4a658 SquishTests: Adapt to moved menu item
Change-Id: Ib8df3f315b3e82b5ac4cc81f1347db801de994ff
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-06 11:46:31 +00:00
Christian Stenger
383cfb77cc SquishTests: Fix writing test files on Windows
Writing the text test files without encoding can end up in
ANSI encoding of the files and in turn a fail when opening
as the file is treated read only until correct encoding is
used.

Change-Id: I9e21e240b3b02011a2266dfda1f1b453c3dad457
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-19 08:59:23 +00:00
Christian Stenger
b44a7817b8 SquishTests: Handle codec problems
Reading files depends on the system encoding and will
return a bytes object instead of a str even for text files
on some Windows setups.
Handle this by explcitly converting to str if needed.
Handle possible decoding issues by falling back to UTF8
encoding when running into decoding error while decoding
on Windows.

Change-Id: I8c1f24ff052710e4b1927399d54e321088e3b171
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-20 08:14:10 +00:00
Christian Stenger
182104e013 SquishTests: Adapt to different texts on macOS
Change-Id: Ie97003fd7de907d1a0f3ac71d6244dd68e2bf833
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-19 13:44:16 +00:00
Christian Stenger
942a9d0519 SquishTests: Avoid different type structures
On Windows the read content will be bytes instead of str. To have
a unified code path we need to convert it to str.

Change-Id: I16004968d8fed7bb2336ad594c31b38100f773cd
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-07-07 11:16:28 +00:00
Robert Löhning
fe9e5cc42f SquishTests: Get editor's real name while it is still visible
...or Squish might find something unrelated.

Change-Id: I08f9077ac3f919eeeb641eab70738e052bc60cee
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-12 13:33:40 +00:00
Robert Löhning
58fb6f88a6 SquishTests: Update reading build issues
Fixes tst_build_new_project, tst_CCOM02 et al.

tst_tasks_handling fails which might be an actual issue, reported in:

Task-number: QTCREATORBUG-29209
Change-Id: I5eae54df27d8ba8f441e5b9c4acdaa2b41716245
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-05-31 12:04:15 +00:00
Robert Löhning
d86b091297 SquishTests: Further Python3 adaption
Fixing tests in suite_editors

Change-Id: I4e5e1adc2c4e6606232d76a794aff7a7144d5c9e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-02 09:14:12 +00:00
Robert Löhning
2ffe169a8d SquishTests: Try stabilizing tst_generic_highlighter
Change-Id: I12e29f2886d22ce03a1a2eb62d5c776cd894d359
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 10:48:21 +00:00
Robert Löhning
42c653b53c SquishTests: Don't filter out code model issues when we need them
Amends c46dff0199

Change-Id: I5f2613edf15f86161a576ab21f16f079bd12a59f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-06 09:38:54 +00:00
Robert Löhning
41c1b76af0 SquishTests: Stabilize tst_rename_macros
Change-Id: I9d77bf9daa66b46e2b16c8618e1848538cb797aa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-04 09:51:26 +00:00
Christian Stenger
ac4aaf5e23 SquishTests: Some Python3 adaption
Makes some tests succeed and lets a couple of tests get further
on macOS.

Change-Id: I9a3f124c094e67f51748ddae47d00897fe5259d5
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-03-27 04:36:30 +00:00
Christian Stenger
5c4cf2d018 SquishTests: More adaption to changed wizard template
Change-Id: Ib073a8eae3ee87dc46699083799a8316da66b32d
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-23 12:51:08 +00:00
Christian Stenger
3a7ab3ce8e SquishTests: Rename helper class
Change-Id: I39890cbd98b7e6ebcc0fdf4722d0311eb6650397
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-23 12:50:56 +00:00
Eike Ziller
b29cb4efe1 Merge remote-tracking branch 'origin/9.0' into 10.0
Conflicts:
	src/plugins/texteditor/codestyleselectorwidget.cpp
	src/plugins/updateinfo/updateinfoplugin.cpp

Change-Id: Iac33b852ccef6018bd81188716526aa70c3f5a2d
2023-02-10 10:29:14 +01:00
Christian Stenger
bad6b2c290 SquishTests: Avoid crash in test
Workaround crash inside a test that may happen if the
test tries to wait for an object when the AUT is gone already.
Check for a clean exit and only if this is not the case
try to continue with the error handling.

Change-Id: I65f3e72cd343ec527ad822de915bc0c49c263153
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-02-09 12:04:18 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Robert Löhning
698a495972 SquishTests: Use existing function saveAndExit()
Change-Id: I2e10de8b454a69b3e4ade7520b4fa00415bcde42
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-15 14:45:42 +00:00
Christian Stenger
75177f4c34 SquishTests: Expect some more error message
Change-Id: I33f359673e6d23f0188072db891db08dafa72ace
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-12-14 05:06:25 +00:00
Robert Loehning
b85183d966 SquishTests: Improve tst_memberoperator
- Update expected behavior
- Update to ClangCodeModel replacing "." with "->"
  only after selecting a completion
- Update to ClangCodeModel no longer announcing
  needed substitution in proposal widget
- Added test for unchanged lines
- Stabilize by using proper wait conditions
- Fix surplus warning

Change-Id: Ia90e0102d44fbd8abb41acaa83509657ad11bf4d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-15 08:48:16 +00:00
Robert Loehning
af6741b5f2 SquishTests: Update tst_basic_cpp_support
While the old code model used to jump to the "extern" line,
clangd jumps directly to the linked variable.

Change-Id: I2817d87697b6040afdd538e8e15b4b40ef17e124
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-09 13:21:58 +00:00
Robert Loehning
c4164738b8 SquishTests: Stabilize tst_basic_cpp_support
Make sure the CppEditor is available before proceeding.

Change-Id: I34ed4f581637cc3608283ac045ceb5b4e6ada55a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-09 13:21:38 +00:00
Robert Löhning
c72a93599d Squish-Tests: Use QTC_DO_NOT_PROPAGATE_LD_PRELOAD
This is a reaction to an change in Creator's handling
of environment variables. Creator now passes on
LD_PRELOAD set by Squish. This results in build errors
and crashes of started applications.

Change-Id: I39cf21c60a474d7453e9c29fd3eaf32d3f0d6806
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-24 19:20:07 +00:00
Robert Löhning
061948e2e6 SquishTests: Update SaveItemsDialog and ReadOnlyFilesDialog
Fixes tst_modify_readonly

Change-Id: I1ba81af321a8ca3d5498d68e2d85abd1214546b9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-10-24 07:14:00 +00:00
Christian Stenger
86d41d58a8 Squish: Restore some more object names
..and adapt test slightly. Fixes generic highlighter test.

Change-Id: I72de310d55ceadc684d15d4e257cd1d90fcf836b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-17 07:16:53 +00:00
Christian Stenger
9e659ac759 Squish: Adapt to missing object names
Change-Id: I0bf9bde83bbe78b875775f245268b137ddb71d32
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-10-12 13:27:44 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Christian Stenger
662cc3ca06 Squish: Adapt to changed UI text
Change-Id: I02d178646ef04893f8d839b2a30085798f1c5fa7
Reviewed-by: hjk <hjk@qt.io>
2022-07-01 09:14:53 +00:00
Robert Löhning
0c2e1cf094 Squish: Update location of Options dialog
Change-Id: Ie9df4f897621520744998c3dbd9a3c44600ba844
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-28 10:13:34 +00:00
Robert Löhning
9d5512b137 Squish: Retire Qt4
It can't be built with current compilers anymore and there
are no more binary packages publicly available.

Change-Id: I906789bbcca053690f39246ff7c3e602703ada37
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-11 12:10:06 +00:00
Christian Stenger
4e47ed66c9 Squish: Fix qml indentation test
Adapt to default build system change.

Change-Id: I70b5869871d4fbb612d4b6a28beb5e73c2d8d88e
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-03-18 14:39:56 +00:00
Eike Ziller
1368111824 Merge remote-tracking branch 'origin/6.0' into 7.0
Change-Id: Ie2b23daa457c2aed635a784963bc1e95740bd076
2022-02-02 10:17:03 +01:00
Robert Löhning
4980f71dd5 Squish: Update tests which use "Rename Symbol Under Cursor"
When using this on open files, Creator used to make the changes
but not save the file. Creator 6 now also saves the file unless
it already contained other changes. Because the file is being
saved immediately, "Save All" and "Revert to Saved" cannot be
used in this situation anymore.

Change-Id: I0b8a58d998c54ccceae6d178b2c7a6f6182c7ad0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-28 10:59:39 +00:00
Christian Stenger
8039aa9ddb Squish: Adapt to changed UI
New File and New Project are nowadays separate menu entries.

Change-Id: I36c619d5a2eb4b5ac36bb25a20a1cb62f33493bb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-12-09 12:10:26 +00:00
Robert Löhning
5ba3eb7fcf Squish: Update for running tst_generic_highlighter
Change-Id: I262fb7a7223e235708cbc7e8e382a2448a2f8c84
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-29 13:20:00 +00:00
Robert Löhning
3d20cc68e5 Squish: Update tst_memberoperator
Change-Id: I929ef6dc2db7c9efdd0c33c42aa44268595bc75d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-23 09:26:24 +00:00
Robert Löhning
f1c5c1fc03 Squish: Stabilize tst_memberoperator
Frequently wait for the editor again to avoid the
"Error in type() invocation".

Change-Id: Id8e5971e6ef8fbb8dfb59fbb971a2212557adf72
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-23 09:26:17 +00:00
Christian Stenger
0408b4a757 Squish: Improve Python2/Python3 compatibility
Change-Id: I49dc9ee2f4ef52900b403ed94f0c6cd5925239b6
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-08-12 11:17:44 +00:00
Christian Stenger
a37a02a6b3 Squish: Add test for clean whitespaces
Task-number: QTCREATORBUG-24565
Change-Id: Idd763004f6ce9f1d34b902ea2fcf5c166ce8d4cf
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-10-02 14:59:00 +00:00
Robert Loehning
48a3423fcc Squish: Don't wait for the same object item twice in a row
Change-Id: Ib6ebc6f0c4fff5e29c7613dc6098da663539dc3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-02 12:20:56 +00:00
Robert Loehning
9c7a1577a5 Squish: Don't try to "Save All" when there are no unsaved files
Change-Id: I431c9754d84d36f0c09e45e6c43fe67f173da59f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-02 11:16:09 +00:00
Robert Loehning
70662eeb90 Squish: Don't "Save All" at the end of tst_rename_macros
There are no unsaved files.

Change-Id: Ief078f521a7bf6e257d862b69b8dc003b47da31e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 09:42:48 +00:00
Christian Stenger
7c669a06be Squish: Adapt to changed ui
Change-Id: Ibad3b2080040f7345125c549527f22f2c246fbef
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-06-11 13:44:24 +00:00
Robert Loehning
7c95e17436 Make WidgetTips Squish-testable
Change-Id: I337fdca3541c5b2fb8f09ab2d7721b8950c0bea9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-21 10:01:01 +00:00
Robert Loehning
da558f3376 Squish: Don't close files before exiting Creator
It's not needed and it's fragile since
the menu item is disabled at times.

Change-Id: I0c72c5072374462d99740e7eaa752f91e019c6ee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-02 09:46:19 +00:00
Robert Loehning
aac77eecb9 Squish: Replace Qt version 5.6.1 with 5.14.1
Task-number: QTCREATORBUG-22111
Change-Id: Iaae052e73a264252e399bd0992be4b420e2799ae
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-10 15:59:08 +00:00
Robert Loehning
1ebb72b47f Squish: Update expected tooltips
Change-Id: I88c5757b1f3beda34773ec3738779094a8441c2f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-17 10:53:50 +00:00
Christian Stenger
a87293d1c4 Squish: Update expected tool tips
Change-Id: Ibde199b8f88448c9f0e7b235f7ede57735718201
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-11-15 22:58:52 +00:00
Christian Stenger
cfd419cc0c Squish: Adapt to changed ui
Change-Id: Icf371af4de7aadbcab5cdf53a8095b26a7150aba
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-11-12 11:22:31 +00:00
Christian Stenger
17f5e19399 Squish: Stabilize tests that rely on a parsed project
As more and more progress bars might be present for different
purposes and we are not able to easily distinguish them
we need to use a more reliable way to wait for the end of
parsing a project.
Add a respective function and use the new approach where
this appears to be appropriate or necessary.

Change-Id: I20e2b9b0efd4785f8f0b1ddbc8496be111628669
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2019-10-01 06:11:42 +00:00