Commit Graph

69 Commits

Author SHA1 Message Date
Philip Withnall
80e878005f tests: Don’t run lint tests under valgrind
That’s not useful, as the lint tests aren’t actually GLib code.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-02-13 08:41:59 +00:00
Philip Withnall
81700d9aa6 tests: Skip lint tests if bash is not available
They all require bash.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-02-12 14:15:51 +00:00
Simon McVittie
d7601f7eed Incorporate some lint checks into meson test
This will make it easier and more obvious for developers to run them
locally: I'm sure I'm not the only developer who had assumed that
`.gitlab-ci/` is private to the CI environment and inappropriate (or
perhaps even destructive) to run on a developer/user system.

The lint checks are automatically skipped (with TAP SKIP syntax) if we
are not in a git checkout, or if git or the lint tool is missing. They
can also be disabled explicitly with `meson test --no-suite=lint`,
which downstream distributions will probably want to do.

By default, most lint checks are reported as an "expected failure"
(with TAP TODO syntax) rather than a hard failure, because they do not
indicate a functional problem with GLib and there is a tendency for
lint tools to introduce additional checks or become more strict over
time. Developers can override this by configuring with `-Dwerror=true`
(which also makes compiler warnings into fatal errors), or by running
the test suite like `LINT_WARNINGS_ARE_ERRORS=1 meson test --suite=lint`.

One exception to this is tests/check-missing-install-tag.py, which is
checking a functionally significant feature of our build system, and
seems like it is unlikely to have false positives: if that one fails,
it is reported as a hard failure.

run-style-check-diff.sh and run-check-todos.sh are not currently given
this treatment, because they require search-common-ancestor.sh, which
uses Gitlab-CI-specific information to find out which commits are in-scope
for checking.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-08 00:18:23 +00:00
Emmanuel Fleury
207b8cb8a5 Convert tests/assert-msg-test* to glib/tests/assert-msg-test*
Closes issue #1434
2022-06-28 11:19:21 +01:00
Philip Withnall
1b377e6574 build: Drop MALLOC_PERTURB_ from test environments
It’s set already by Meson, to an actually random value.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-06-21 12:50:31 +01:00
Emmanuel Fleury
fcbdfb5be8 Remove tests/gobject empty directory
Helps issue #1434
2022-06-08 15:25:04 +02:00
Emmanuel Fleury
70401ae8c3 Moving tests/refcount/ directory to gobject/tests/
Modified by Philip Withnall to omit the subdirectory and drop the
`refcount` suite as both seem like unnecessary over-categorisation.

Related to issue #1434
2022-05-26 18:37:35 +01:00
Philip Withnall
ce585ba4d2 Merge branch 'slice-test' into 'main'
Slice test

See merge request GNOME/glib!2579
2022-05-26 17:01:52 +00:00
Philip Withnall
0dca8bb6aa tests: Remove redundant meson commands
The `tests` array is now empty, so everything to do with it can be
removed from this file.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-26 17:27:03 +01:00
Emmanuel Fleury
c71d0c53b5 Move tests/module-test.c to gmodules/tests/
Helps issue #1434
2022-05-26 17:26:58 +01:00
Emmanuel Fleury
8ad765a4c2 Convert test/slice-test.c to glib test framework and move it to glib/tests/ 2022-05-17 18:35:16 +02:00
Emmanuel Fleury
ddb0585e65 Moving slice-threadinit.c test to glib/tests/
Related to issue #1434
2022-05-16 15:21:02 +02:00
Philip Withnall
5160b12740 Merge branch 'move_thread_test' into 'main'
Move tests/thread-test.c to glib/tests/thread-deprecated.c

See merge request GNOME/glib!2639
2022-05-16 12:41:25 +00:00
Philip Withnall
d1bec29217 Merge branch 'move_gio-test' into 'main'
Convert tests/gio-test.c to g_test framework

