[glib: 1/2] tests: Move GObject performance tests to gobject/tests/performance/




commit d463de05b143a3c4686409ab88feedc1b789b43b
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Jun 8 11:29:15 2022 +0100

    tests: Move GObject performance tests to gobject/tests/performance/
    
    This doesn’t change the tests’ behaviour, but moves them to a slightly
    more logical location.
    
    They are still not installed or run by default.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1434

 gobject/tests/meson.build                          |   2 +
 gobject/tests/performance/meson.build              |  13 +++
 .../tests/performance}/performance-threaded.c      |   2 +-
 .../tests/performance}/performance.c               |   2 +-
 tests/gobject/meson.build                          |  13 +--
 tests/gobject/testcommon.h                         | 105 ---------------------
 6 files changed, 18 insertions(+), 119 deletions(-)
---
diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build
index 98f992eff8..1837fcc772 100644
--- a/gobject/tests/meson.build
+++ b/gobject/tests/meson.build
@@ -1,3 +1,5 @@
+subdir('performance')
+
 marshalers_h = custom_target('marshalers_h',
   output : 'marshalers.h',
   input : 'marshalers.list',
diff --git a/gobject/tests/performance/meson.build b/gobject/tests/performance/meson.build
new file mode 100644
index 0000000000..064e8cb3d2
--- /dev/null
+++ b/gobject/tests/performance/meson.build
@@ -0,0 +1,13 @@
+common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS']
+common_deps = [libm, thread_dep, libglib_dep, libgobject_dep]
+
+# Don't install these ones, and keep them out of 'meson test' because they take too long...
+executable('performance', 'performance.c',
+    c_args : common_c_args,
+    dependencies : common_deps,
+    install : false)
+
+executable('performance-threaded', 'performance-threaded.c',
+    c_args : common_c_args,
+    dependencies : common_deps,
+    install : false)
\ No newline at end of file
diff --git a/tests/gobject/performance-threaded.c b/gobject/tests/performance/performance-threaded.c
similarity index 99%
rename from tests/gobject/performance-threaded.c
rename to gobject/tests/performance/performance-threaded.c
index af8cc79b06..12a8b3d1e7 100644
--- a/tests/gobject/performance-threaded.c
+++ b/gobject/tests/performance/performance-threaded.c
@@ -18,7 +18,7 @@
 #include <math.h>
 #include <string.h>
 #include <glib-object.h>
-#include "testcommon.h"
+#include "../testcommon.h"
 
 #define DEFAULT_TEST_TIME 2 /* seconds */
 
diff --git a/tests/gobject/performance.c b/gobject/tests/performance/performance.c
similarity index 99%
rename from tests/gobject/performance.c
rename to gobject/tests/performance/performance.c
index 49885e8522..937509d8dd 100644
--- a/tests/gobject/performance.c
+++ b/gobject/tests/performance/performance.c
@@ -18,7 +18,7 @@
 #include <math.h>
 #include <string.h>
 #include <glib-object.h>
-#include "testcommon.h"
+#include "../testcommon.h"
 
 #define WARM_UP_N_RUNS 50
 #define ESTIMATE_ROUND_TIME_N_RUNS 5
diff --git a/tests/gobject/meson.build b/tests/gobject/meson.build
index 6d6c1caaaa..13923cdf38 100644
--- a/tests/gobject/meson.build
+++ b/tests/gobject/meson.build
@@ -41,15 +41,4 @@ foreach test_name, extra_args : gobject_tests
   timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
   # FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
   test(test_name, exe, env : test_env, timeout : timeout, suite : suite)
-endforeach
-
-# Don't install these ones, and keep them out of 'make check' because they take too long...
-executable('performance', 'performance.c',
-    c_args : common_c_args,
-    dependencies : common_deps,
-    install : false)
-
-executable('performance-threaded', 'performance-threaded.c',
-    c_args : common_c_args,
-    dependencies : common_deps,
-    install : false)
+endforeach
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]