Skip to content

Commit

Permalink
chore(linux): Check existence of services directory
Browse files Browse the repository at this point in the history
When running the integration tests, we provide a test service that
replaces `keyman-system-service`. DBus needs the updated `.service`
files in the `services` directory so that it will use the test
service. This change outputs an error and returns an non-zero
exit code if it can't find the `services` directory, which usually
means that `keyman-system-service` didn't get build.
  • Loading branch information
ermshiperete committed Sep 21, 2023
1 parent 89eab5e commit c16b602
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions linux/ibus-keyman/tests/KmDbusTestServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ void KmDbusTestServer::Loop()

int
main(int argc, char *argv[]) {
if (!g_file_test(KEYMAN_TEST_SERVICE_PATH, G_FILE_TEST_IS_DIR)) {
std::cerr << "ERROR: Directory " << KEYMAN_TEST_SERVICE_PATH << " doesn't exist! Exiting." << std::endl;
return 1;
}

KmDbusTestServer testServer;
testServer.Loop();

Expand Down

0 comments on commit c16b602

Please sign in to comment.