See merge request GNOME/glib!2539
2022-05-16 12:34:27 +00:00
Marc-André Lureau
d1520bd06e glib/tests: move spawn-test-win32-gui
Fixes: commit 762ed2e82b ("Move tests/spawn-test.c -> glib/tests/spawn-test.c")

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-12 18:48:59 +02:00
Emmanuel Fleury
4589ff080d Move test/gio-test.c to glib/test/io-channel-basic.c
Helps issue #1434
2022-05-12 17:25:07 +02:00
Emmanuel Fleury
3f085d1f4a Moving tests/mapping-test.c to glib/test/mapping.c
Helps issue #1434
2022-05-10 19:23:14 +02:00
Philip Withnall
4b4a5f83b2 Merge branch 'mainloop-test' into 'main'
Remove unnecessary test tests/mainloop-test.c duplicated in glib/tests/mainloop.c

See merge request GNOME/glib!2645
2022-05-10 14:40:17 +00:00
Emmanuel Fleury
b67de18f40 Remove unnecessary test tests/mainloop-test.c duplicated in glib/tests/mainloop.c
Related to issue #1434
2022-05-10 10:16:13 +02:00
Philip Withnall
bd1781a356 build: Stop using Meson features deprecated in Meson <0.60
This clears some Meson warnings.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:55:28 +01:00
Emmanuel Fleury
647506966d Move tests/thread-test.c to glib/tests/thread-deprecated.c
Helps issue #1434
2022-05-06 10:50:40 +02:00
Philip Withnall
208ae36596 Merge branch 'threadpool_test' into 'main'
Move tests/threadpool-test.c to glib/test/thread-pool-slow.c

See merge request GNOME/glib!2634
2022-05-05 12:45:37 +00:00
Emmanuel Fleury
611a020308 Move tests/threadpool-test.c to glib/test/thread-pool-slow.c
Helps issue #1434
2022-05-05 10:51:16 +02:00
Emmanuel Fleury
fd8424a974 Removing unused tests/timeloop.c and tests/timeloop-basic.c
Remove unused tests/timelooop.c and tests/timeloop-basic.c because
these programs are manual performance tests which are no more relevant
for glib. They were used for the writing of GMainLoop but since then
they haven't not much been used in 22 years, it is safe to remove them.

Helps issue #1434
2022-04-26 20:20:03 +02:00
Emmanuel Fleury
49ecdd1dba Move tests/onceinit.c to glib/tests/onceinit.c
Related to issue #1434
2022-04-11 15:26:40 +02:00
Emmanuel Fleury
762ed2e82b Move tests/spawn-test.c -> glib/tests/spawn-test.c
Related to issue #1434
2022-04-07 18:36:45 +02:00
Emmanuel Fleury
795952cb8d Move tests/unicode-encoding.c to glib/tests/unicode-encoding.c
Related to issue #1434
2022-04-04 18:51:30 +02:00
Emmanuel Fleury
5931ed8c2b Move test files on slices from tests/ to glib/tests/
slice-color.c and slice-concurrent.c are moved from tests/ to glib/tests/

Related to issue #1434
2022-03-22 11:42:33 +00:00
Emmanuel Fleury
495508cf84 Enabling disabled slice-color test case 2022-03-22 11:42:33 +00:00
Emmanuel Fleury
2d6dc9ff2e Move tests/relation-test.c to glib/tests/relation.c
Related to issue #1434
2022-03-17 18:36:58 +01:00
Emmanuel Fleury
208dfe9ddc Move tests/type-test.c to glib/tests/types.c
Helps issue #1434
2022-03-04 16:24:20 +00:00
Emmanuel Fleury
16f0438bc6 Remove old test file tests/testglib.c 2022-02-22 18:48:01 +00:00
Philip Withnall
5b7383c544 tests: Merge iochannel-test into io-channel tests in glib directory
We’re trying to eliminate the legacy `tests/` directory. This commit
moves the code from `tests/iochannel-test.c` into
`glib/tests/io-channel.c` and ports it to the latest GLib test coding
standards:
 * Change `g_assert()` to `g_assert_*()`
 * Print verbose messages with `g_test_message()`
 * Rename some variables to conform to modern conventions
 * Use `GTest`

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1434
2022-02-17 21:42:35 +00:00
Emmanuel Fleury
e5cb2e9bbf Remove tests/testgdate.c from tests
Related to issue #1434
2022-02-03 15:18:05 +01:00
Emmanuel Fleury
849d3812c9 Move tests/file-test.c to glib/tests/fileutils.c 2022-01-26 15:18:40 +01:00
Philip Withnall
ce45b88b90 Merge branch 'unicode_caseconv_tests' into 'main'
Merge test/unicode-caseconv.c into glib/tests/unicode.c

