summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2022-09-07 20:50:20 -0500
committerFederico Mena Quintero <federico@gnome.org>2023-05-09 10:03:10 -0600
commitf9270d7504b5ac0488bb381933a516b2e74e097f (patch)
tree48f6b34a012af0c36bb6b18b603f23eb0a0dd23e
parent5cec37c70da29509ad7a339f38d9de399a76b810 (diff)
downloadat-spi2-core-f9270d7504b5ac0488bb381933a516b2e74e097f.tar.gz
Make child_pid static to atk_test_util.c
The one test that used that value can now use fixture->child_pid instead.
-rw-r--r--tests/at-spi2-atk/atk_test_accessible.c2
-rw-r--r--tests/at-spi2-atk/atk_test_util.c2
-rw-r--r--tests/at-spi2-atk/atk_test_util.h2
3 files changed, 2 insertions, 4 deletions
diff --git a/tests/at-spi2-atk/atk_test_accessible.c b/tests/at-spi2-atk/atk_test_accessible.c
index 97065310..cabff4cf 100644
--- a/tests/at-spi2-atk/atk_test_accessible.c
+++ b/tests/at-spi2-atk/atk_test_accessible.c
@@ -375,7 +375,7 @@ atk_test_accessible_get_process_id (gpointer fixture, gconstpointer user_data)
{
AtspiAccessible *obj = get_root_obj (DATA_FILE);
guint proc_id = atspi_accessible_get_process_id (obj, NULL);
- g_assert_cmpint (proc_id, ==, child_pid);
+ g_assert_cmpint (proc_id, ==, fixture->child_pid);
}
void
diff --git a/tests/at-spi2-atk/atk_test_util.c b/tests/at-spi2-atk/atk_test_util.c
index 547c9213..73c2f762 100644
--- a/tests/at-spi2-atk/atk_test_util.c
+++ b/tests/at-spi2-atk/atk_test_util.c
@@ -23,7 +23,7 @@
#include "atk_test_util.h"
#include <signal.h>
-pid_t child_pid;
+static pid_t child_pid;
static void
assert_clean_exit (int sig)
diff --git a/tests/at-spi2-atk/atk_test_util.h b/tests/at-spi2-atk/atk_test_util.h
index fd900e05..2af8f8b1 100644
--- a/tests/at-spi2-atk/atk_test_util.h
+++ b/tests/at-spi2-atk/atk_test_util.h
@@ -33,8 +33,6 @@
#include <sys/wait.h>
#include <unistd.h>
-extern pid_t child_pid;
-
AtspiAccessible *get_root_obj (const char *file_name);
void fixture_teardown (gpointer fixture, gconstpointer user_data);
void clean_exit_on_fail ();