Commit graph

28 commits

Author SHA1 Message Date
António Fernandes 37740f0d72 general: Stop using gtk_main_iteration()
It's going away with GTK4. Use the recomended replacement.
2021-11-22 15:16:18 +00:00
Ondrej Holy a22f7ffc7c test: Run tests in unique directory
The tests currently create various files and directories with generic names
and manipulate with them directly in the `/tmp` directory. The tests also
remove all files in `/tmp` with the generic prefixes like `move`, `copy`,
etc. This can simply cause test suite failures if files with such names
already exist in the `/tmp` directory. Also, the test suite can easily remove
files created by other applications. Let's always create an unique directory
in `/tmp` for tests to fix the mentioned problems...
2021-01-18 10:32:12 +00:00
Sam Thursfield 7712c2c7e1 Port to Tracker 3
Mostly the port is straightforward, we connect to tracker-miner-fs
explicitly over D-Bus instead of the centralized tracker-store daemon
we connected to previously.

The search-engine-tracker test is now isolated from the user's real
Tracker index using the `tracker-sandbox` script provided by Tracker,
and it lets tracker-miner-fs index the test file rather than trying
to synthesize the expected database contents.

There are more changes in nautilus-tag-manager.c.  Until now, starred
file information was stored in the tracker-miner-fs database. This has
some downsides, firstly the data is deleted if someone runs `tracker
reset --hard`, secondly it isn't possible to do this from inside a
Flatpak sandbox with Tracker 3.0.  because the

This commit changes the NautilusTagManager to set up a private
database inside XDG_DATA_HOME/nautilus/tags. This stores the starred
file information. The database is managed with Tracker, which allows us
to continue using the rename-tracking that tracker-miner-fs provides.
The same limitations apply as before that only files in indexed
locations can be starred.
2020-09-02 17:28:38 +02:00
Sam Thursfield 1321a34947 tests: Make search tests return error codes on failure
Previously the tests could appear to succeed even if the search
didn't work as expected.
2020-09-02 12:17:31 +02:00
Alberts Muktupāvels dce530aa87 dbus-manager: add and implement FileOperations2 interface
Add new version of FileOperations interface. This versions adds
PlatformData argument to all methods. Currently supported arguments
are parent-handle and timestamp.

This change is necessary for proper focus handling.

https://gitlab.gnome.org/GNOME/nautilus/merge_requests/504
2020-04-06 21:19:15 +03:00
Ondrej Holy fd2e7dfdea general: Run uncrustify script
There are some style issue since the last run. Let's run it again
before enabling style-check CI job.
2020-04-05 16:22:26 +00:00
Carlos Soriano 20c94c338f test: As the previous commit, increase test timeout
These tests take long...
2019-01-22 12:51:55 +00:00
Carlos Soriano 9d8ee6adf9 test: Increase timeout to 480
Those tests just take long time...
2019-01-22 12:50:31 +00:00
Ernestas Kulik d92e1133da general: Null-initialize some more auto variables 2018-12-12 14:02:51 +01:00
Carlos Soriano 1f8b23d7c0 tests: Increase timeout
It timeouts in Debian and sometimes locally.
2018-09-14 05:17:35 +00:00
Carlos Soriano 9b3d13ce8c tests: Make timeout bigger
Some tests just require more, don't fail because they do so.
2018-09-12 13:00:07 +00:00
Alexandru Fazakas 375c9ee792 Undo/redo, search tests, test library and more 2018-08-28 12:35:46 +00:00
Alexandru Fazakas e126170bf9 test: copy-files: Fix copy-files test
In order for the tests to work in parallel, we need the file/directory
names not to collide.

This patch fixes the namy for the copy-files test, now all file-operations
tests should be able to work in parallel.
2018-07-20 16:58:37 +03:00
Alexandru Fazakas a54c98973f test: Add trash-or-delete test
This patch adds trash_or_delete synchronous alternative and a test
including both of these functionalities.
2018-07-20 16:58:37 +03:00
Alexandru Fazakas 2727c82900 test: Add copy operations unit test
This patch adds both a sync alternative to the copy operations and a
test for it.
2018-07-20 16:58:33 +03:00
Alexandru Fazakas 1be08bd3a0 test: dir-has-files: Clean up files
We should clean up files/directories after using them for testing.

This patch deletes all create files after using them for the dir-has-files
test.
2018-07-20 12:57:25 +03:00
Ernestas Kulik 609bf585fe tests: Remove git conflict indicator from build file
Oops.
2018-07-19 13:23:21 +03:00
Ernestas Kulik 2f8e300d3d tests: Use GMainLoop in search engine test
This removes the need for a display.
2018-07-19 13:20:38 +03:00
Alexandru Fazakas ab31018cda test: Add file-operations-move test
This patch includes the addition of the sync alternative to the
file-operations-move function and a test for it.
2018-07-16 18:51:44 +00:00
Alexandru Fazakas 93fb7954fb test: Remove useless macro definition
This definition in the dir_has_files unit test is not used,
so it should be removed.
2018-05-18 14:56:34 +00:00
Alexandru Fazakas bfc3aebe04 test: Add dir_has_files unit test
In this patch we added an unit test with 3 simple tests for the
dir_has_files.

https://gitlab.gnome.org/GNOME/nautilus/issues/224
2018-05-18 14:47:36 +00:00
Ernestas Kulik f3be754974 tests: directory-async: Use GMainLoop
Using the GTK+ main loop doesn’t make a lot of sense in this case.
2018-05-18 14:39:27 +00:00
Ernestas Kulik cfa26f0cfe build: Set a couple env vars when running tests
This will save some time/thinking when running tests manually.
G_TEST_BUILDDIR and G_TEST_SRCDIR will be useful if
g_test_build_filename() is ever used, since our primary build mode is
outside the source directory, which would break the function.
2018-05-18 14:05:53 +00:00
António Fernandes 694e4396c7 file: Remove link info attribute
Leftovers from NautilusLink removal.
2018-05-14 00:17:08 +01:00
Alexandru Fazakas 89e362ae13 test: Add file-utilities unit test
File utilities operations need to be tested thoroughly everytime
we make changes to make sure they're fine to use further.

This patch introduces an unit test file for the
nautilus_file_selection_equal.
2018-04-04 12:10:05 +03:00
Ernestas Kulik 510a8303dd build: make all tests optional
This can help cut down on link times a bit when working on things.
2018-03-16 06:22:36 +02:00
Ernestas Kulik 9e8f138999 general: fix old-style function declarations
Parameterless function declarations imply indeterminate parameter count,
while the implementations take no arguments.
2018-03-01 08:37:49 +00:00
Carlos Soriano 12601e9204 tests: Split between display and displayless
Some tests require gtk_init, which requires a display and therefore
cannot be part of the tests to be ran in the GitLab CI.

Split those so we can pass an option to meson to only test the
displayless tests for GitLab CI.
2018-01-06 01:17:29 +01:00