Fix testsuite without -Dprofiler=true
authorMatthias Clasen <mclasen@redhat.com>
Tue, 21 Jan 2020 23:09:43 +0000 (18:09 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 21 Jan 2020 23:09:43 +0000 (18:09 -0500)
Only build and run the performance tests if we have sysprof.

tests/meson.build
testsuite/css/performance/meson.build

index e7aa88ce874c414dae39146522893c1ba3af3d42..a62924d0506342f67dfd284afeb13fd2924fc8e4 100644 (file)
@@ -150,9 +150,9 @@ foreach t: gtk_tests
              dependencies: [libgtk_dep, libm])
 endforeach
 
-
-
-executable('testperf', 'testperf.c',
-            dependencies: [profiler_dep, platform_gio_dep, libm])
+if get_option('profiler')
+  executable('testperf', 'testperf.c',
+              dependencies: [profiler_dep, platform_gio_dep, libm])
+endif
 
 subdir('visuals')
index 5a6a40ded2c860863bb58d6581e3cdab880f6d28..afceb45d26d0b56fd11d84e1d1f3d5950aac4b54 100644 (file)
@@ -1,7 +1,9 @@
-test_css_performance = executable('test-css-performance', 'test-css-performance.c',
-                                  dependencies: [profiler_dep, platform_gio_dep, libm])
+if get_option ('profiler')
+  test_css_performance = executable('test-css-performance', 'test-css-performance.c',
+                                    dependencies: [profiler_dep, platform_gio_dep, libm])
 
-test('performance', test_css_performance,
-     args: [ join_paths(meson.current_build_dir(), '../../../demos/widget-factory/gtk4-widget-factory') ],
-     env: [ 'GTK_THEME=Adwaita' ],
-     suite: [ 'css' ])
+  test('performance', test_css_performance,
+       args: [ join_paths(meson.current_build_dir(), '../../../demos/widget-factory/gtk4-widget-factory') ],
+       env: [ 'GTK_THEME=Adwaita' ],
+       suite: [ 'css' ])
+endif