bunch more meson polish
cover bunch more meson polish
Hi all,
I wanted to push this out before I'm ooo for 2 weeks of conferencing.
With this we should be able to start CI'ing the meson build (ofc right now still in parallel with the automake stuff, and also using the results from the automake build for the hw testing CI does). The following should get meson going, and can be done in a build that's already been used to build using automake:
$ mkdir build $ meson
Note that everything gets autodetected, so no options really.
$ ninja -C build $ ninja -C build test
This series contains a patch to align the generated test lists between the two build systems. Comparing them would be a great validation of the match between meson/automake builds:
$ diff tests/test-list.txt build/tests/test-list.txt
Cheers, Daniel
Daniel Vetter (3):
meson: Simple makefile integration
meson: align test-list.txt generation with automake
meson: share the configuration_data object
man/meson.build | 8 +------- meson.build | 32 +++++++++++++++++--------------- meson.sh | 35 +++++++++++++++++++++++++++++++++++ tests/Makefile.am | 1 + tests/Makefile.sources | 2 -- tests/generate_testlist.sh | 9 +++++++-- tests/meson.build | 20 ++++++++++++++------ 7 files changed, 75 insertions(+), 32 deletions(-) create mode 100755 meson.sh
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/3 meson: Simple makefile integration
Run ./meson.sh once, then you have
$ make
and
$ make test
available in the normal src root.
v2:
Add
$ make reconfigure
which is the meson equivalent to rerunning ./configure. Also takes some arguments if needed. Start out with --help, as usual.
v3: Use ninja -C (Chris).
v4: Catch more automake targets and point out what's happening (Petri).
--- meson.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 meson.sh
meson.sh new file +35 -0
@@ -0,0 +1,35 @@ +#!/bin/bash + +cat > Makefile <<Makefile + +.PHONY: default docs +default: all + +build/build.ninja: + mkdir build + meson + +all: build/build.ninja + ninja -C build + +clean: build/build.ninja + ninja -C build clean + +test: build/build.ninja + ninja -C build test + +reconfigure: build/build.ninja + ninja -C build reconfigure + +check distcheck dist distclean: + echo "This is the meson wrapper, not automake" && false + +install uninstall: + echo "meson install support not yet completed" && false + +docs: + echo "meson gtkdoc support not yet completed" && false + +Makefile + +make $@
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 1/3] meson: Simple makefile integration
Quoted 38 lines · Daniel Vetter
Run ./meson.sh once, then you have
$ makeand
$ make testavailable in the normal src root.
v2:
Add
$ make reconfigurewhich is the meson equivalent to rerunning ./configure. Also takes some arguments if needed. Start out with --help, as usual.
v3: Use ninja -C (Chris).
v4: Catch more automake targets and point out what's happening (Petri).
Cc Petri Latvala <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- meson.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 meson.shmeson.sh new file +0
-0
meson.sh line 3
Quoted 3 lines
meson.sh new file +3
-0@@ -0,0 +1,35 @@ +#!/bin/bash + +cat > Makefile <<Makefile
This heredoc limit string is strangely confusing.
It took me way too long to parse that and get that << is not "appending" (in this direction), and you do not want to append the original contents of Makefile to the new one. Good ol' EOF should do.
Nonetheless,
-- Arek
Quoted 39 lines
meson.sh new file +32
-0+ +.PHONY: default docs +default: all + +build/build.ninja: + mkdir build + meson + +all: build/build.ninja + ninja -C build + +clean: build/build.ninja + ninja -C build clean + +test: build/build.ninja + ninja -C build test + +reconfigure: build/build.ninja + ninja -C build reconfigure + +check distcheck dist distclean: + echo "This is the meson wrapper, not automake" && false + +install uninstall: + echo "meson install support not yet completed" && false + +docs: + echo "meson gtkdoc support not yet completed" && false + +Makefile + +make $@Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 1/3] meson: Simple makefile integration
Quoted 45 lines · Arkadiusz Hiler
Quoted 38 lines · Daniel Vetter
Run ./meson.sh once, then you have
$ makeand
$ make testavailable in the normal src root.
v2:
Add
$ make reconfigurewhich is the meson equivalent to rerunning ./configure. Also takes some arguments if needed. Start out with --help, as usual.
v3: Use ninja -C (Chris).
v4: Catch more automake targets and point out what's happening (Petri).
Cc Petri Latvala <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- meson.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 meson.shmeson.sh new file +0
-0meson.sh line 3
Quoted 3 lines
meson.sh new file +3
-0@@ -0,0 +1,35 @@ +#!/bin/bash + +cat > Makefile <<MakefileThis heredoc limit string is strangely confusing.
Quoted 3 lines
It took me way too long to parse that and get that << is not "appending" (in this direction), and you do not want to append the original contents of
Makefileto the new one. Good ol' EOF should do.
Makes sense. Fixed up and pushed, thanks for the review. -Daniel
Quoted 46 lines
Nonetheless,
Reviewed-by Arkadiusz Hiler <[email protected]>-- Arek
Quoted 39 lines
meson.sh new file +32
-0+ +.PHONY: default docs +default: all + +build/build.ninja: + mkdir build + meson + +all: build/build.ninja + ninja -C build + +clean: build/build.ninja + ninja -C build clean + +test: build/build.ninja + ninja -C build test + +reconfigure: build/build.ninja + ninja -C build reconfigure + +check distcheck dist distclean: + echo "This is the meson wrapper, not automake" && false + +install uninstall: + echo "meson install support not yet completed" && false + +docs: + echo "meson gtkdoc support not yet completed" && false + +Makefile + +make $@Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 meson: align test-list.txt generation with automake
In reply to Daniel Vetter- I forgot the chamelium tests
- Order tests the same way in both build systems. Since testdisplay is special, it's easier to put that at the end in meson, so adjusted automake to suit.
With this you can diff the 2 test lists and end up with 0 differences, which will be useful to CI meson vs. automake.
--- tests/Makefile.am | 1 + tests/Makefile.sources | 2 -- tests/generate_testlist.sh | 9 +++++++-- tests/meson.build | 20 ++++++++++++++------ 4 files changed, 22 insertions(+), 10 deletions(-)
tests/Makefile.am +1 -0
@@ -26,6 +26,7 @@ TESTS_progs += \ $(NULL) endif +TESTS_progs += testdisplay if BUILD_TESTS test-list.txt: Makefile.sources
tests/Makefile.sources +0 -2
@@ -281,8 +281,6 @@ testdisplay_SOURCES = \ testdisplay_hotplug.c \ $(NULL) -TESTS_progs += testdisplay - check_SCRIPTS = igt_command_line.sh \ $(NULL)
tests/generate_testlist.sh +7 -2
@@ -2,9 +2,14 @@ echo TESTLIST > $MESON_BUILD_ROOT/tests/test-list.txt +if [[ $# -gt 0 ]] ; then + echo -n $1 >> $MESON_BUILD_ROOT/tests/test-list.txt + shift +fi + while [[ $# -gt 0 ]] ; do - echo $1 >> $MESON_BUILD_ROOT/tests/test-list.txt + echo -n " $1" >> $MESON_BUILD_ROOT/tests/test-list.txt shift done -echo END TESTLIST >> $MESON_BUILD_ROOT/tests/test-list.txt +echo -e "\nEND TESTLIST" >> $MESON_BUILD_ROOT/tests/test-list.txt
tests/meson.build +14 -6
@@ -218,6 +218,17 @@ test_progs = [ ] test_deps = [ igt_deps ] + +if libdrm_amdgpu.found() + # FIXME meson/ninja really doesn't like build targets with paths in them + test_progs += [ + 'amdgpu/amd_basic', + 'amdgpu/amd_cs_nop', + 'amdgpu/amd_prime', + ] + test_deps += libdrm_amdgpu +endif + if libdrm_nouveau.found() test_progs += [ 'prime_nv_api',
@@ -238,14 +249,11 @@ if libdrm_vc4.found() test_deps += libdrm_vc4 endif -if libdrm_amdgpu.found() - # FIXME meson/ninja really doesn't like build targets with paths in them +if chamelium.found() test_progs += [ - 'amdgpu/amd_basic', - 'amdgpu/amd_cs_nop', - 'amdgpu/amd_prime', + 'chamelium', ] - test_deps += libdrm_amdgpu + test_deps += chamelium endif if alsa.found() and gsl.found()
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 2/3] meson: align test-list.txt generation with automake
Quoted 9 lines · Daniel Vetter
- I forgot the chamelium tests
- Order tests the same way in both build systems. Since testdisplay is special, it's easier to put that at the end in meson, so adjusted automake to suit.With this you can diff the 2 test lists and end up with 0 differences, which will be useful to CI meson vs. automake.
Signed-off-by Daniel Vetter <[email protected]>
I needed an actually working test-list.txt (run-tests.sh didn't like what were producing previously) so I've gone pushed this. I also pushed patch 3/3 since it looked all right to me. There were a few rebase conflicts but nothing major.
Quoted 100 lines
--- tests/Makefile.am | 1 + tests/Makefile.sources | 2 -- tests/generate_testlist.sh | 9 +++++++-- tests/meson.build | 20 ++++++++++++++------ 4 files changed, 22 insertions(+), 10 deletions(-)tests/Makefile.am +1
-0@@ -26,6 +26,7 @@ TESTS_progs += \ $(NULL) endif +TESTS_progs += testdisplay if BUILD_TESTS test-list.txt: Makefile.sourcestests/Makefile.sources +0
-2@@ -281,8 +281,6 @@ testdisplay_SOURCES = \ testdisplay_hotplug.c \ $(NULL) -TESTS_progs += testdisplay - check_SCRIPTS = igt_command_line.sh \ $(NULL)tests/generate_testlist.sh +7
-2@@ -2,9 +2,14 @@ echo TESTLIST > $MESON_BUILD_ROOT/tests/test-list.txt +if [[ $# -gt 0 ]] ; then + echo -n $1 >> $MESON_BUILD_ROOT/tests/test-list.txt + shift +fi + while [[ $# -gt 0 ]] ; do - echo $1 >> $MESON_BUILD_ROOT/tests/test-list.txt + echo -n " $1" >> $MESON_BUILD_ROOT/tests/test-list.txt shift done -echo END TESTLIST >> $MESON_BUILD_ROOT/tests/test-list.txt +echo -e "\nEND TESTLIST" >> $MESON_BUILD_ROOT/tests/test-list.txttests/meson.build +14
-6@@ -218,6 +218,17 @@ test_progs = [ ] test_deps = [ igt_deps ] + +if libdrm_amdgpu.found() + # FIXME meson/ninja really doesn't like build targets with paths in them + test_progs += [ + 'amdgpu/amd_basic', + 'amdgpu/amd_cs_nop', + 'amdgpu/amd_prime', + ] + test_deps += libdrm_amdgpu +endif + if libdrm_nouveau.found() test_progs += [ 'prime_nv_api',@@ -238,14 +249,11 @@ if libdrm_vc4.found() test_deps += libdrm_vc4 endif -if libdrm_amdgpu.found() - # FIXME meson/ninja really doesn't like build targets with paths in them +if chamelium.found() test_progs += [ - 'amdgpu/amd_basic', - 'amdgpu/amd_cs_nop', - 'amdgpu/amd_prime', + 'chamelium', ] - test_deps += libdrm_amdgpu + test_deps += chamelium endif if alsa.found() and gsl.found()Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 meson: share the configuration_data object
In reply to Daniel VetterSuggested by Jani. And rename from config_h to plain config, to make it's multi-use character a bit more obvious.
--- man/meson.build | 8 +------- meson.build | 32 +++++++++++++++++--------------- 2 files changed, 18 insertions(+), 22 deletions(-)
man/meson.build +1 -7
@@ -18,15 +18,9 @@ manpages = [ 'intel_vbt_decode', ] -man_config = configuration_data() - -man_config.set('PACKAGE_NAME', meson.project_name()) -man_config.set('PACKAGE_VERSION', meson.project_version()) -man_config.set('PACKAGE_STRING', meson.project_name() + ' ' + meson.project_version()) - defs_rst = configure_file(input : 'defs.rst.in', output : 'defs.rst', - configuration : man_config) + configuration : config) rst2man = find_program('rst2man', required : false) rst2man_script = find_program('rst2man.sh')
meson.build +17 -15
@@ -30,7 +30,7 @@ inc = include_directories('lib', '.') inc_for_gtkdoc = include_directories('lib') -config_h = configuration_data() +config = configuration_data() libdrm = dependency('libdrm', version : '>=2.4.82') libdrm_intel = dependency('libdrm_intel', required : false)
@@ -42,24 +42,24 @@ pciaccess = dependency('pciaccess', version : '>=0.10') libkmod = dependency('libkmod') libprocps = dependency('libprocps', required : false) if libprocps.found() - config_h.set('HAVE_PROCPS', 1) + config.set('HAVE_PROCPS', 1) endif valgrind = dependency('valgrind', required : false) if valgrind.found() - config_h.set('HAVE_VALGRIND', 1) + config.set('HAVE_VALGRIND', 1) endif cairo = dependency('cairo', version : '>1.12.0', required : false) libudev = dependency('libudev', required : false) if libudev.found() - config_h.set('HAVE_UDEV', 1) + config.set('HAVE_UDEV', 1) endif glib = dependency('glib-2.0', required : false) if glib.found() - config_h.set('HAVE_GLIB', 1) + config.set('HAVE_GLIB', 1) endif libunwind = dependency('libunwind')
@@ -85,35 +85,37 @@ dlsym = cc.find_library('dl') zlib = cc.find_library('z') if cc.has_header('linux/kd.h') - config_h.set('HAVE_LINUX_KD_H', 1) + config.set('HAVE_LINUX_KD_H', 1) endif if cc.has_header('sys/kd.h') - config_h.set('HAVE_SYS_KD_H', 1) + config.set('HAVE_SYS_KD_H', 1) endif if cc.has_header('libgen.h') - config_h.set('HAVE_LIBGEN_H', 1) + config.set('HAVE_LIBGEN_H', 1) endif if cc.has_header('sys/io.h') - config_h.set('HAVE_SYS_IO_H', 1) + config.set('HAVE_SYS_IO_H', 1) endif if cc.has_header('cpuid.h') # FIXME: Do we need the example link test from configure.ac? - config_h.set('HAVE_CPUID_H', 1) + config.set('HAVE_CPUID_H', 1) endif if cc.has_member('struct sysinfo', 'totalram', prefix : '#include <sys/sysinfo.h>') - config_h.set('HAVE_STRUCT_SYSINFO_TOTALRAM', 1) + config.set('HAVE_STRUCT_SYSINFO_TOTALRAM', 1) endif add_project_arguments('-D_GNU_SOURCE', language : 'c') add_project_arguments('-include', 'config.h', language : 'c') -config_h.set_quoted('PACKAGE_VERSION', meson.project_version()) -config_h.set_quoted('PACKAGE', meson.project_name()) -config_h.set_quoted('TARGET_CPU_PLATFORM', host_machine.cpu_family()) +config.set('PACKAGE_NAME', meson.project_name()) +config.set_quoted('PACKAGE_VERSION', meson.project_version()) +config.set_quoted('PACKAGE', meson.project_name()) +config.set('PACKAGE_STRING', meson.project_name() + ' ' + meson.project_version()) +config.set_quoted('TARGET_CPU_PLATFORM', host_machine.cpu_family()) -configure_file(output: 'config.h', install: false, configuration: config_h) +configure_file(output: 'config.h', install: false, configuration: config) subdir('lib') subdir('tests')
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for bunch more meson polish
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: bunch more meson polish
URL : https://patchwork.freedesktop.org/series/30041/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 866970a57a9def534f4b4671b59670fb70f54141 meson: Bump required version to 0.40
with latest DRM-Tip kernel build CI_DRM_306116fef66706a3 drm-tip: 2017y-09m-08d-08h-41m-49s UTC integration manifest
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
pass -> FAIL (fi-snb-2600) fdo#100215
Test kms_flip:
Subgroup basic-flip-vs-modeset:
pass -> SKIP (fi-skl-x1585l) fdo#101781fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:446s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:455s fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:385s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:539s fi-bwr-2160 total:289 pass:184 dwarn:0 dfail:0 fail:0 skip:105 time:269s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:518s fi-byt-j1900 total:289 pass:254 dwarn:1 dfail:0 fail:0 skip:34 time:509s fi-byt-n2820 total:289 pass:250 dwarn:1 dfail:0 fail:0 skip:38 time:500s fi-cfl-s total:289 pass:250 dwarn:4 dfail:0 fail:0 skip:35 time:468s fi-elk-e7500 total:289 pass:230 dwarn:0 dfail:0 fail:0 skip:59 time:459s fi-glk-2a total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:601s fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:431s fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:410s fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:437s fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:491s fi-ivb-3770 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:465s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:490s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:580s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:587s fi-pnv-d510 total:289 pass:224 dwarn:0 dfail:0 fail:0 skip:65 time:550s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:456s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:523s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:509s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:454s fi-skl-x1585l total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:484s fi-snb-2520m total:289 pass:251 dwarn:0 dfail:0 fail:0 skip:38 time:573s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:1 skip:39 time:432s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_168/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for bunch more meson polish
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: bunch more meson polish
URL : https://patchwork.freedesktop.org/series/30041/
State : failure
== Summary ==
Test kms_cursor_legacy:
Subgroup cursor-vs-flip-atomic-transitions:
pass -> FAIL (shard-hsw)
Test kms_flip:
Subgroup wf_vblank-ts-check-interruptible:
fail -> PASS (shard-hsw) fdo#100368
Test kms_setmode:
Subgroup basic:
pass -> FAIL (shard-hsw) fdo#99912
Test kms_busy:
Subgroup extended-modeset-hang-oldfb-with-reset-render-C:
pass -> DMESG-WARN (shard-hsw)
Test kms_atomic_transition:
Subgroup plane-all-modeset-transition:
pass -> DMESG-WARN (shard-hsw)fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
shard-hsw total:2302 pass:1235 dwarn:2 dfail:0 fail:13 skip:1052 time:9490s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_168/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx