From 9a7d8509efe4ac509b082cbffa24e52a7697926c Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 5 Sep 2017 14:36:14 +0200 Subject: meson: basic build system support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why? Because it's fast. Like really, really fast. Some data (from a snb laptop, so rather lower-powered): - Incremental build after $ touch lib/igt_core.c with meson: 0.6s It notices that the symbol list of the libigt.so hasn't changed and doesn't bother re-linking the almost 300 binaries we have. make -j 6 for the same scenario takes 44s. - Incremental build with nothing changed: make: 0.7s, meson: 0.2s This means stuff like --disable-git-hash is entirely pointless with meson, it's faster than a make ever can be (with 0.6s). - Reconfigure stage: ninja reconfigure 0.8s vs. ./configure 8.6s) - Running tests, after a full build: ninja test 6s vs. make check 24s - Full build (i.e. including ./autogen.sh respectively meson build), including tests, from a pristine git checkout. automake 2m49s vs. meson 44s. Cc: Ville Syrjälä Cc: Eric Anholt Cc: Daniel Stone Acked-by: Jani Nikula Acked-by: Arkadiusz Hiler Acked-by: Petri Latvala Acked-by: Daniel Stone Acked-by: Radoslaw Szwichtenberg Signed-off-by: Daniel Vetter --- lib/tests/meson.build | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lib/tests/meson.build (limited to 'lib/tests') diff --git a/lib/tests/meson.build b/lib/tests/meson.build new file mode 100644 index 00000000..29bdb2c4 --- /dev/null +++ b/lib/tests/meson.build @@ -0,0 +1,34 @@ +lib_tests = [ + 'igt_fork_helper', + 'igt_list_only', + 'igt_simulation', + 'igt_stats', + 'igt_segfault', + 'igt_subtest_group', + 'igt_assert', + 'igt_exit_handler', + 'igt_hdmi_inject', + 'igt_can_fail', + 'igt_can_fail_simple', +] + +lib_fail_tests = [ + 'igt_no_exit', + 'igt_no_exit_list_only', + 'igt_no_subtest', + 'igt_simple_test_subtests', + 'igt_timeout', + 'igt_invalid_subtest_name', +] + +foreach lib_test : lib_tests + exec = executable(lib_test, lib_test + '.c', install : true, + dependencies : igt_deps) + test('lib: ' + lib_test, exec) +endforeach + +foreach lib_test : lib_fail_tests + exec = executable(lib_test, lib_test + '.c', install : true, + dependencies : igt_deps) + test('lib: ' + lib_test, exec, should_fail : true) +endforeach -- cgit v1.2.3