test: split the test-specific #defines out
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 6 Mar 2019 03:43:00 +0000 (13:43 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 14 Mar 2019 01:28:04 +0000 (11:28 +1000)
These don't need to be in the libinput config.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
meson.build
test/litest.h

index b4cb3331f32b963f0a95736879ea64fc516beabd..57c4cebc8af4e9dd70d3523ee461a073a206d169 100644 (file)
@@ -778,11 +778,12 @@ if get_option('tests')
                       install : false,
                       configuration : udev_rules_config)
 
-       config_h.set_quoted('LIBINPUT_TEST_DEVICE_RULES_FILE',
+       litest_config_h = configuration_data()
+       litest_config_h.set_quoted('LIBINPUT_TEST_DEVICE_RULES_FILE',
                            join_paths(meson.build_root(), '80-libinput-test-device.rules'))
-       config_h.set_quoted('LIBINPUT_DEVICE_GROUPS_RULES_FILE',
+       litest_config_h.set_quoted('LIBINPUT_DEVICE_GROUPS_RULES_FILE',
                            join_paths(meson.build_root(), '80-libinput-device-groups.rules'))
-       config_h.set_quoted('LIBINPUT_MODEL_QUIRKS_UDEV_RULES_FILE',
+       litest_config_h.set_quoted('LIBINPUT_MODEL_QUIRKS_UDEV_RULES_FILE',
                            join_paths(meson.build_root(), '90-libinput-model-quirks.rules'))
 
        def_no_main = '-DLITEST_NO_MAIN'
@@ -853,6 +854,9 @@ if get_option('tests')
                                        '--suppressions=' + valgrind_suppressions_file ],
                        env :  valgrind_env,
                        timeout_multiplier : 100)
+       configure_file(output : 'litest-config.h',
+                      install : false,
+                      configuration : litest_config_h)
 endif
 ############ output files ############
 configure_file(output : 'config.h', install : false, configuration : config_h)
index 50171a82b9989cc2c2d0f31d01682e465cf26921..8002b63e9fc8679bd3324d1989968584783ce058 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "config.h"
+#include "litest-config.h"
 
 #ifndef LITEST_H
 #define LITEST_H