See merge request GNOME/glib!2432
2022-01-19 15:54:19 +00:00
Emmanuel Fleury
b9f07a458a Merge test/unicode-caseconc.c into glib/tests/unicode.c
Related to issue #1434
2022-01-19 16:21:01 +01:00
Emmanuel Fleury
cddce179f5 Remove a disabled test case that was covered by glib/tests/collate.c
Related to issue #1434
2022-01-15 13:44:15 +01:00
Emmanuel Fleury
20c8ea1bc6 Move tests/env-test.c into glib/tests/environment.c 2021-12-16 16:32:26 +01:00
Emmanuel Fleury
9f760a7cc1 Moving tests/dirname-test.c to glib/tests/fileutils.c
Helps issue #1434
2021-12-16 10:41:13 +00:00
Emmanuel Fleury
241b9f41b4 Merging tests/child-test.c into glib/tests/spawn-multithreaded.c
Helps issue #1434
2021-12-15 23:12:59 +01:00
Philip Withnall
2c07c17840 Merge branch 'datetime_tests' into 'main'
Removing unnecessary test on gdatetime.c

See merge request GNOME/glib!2393
2021-12-14 15:25:40 +00:00
Philip Withnall
f493d3fd24 Merge branch 'cxx-test' into 'main'
Removing redundant cxx test tests/cxx-test.cpp

See merge request GNOME/glib!2391
2021-12-14 15:23:16 +00:00
Emmanuel Fleury
ae345e56c2 Distribute cxx test tests/cxx-test.cpp to each module tests directory
tests/cxx-test.cpp is removed and splitted into gio/tests/cxx.cpp,
gmodule/tests/cxx.cpp and gobject/tests/cxx.cpp.

Helps issue #1434
2021-12-14 14:43:03 +01:00
Emmanuel Fleury
6a17b114b6 Removing unnecessary test on gdatetime.c
Helps issue #1434
2021-12-14 13:46:06 +01:00
Emmanuel Fleury
cde56cfc70 Move tests/completion-test.c to glib/tests/completion.c
Helps issue #1434
2021-12-13 17:42:23 +01:00
Philip Withnall
17ffe7b303 Merge branch 'move_bit-test' into 'main'
Merging tests/bit-test.c into glib/tests/utils.c

See merge request GNOME/glib!2379
2021-12-02 09:45:37 +00:00
Emmanuel Fleury
dd47df80e1 Merging tests/bit-test.c into glib/tests/utils.c 2021-12-01 14:10:44 +01:00
Philip Withnall
b5b3327636 Merge branch 'move_test_sources' into 'main'
GSource: move test to glib/tests/

See merge request GNOME/glib!2376
2021-12-01 11:39:46 +00:00
Nishal Kulkarni
70a8811ccc GSource: move test to glib/tests/
Previously tests existed in two places,
`$top_srcdir/tests/sources.c` contained additional tests,
they have now been moved to `$top_srcdir/glib/tests/mainloop.c`
and `$top_srcdir/tests/sources.c` was deleted.

Related to: #1434
2021-12-01 14:04:46 +05:30