* [PATCH i-g-t 1/3] lib: avoid < in gtkdoc comments @ 2017-12-05 10:16 Daniel Vetter 2017-12-05 10:16 ` [PATCH i-g-t 2/3] meson: gtkdoc support Daniel Vetter ` (3 more replies) 0 siblings, 4 replies; 11+ messages in thread From: Daniel Vetter @ 2017-12-05 10:16 UTC (permalink / raw) To: Intel Graphics Development; +Cc: Daniel Vetter For reasons entirely not clear to me meson gtkdoc runs in strict xml parsing mode, whereas automake gtkdoc doesn't. And gtkdoc itself is tooooooooo dense to correctly escape this stuff. Paper around this. v2: {foo} instead of of tripy <foo> (Joonas) v3: More fixups (Joonas) Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> --- lib/igt_aux.c | 4 ++-- lib/igt_core.c | 4 ++-- lib/igt_debugfs.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/igt_aux.c b/lib/igt_aux.c index e2424109ef20..8ca0b60d0925 100644 --- a/lib/igt_aux.c +++ b/lib/igt_aux.c @@ -998,7 +998,7 @@ void igt_drop_root(void) * @var: var lookup to to enable this wait * * Waits for a key press when run interactively and when the corresponding debug - * var is set in the --interactive-debug=<var> variable. Multiple keys + * var is set in the --interactive-debug=$var variable. Multiple keys * can be specified as a comma-separated list or alternatively "all" if a wait * should happen for all cases. * @@ -1039,7 +1039,7 @@ void igt_debug_wait_for_keypress(const char *var) * @expected: message to be printed as expected behaviour before wait for keys Y/n * * Waits for a key press when run interactively and when the corresponding debug - * var is set in the --interactive-debug=<var> variable. Multiple vars + * var is set in the --interactive-debug=$var variable. Multiple vars * can be specified as a comma-separated list or alternatively "all" if a wait * should happen for all cases. * diff --git a/lib/igt_core.c b/lib/igt_core.c index 03fa6e4e836b..777687b5f795 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -167,10 +167,10 @@ * test logic. * * - When adding a new feature test function which uses igt_skip() internally, - * use the <prefix>_require_<feature_name> naming scheme. When you + * use the {prefix}_require_{feature_name} naming scheme. When you * instead add a feature test function which returns a boolean, because your * main test logic must take different actions depending upon the feature's - * availability, then instead use the <prefix>_has_<feature_name>. + * availability, then instead use the {prefix}_has_{feature_name}. * * - As already mentioned eschew explicit error handling logic as much as * possible. If your test absolutely has to handle the error of some function diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 9af8a5933480..49b68dfed0aa 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -231,7 +231,7 @@ int igt_debugfs_dir(int device) * @mode: mode bits as used by open() * * This opens a debugfs file as a Unix file descriptor. The filename should be - * relative to the drm device's root, i.e. without "drm/<minor>". + * relative to the drm device's root, i.e. without "drm/$minor". * * Returns: * The Unix file descriptor for the debugfs file or -1 if that didn't work out. -- 2.15.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH i-g-t 2/3] meson: gtkdoc support 2017-12-05 10:16 [PATCH i-g-t 1/3] lib: avoid < in gtkdoc comments Daniel Vetter @ 2017-12-05 10:16 ` Daniel Vetter 2018-02-22 23:54 ` Eric Anholt 2017-12-05 10:16 ` [PATCH i-g-t 3/3] meson: build a full dependency for lib_igt_perf Daniel Vetter ` (2 subsequent siblings) 3 siblings, 1 reply; 11+ messages in thread From: Daniel Vetter @ 2017-12-05 10:16 UTC (permalink / raw) To: Intel Graphics Development; +Cc: Daniel Vetter Bunch of neat improvements: - xml generates correctly depend upon the test binaries - no need to re-run autogen.sh when new chapters/functions get added, all handed by meson Still one issue: - the gtkdoc target doesn't depend upon the custom_target yet, hacked around using build_by_default: true This is an issue known to upstream already: https://github.com/mesonbuild/meson/issues/2148 v2: Bump meson version to 0.42, since that's the first release which adds the build dir when running the gtkdoc tools, and hence allows including generated files. v2: - Undo the bump, it's only needed for generated source files. Other generated files as input should work with 0.40 already. - Generate version.xml from version.xml.in, which allows us to keep the &version; entity. v3: Add github issue link. v4: - Resurrect lost KEYWORDS (Petri) - Fix issue when running with a clean build, files() doesn't work on generate files (Petri). Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> --- docs/meson.build | 1 + .../intel-gpu-tools/generate_description_xml.sh | 46 +++++++++++++ .../intel-gpu-tools/generate_programs_xml.sh | 22 ++++++ docs/reference/intel-gpu-tools/meson.build | 80 ++++++++++++++++++++++ docs/reference/meson.build | 1 + meson.build | 3 + meson.sh | 2 +- tests/meson.build | 6 +- 8 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 docs/meson.build create mode 100644 docs/reference/intel-gpu-tools/generate_description_xml.sh create mode 100755 docs/reference/intel-gpu-tools/generate_programs_xml.sh create mode 100644 docs/reference/intel-gpu-tools/meson.build create mode 100644 docs/reference/meson.build diff --git a/docs/meson.build b/docs/meson.build new file mode 100644 index 000000000000..ead14c4015d9 --- /dev/null +++ b/docs/meson.build @@ -0,0 +1 @@ +subdir('reference') diff --git a/docs/reference/intel-gpu-tools/generate_description_xml.sh b/docs/reference/intel-gpu-tools/generate_description_xml.sh new file mode 100644 index 000000000000..705a7bf3f180 --- /dev/null +++ b/docs/reference/intel-gpu-tools/generate_description_xml.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +output=$1 +filter=$2 +testlist=$3 +testdir=$(dirname $testlist) + +KEYWORDS="(invalid|hang|swap|thrash|crc|tiled|tiling|rte|ctx|render|blt|bsd|vebox|exec|rpm)" + +echo "<?xml version=\"1.0\"?>" > $output +echo "<!DOCTYPE refsect1 PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"" >> $output +echo " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"" >> $output +echo "[" >> $output +echo " <!ENTITY % local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">" >> $output +echo " <!ENTITY version SYSTEM \"version.xml\">" >> $output +echo "]>" >> $output +echo "<refsect1>" >> $output +echo "<title>Description</title>" >> $output +for test in `cat $testlist | tr ' ' '\n' | grep "^$filter" | sort`; do + echo "<refsect2 id=\"$test\"><title>" >> $output; + echo "$test" | perl -pe "s/(?<=_)$KEYWORDS(?=(_|\\W))/<acronym>\\1<\\/acronym>/g" >> $output; + echo "</title><para><![CDATA[" >> $output; + testprog=$testdir/$test; + ./$testprog --help-description >> $output; + echo "]]></para>" >> $output; + if ./$testprog --list-subtests > /dev/null ; then + echo "<refsect3><title>Subtests</title>" >> $output; + subtest_list=`./$testprog --list-subtests`; + subtest_count=`echo $subtest_list | wc -w`; + if [ $subtest_count -gt 100 ]; then + echo "<para>This test has over 100 subtests. " >> $output; + echo "Run <command>$test</command> <option>--list-subtests</option> to list them.</para>" >> $output; + else + echo "<simplelist>" >> $output; + for subtest in $subtest_list; do + echo "<member>" >> $output; + echo "$subtest" | perl -pe "s/\\b$KEYWORDS\\b/<acronym>\\1<\\/acronym>/g" >> $output; + echo "</member>" >> $output; + done; + echo "</simplelist>" >> $output; + fi; + echo "</refsect3>" >> $output; + fi; + echo "</refsect2>" >> $output; +done; +echo "</refsect1>" >> $output diff --git a/docs/reference/intel-gpu-tools/generate_programs_xml.sh b/docs/reference/intel-gpu-tools/generate_programs_xml.sh new file mode 100755 index 000000000000..73adc8cc7bfc --- /dev/null +++ b/docs/reference/intel-gpu-tools/generate_programs_xml.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +output=$1 +filter=$2 +testlist=$3 + +echo "<?xml version=\"1.0\"?>" > $output +echo "<!DOCTYPE refsect1 PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"" >> $output +echo " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"" >> $output +echo "[" >> $output +echo " <!ENTITY % local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">" >> $output +echo " <!ENTITY version SYSTEM \"version.xml\">" >> $output +echo "]>" >> $output +echo "<refsect1>" >> $output +echo "<title>Programs</title>" >> $output +echo "<informaltable pgwide=\"1\" frame=\"none\"><tgroup cols=\"2\"><tbody>" >> $output +for test in `cat $testlist | tr ' ' '\n' | grep "^$filter" | sort`; do + echo "<row><entry role=\"program_name\">" >> $output; + echo "<link linkend=\"$test\">$test</link></entry></row>" >> $output; +done; +echo "</tbody></tgroup></informaltable>" >> $output +echo "</refsect1>" >> $output diff --git a/docs/reference/intel-gpu-tools/meson.build b/docs/reference/intel-gpu-tools/meson.build new file mode 100644 index 000000000000..1c009229aae2 --- /dev/null +++ b/docs/reference/intel-gpu-tools/meson.build @@ -0,0 +1,80 @@ +gnome = import('gnome') + +ignore_headers = [ + 'gen6_render.h', + 'gen7_media.h', + 'gen7_render.h', + 'gen8_media.h', + 'gen8_render.h', + 'gpgpu_fill.h', + 'i830_reg.h', + 'i915_3d.h', + 'i915_pciids.h', + 'i915_reg.h', + 'igt_edid_template.h', + 'intel_reg.h', + 'debug.h', + 'instdone.h', + 'media_fill.h', + 'rendercopy.h', + 'media_spin.h', + 'media_fill_gen9.h', + 'gen9_render.h', + 'version.h', +] + +test_groups = [ + 'amdgpu', + 'chamelium', + 'core', + 'debugfs', + 'drm', + 'drv', + 'gem', + 'gen3', + 'gen7', + 'gvt', + 'kms', + 'meta', + 'perf', + 'pm', + 'prime', + 'sw_sync', + 'testdisplay', + 'tools', + 'vgem', +] + +gen_description = find_program('generate_description_xml.sh') +gen_programs = find_program('generate_programs_xml.sh') + +test_list_files = [] + +foreach group : test_groups + programs_xml = 'igt_test_programs_' + group + '_programs.xml' + custom_target(programs_xml, + output : programs_xml, + build_by_default : true, + command : [ gen_programs, '@OUTPUT@', group, test_list ]) + + description_xml = 'igt_test_programs_' + group + '_description.xml' + custom_target(description_xml, + output : description_xml, + build_by_default : true, + depends : test_executables, + command : [ gen_description, '@OUTPUT@', group, test_list ]) +endforeach + +configure_file(input: 'version.xml.in', + output: 'version.xml', + install: false, configuration: config) + +gnome.gtkdoc('intel-gpu-tools', + content_files : ['igt_test_programs.xml'], + dependencies : lib_igt, + install : true, + main_xml : 'intel-gpu-tools-docs.xml', + scan_args : '--rebuild-sections', + mkdb_args : '--output-format=xml', + ignore_headers : ignore_headers, + src_dir : inc_for_gtkdoc) diff --git a/docs/reference/meson.build b/docs/reference/meson.build new file mode 100644 index 000000000000..944f28a5615e --- /dev/null +++ b/docs/reference/meson.build @@ -0,0 +1 @@ +subdir('intel-gpu-tools') diff --git a/meson.build b/meson.build index a564893dc7cb..0950d3c7bbd5 100644 --- a/meson.build +++ b/meson.build @@ -28,6 +28,8 @@ endforeach inc = include_directories('include/drm-uapi', 'lib', '.') +inc_for_gtkdoc = include_directories('lib') + config = configuration_data() libdrm = dependency('libdrm', version : '>=2.4.82') @@ -136,3 +138,4 @@ if libdrm_intel.found() endif endif subdir('man') +subdir('docs') diff --git a/meson.sh b/meson.sh index cbf1a9326dbe..ae8e3488d962 100755 --- a/meson.sh +++ b/meson.sh @@ -28,7 +28,7 @@ install uninstall: echo "meson install support not yet completed" && false docs: - echo "meson gtkdoc support not yet completed" && false + ninja -C build intel-gpu-tools-doc EOF diff --git a/tests/meson.build b/tests/meson.build index 443513b74eb8..94cb8bb48cc7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -257,12 +257,14 @@ endif libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-gpu-tools') +test_executables = [] + foreach prog : test_progs link = [] if prog == 'perf_pmu' link += lib_igt_perf endif - executable(prog, prog + '.c', + test_executables += executable(prog, prog + '.c', dependencies : test_deps, install_dir : libexecdir, link_with : link, @@ -278,7 +280,7 @@ test_progs += 'testdisplay' pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools') gen_testlist = find_program('generate_testlist.sh') -custom_target('testlist', +test_list = custom_target('testlist', output : 'test-list.txt', command : [ gen_testlist, '@OUTPUT@', test_progs ], install : true, -- 2.15.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH i-g-t 2/3] meson: gtkdoc support 2017-12-05 10:16 ` [PATCH i-g-t 2/3] meson: gtkdoc support Daniel Vetter @ 2018-02-22 23:54 ` Eric Anholt 2018-03-06 13:50 ` Daniel Vetter 0 siblings, 1 reply; 11+ messages in thread From: Eric Anholt @ 2018-02-22 23:54 UTC (permalink / raw) To: Intel Graphics Development; +Cc: Daniel Vetter [-- Attachment #1.1: Type: text/plain, Size: 493 bytes --] Daniel Vetter <daniel.vetter@ffwll.ch> writes: > Bunch of neat improvements: > > - xml generates correctly depend upon the test binaries > - no need to re-run autogen.sh when new chapters/functions get added, > all handed by meson I just rebased on top of this commit, and now my cross build takes 5 minutes as my skylake build host slowly churns through executing the ARM binaries under QEMU. Is there anything we could do to avoid executing the built binaries during the build process? [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] [-- Attachment #2: Type: text/plain, Size: 160 bytes --] _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH i-g-t 2/3] meson: gtkdoc support 2018-02-22 23:54 ` Eric Anholt @ 2018-03-06 13:50 ` Daniel Vetter 0 siblings, 0 replies; 11+ messages in thread From: Daniel Vetter @ 2018-03-06 13:50 UTC (permalink / raw) To: Eric Anholt; +Cc: Daniel Vetter, Intel Graphics Development On Thu, Feb 22, 2018 at 03:54:09PM -0800, Eric Anholt wrote: > Daniel Vetter <daniel.vetter@ffwll.ch> writes: > > > Bunch of neat improvements: > > > > - xml generates correctly depend upon the test binaries > > - no need to re-run autogen.sh when new chapters/functions get added, > > all handed by meson > > I just rebased on top of this commit, and now my cross build takes 5 > minutes as my skylake build host slowly churns through executing the ARM > binaries under QEMU. > > Is there anything we could do to avoid executing the built binaries > during the build process? meson 0.45 will have the dependency tracking fixed for gtkdoc and will allow us to drop the always_build hack. I'll see whether we can do a version check or something like that to work around this all. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH i-g-t 3/3] meson: build a full dependency for lib_igt_perf 2017-12-05 10:16 [PATCH i-g-t 1/3] lib: avoid < in gtkdoc comments Daniel Vetter 2017-12-05 10:16 ` [PATCH i-g-t 2/3] meson: gtkdoc support Daniel Vetter @ 2017-12-05 10:16 ` Daniel Vetter 2017-12-05 10:44 ` Petri Latvala 2017-12-05 11:17 ` ✓ Fi.CI.BAT: success for series starting with [1/3] lib: avoid < in gtkdoc comments Patchwork 2017-12-05 12:17 ` ✗ Fi.CI.IGT: failure " Patchwork 3 siblings, 1 reply; 11+ messages in thread From: Daniel Vetter @ 2017-12-05 10:16 UTC (permalink / raw) To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter meson prefers packages dependencies over passing arount static libraries, because those also include linker flags, include dirs and everything else. While at it pull the special cases out from the common build stanzas like we do with other special cases. Just a bit of ocd to keep everything polished. Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> --- benchmarks/meson.build | 9 +++------ lib/meson.build | 5 ++++- overlay/meson.build | 4 ++-- tests/meson.build | 11 +++++------ 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/benchmarks/meson.build b/benchmarks/meson.build index fa7f07643a97..4afd204f82b2 100644 --- a/benchmarks/meson.build +++ b/benchmarks/meson.build @@ -12,7 +12,6 @@ benchmark_progs = [ 'gem_prw', 'gem_set_domain', 'gem_syslatency', - 'gem_wsim', 'kms_vblank', 'prime_lookup', 'vgem_mmap', @@ -31,11 +30,9 @@ endif foreach prog : benchmark_progs # FIXME meson doesn't like binaries with the same name # meanwhile just suffix with _bench - link = [] - if prog == 'gem_wsim' - link += lib_igt_perf - endif executable(prog + '_bench', prog + '.c', - link_with : link, dependencies : test_deps) endforeach + +executable('gem_wsim_bench', 'gem_wsim.c', + dependencies : test_deps + [ lib_igt_perf ]) diff --git a/lib/meson.build b/lib/meson.build index 29d89cf09b58..d06d85b438b2 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -180,8 +180,11 @@ lib_igt = declare_dependency(link_with : lib_igt_build, igt_deps = [ lib_igt ] + lib_deps -lib_igt_perf = static_library('igt_perf', +lib_igt_perf_build = static_library('igt_perf', ['igt_perf.c'] ) +lib_igt_perf = declare_dependency(link_with : lib_igt_perf_build, + include_directories : inc) + subdir('tests') diff --git a/overlay/meson.build b/overlay/meson.build index 6b479eb89890..afacff5ecf60 100644 --- a/overlay/meson.build +++ b/overlay/meson.build @@ -21,7 +21,8 @@ dri2proto = dependency('dri2proto', version : '>= 2.6', required : false) cairo_xlib = dependency('cairo-xlib', required : false) xrandr = dependency('xrandr', version : '>=1.3', required : false) -gpu_overlay_deps = [ realtime, math, cairo, pciaccess, libdrm, libdrm_intel ] +gpu_overlay_deps = [ realtime, math, cairo, pciaccess, libdrm, + libdrm_intel, lib_igt_perf ] both_x11_src = '' @@ -55,6 +56,5 @@ if xrandr.found() and cairo.found() include_directories : inc, c_args : gpu_overlay_cflags, dependencies : gpu_overlay_deps, - link_with : lib_igt_perf, install : true) endif diff --git a/tests/meson.build b/tests/meson.build index 94cb8bb48cc7..af73af1219df 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -190,7 +190,6 @@ test_progs = [ 'kms_vblank', 'meta_test', 'perf', - 'perf_pmu', 'pm_backlight', 'pm_lpsp', 'pm_rc6_residency', @@ -260,17 +259,17 @@ libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-g test_executables = [] foreach prog : test_progs - link = [] - if prog == 'perf_pmu' - link += lib_igt_perf - endif test_executables += executable(prog, prog + '.c', dependencies : test_deps, install_dir : libexecdir, - link_with : link, install : true) endforeach +test_executables += executable('perf_pmu', 'perf_pmu.c', + dependencies : test_deps + [ lib_igt_perf ], + install_dir : libexecdir, + install : true) + executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'], dependencies : test_deps, install_dir : libexecdir, -- 2.15.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH i-g-t 3/3] meson: build a full dependency for lib_igt_perf 2017-12-05 10:16 ` [PATCH i-g-t 3/3] meson: build a full dependency for lib_igt_perf Daniel Vetter @ 2017-12-05 10:44 ` Petri Latvala 2017-12-05 11:05 ` Petri Latvala 0 siblings, 1 reply; 11+ messages in thread From: Petri Latvala @ 2017-12-05 10:44 UTC (permalink / raw) To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development On Tue, Dec 05, 2017 at 11:16:50AM +0100, Daniel Vetter wrote: > meson prefers packages dependencies over passing arount static > libraries, because those also include linker flags, include dirs and > everything else. > > While at it pull the special cases out from the common build stanzas > like we do with other special cases. > > Just a bit of ocd to keep everything polished. > > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > --- > benchmarks/meson.build | 9 +++------ > lib/meson.build | 5 ++++- > overlay/meson.build | 4 ++-- > tests/meson.build | 11 +++++------ > 4 files changed, 14 insertions(+), 15 deletions(-) > > diff --git a/benchmarks/meson.build b/benchmarks/meson.build > index fa7f07643a97..4afd204f82b2 100644 > --- a/benchmarks/meson.build > +++ b/benchmarks/meson.build > @@ -12,7 +12,6 @@ benchmark_progs = [ > 'gem_prw', > 'gem_set_domain', > 'gem_syslatency', > - 'gem_wsim', > 'kms_vblank', > 'prime_lookup', > 'vgem_mmap', > @@ -31,11 +30,9 @@ endif > foreach prog : benchmark_progs > # FIXME meson doesn't like binaries with the same name > # meanwhile just suffix with _bench > - link = [] > - if prog == 'gem_wsim' > - link += lib_igt_perf > - endif > executable(prog + '_bench', prog + '.c', > - link_with : link, > dependencies : test_deps) > endforeach > + > +executable('gem_wsim_bench', 'gem_wsim.c', > + dependencies : test_deps + [ lib_igt_perf ]) > diff --git a/lib/meson.build b/lib/meson.build > index 29d89cf09b58..d06d85b438b2 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -180,8 +180,11 @@ lib_igt = declare_dependency(link_with : lib_igt_build, > > igt_deps = [ lib_igt ] + lib_deps > > -lib_igt_perf = static_library('igt_perf', > +lib_igt_perf_build = static_library('igt_perf', > ['igt_perf.c'] > ) > > +lib_igt_perf = declare_dependency(link_with : lib_igt_perf_build, > + include_directories : inc) > + > subdir('tests') > diff --git a/overlay/meson.build b/overlay/meson.build > index 6b479eb89890..afacff5ecf60 100644 > --- a/overlay/meson.build > +++ b/overlay/meson.build > @@ -21,7 +21,8 @@ dri2proto = dependency('dri2proto', version : '>= 2.6', required : false) > cairo_xlib = dependency('cairo-xlib', required : false) > xrandr = dependency('xrandr', version : '>=1.3', required : false) > > -gpu_overlay_deps = [ realtime, math, cairo, pciaccess, libdrm, libdrm_intel ] > +gpu_overlay_deps = [ realtime, math, cairo, pciaccess, libdrm, > + libdrm_intel, lib_igt_perf ] > > both_x11_src = '' > > @@ -55,6 +56,5 @@ if xrandr.found() and cairo.found() > include_directories : inc, > c_args : gpu_overlay_cflags, > dependencies : gpu_overlay_deps, > - link_with : lib_igt_perf, > install : true) > endif > diff --git a/tests/meson.build b/tests/meson.build > index 94cb8bb48cc7..af73af1219df 100644 > --- a/tests/meson.build > +++ b/tests/meson.build > @@ -190,7 +190,6 @@ test_progs = [ > 'kms_vblank', > 'meta_test', > 'perf', > - 'perf_pmu', > 'pm_backlight', > 'pm_lpsp', > 'pm_rc6_residency', > @@ -260,17 +259,17 @@ libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-g > test_executables = [] > > foreach prog : test_progs > - link = [] > - if prog == 'perf_pmu' > - link += lib_igt_perf > - endif > test_executables += executable(prog, prog + '.c', > dependencies : test_deps, > install_dir : libexecdir, > - link_with : link, > install : true) > endforeach > > +test_executables += executable('perf_pmu', 'perf_pmu.c', > + dependencies : test_deps + [ lib_igt_perf ], > + install_dir : libexecdir, > + install : true) > + I'm fairly sure I had this commit in my earlier tests for this series, but apparently not. test_progs += 'perf_pmu' is needed here, or perf_pmu doesn't get its place in test-list.txt. -- Petri Latvala > executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'], > dependencies : test_deps, > install_dir : libexecdir, > -- > 2.15.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH i-g-t 3/3] meson: build a full dependency for lib_igt_perf 2017-12-05 10:44 ` Petri Latvala @ 2017-12-05 11:05 ` Petri Latvala 0 siblings, 0 replies; 11+ messages in thread From: Petri Latvala @ 2017-12-05 11:05 UTC (permalink / raw) To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development On Tue, Dec 05, 2017 at 12:44:02PM +0200, Petri Latvala wrote: > On Tue, Dec 05, 2017 at 11:16:50AM +0100, Daniel Vetter wrote: > > meson prefers packages dependencies over passing arount static > > libraries, because those also include linker flags, include dirs and > > everything else. > > > > While at it pull the special cases out from the common build stanzas > > like we do with other special cases. > > > > Just a bit of ocd to keep everything polished. > > > > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > > --- > > benchmarks/meson.build | 9 +++------ > > lib/meson.build | 5 ++++- > > overlay/meson.build | 4 ++-- > > tests/meson.build | 11 +++++------ > > 4 files changed, 14 insertions(+), 15 deletions(-) > > > > diff --git a/benchmarks/meson.build b/benchmarks/meson.build > > index fa7f07643a97..4afd204f82b2 100644 > > --- a/benchmarks/meson.build > > +++ b/benchmarks/meson.build > > @@ -12,7 +12,6 @@ benchmark_progs = [ > > 'gem_prw', > > 'gem_set_domain', > > 'gem_syslatency', > > - 'gem_wsim', > > 'kms_vblank', > > 'prime_lookup', > > 'vgem_mmap', > > @@ -31,11 +30,9 @@ endif > > foreach prog : benchmark_progs > > # FIXME meson doesn't like binaries with the same name > > # meanwhile just suffix with _bench > > - link = [] > > - if prog == 'gem_wsim' > > - link += lib_igt_perf > > - endif > > executable(prog + '_bench', prog + '.c', > > - link_with : link, > > dependencies : test_deps) > > endforeach > > + > > +executable('gem_wsim_bench', 'gem_wsim.c', > > + dependencies : test_deps + [ lib_igt_perf ]) > > diff --git a/lib/meson.build b/lib/meson.build > > index 29d89cf09b58..d06d85b438b2 100644 > > --- a/lib/meson.build > > +++ b/lib/meson.build > > @@ -180,8 +180,11 @@ lib_igt = declare_dependency(link_with : lib_igt_build, > > > > igt_deps = [ lib_igt ] + lib_deps > > > > -lib_igt_perf = static_library('igt_perf', > > +lib_igt_perf_build = static_library('igt_perf', > > ['igt_perf.c'] > > ) > > > > +lib_igt_perf = declare_dependency(link_with : lib_igt_perf_build, > > + include_directories : inc) > > + > > subdir('tests') > > diff --git a/overlay/meson.build b/overlay/meson.build > > index 6b479eb89890..afacff5ecf60 100644 > > --- a/overlay/meson.build > > +++ b/overlay/meson.build > > @@ -21,7 +21,8 @@ dri2proto = dependency('dri2proto', version : '>= 2.6', required : false) > > cairo_xlib = dependency('cairo-xlib', required : false) > > xrandr = dependency('xrandr', version : '>=1.3', required : false) > > > > -gpu_overlay_deps = [ realtime, math, cairo, pciaccess, libdrm, libdrm_intel ] > > +gpu_overlay_deps = [ realtime, math, cairo, pciaccess, libdrm, > > + libdrm_intel, lib_igt_perf ] > > > > both_x11_src = '' > > > > @@ -55,6 +56,5 @@ if xrandr.found() and cairo.found() > > include_directories : inc, > > c_args : gpu_overlay_cflags, > > dependencies : gpu_overlay_deps, > > - link_with : lib_igt_perf, > > install : true) > > endif > > diff --git a/tests/meson.build b/tests/meson.build > > index 94cb8bb48cc7..af73af1219df 100644 > > --- a/tests/meson.build > > +++ b/tests/meson.build > > @@ -190,7 +190,6 @@ test_progs = [ > > 'kms_vblank', > > 'meta_test', > > 'perf', > > - 'perf_pmu', > > 'pm_backlight', > > 'pm_lpsp', > > 'pm_rc6_residency', > > @@ -260,17 +259,17 @@ libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-g > > test_executables = [] > > > > foreach prog : test_progs > > - link = [] > > - if prog == 'perf_pmu' > > - link += lib_igt_perf > > - endif > > test_executables += executable(prog, prog + '.c', > > dependencies : test_deps, > > install_dir : libexecdir, > > - link_with : link, > > install : true) > > endforeach > > > > +test_executables += executable('perf_pmu', 'perf_pmu.c', > > + dependencies : test_deps + [ lib_igt_perf ], > > + install_dir : libexecdir, > > + install : true) > > + > > > I'm fairly sure I had this commit in my earlier tests for this series, > but apparently not. > > test_progs += 'perf_pmu' > > is needed here, or perf_pmu doesn't get its place in test-list.txt. > With this fixup squashed in, the series is Reviewed-by: Petri Latvala <petri.latvala@intel.com> The differences in the generated xml (autotools vs meson) were, let's say, cosmetic and minor. -- Petri Latvala _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/3] lib: avoid < in gtkdoc comments 2017-12-05 10:16 [PATCH i-g-t 1/3] lib: avoid < in gtkdoc comments Daniel Vetter 2017-12-05 10:16 ` [PATCH i-g-t 2/3] meson: gtkdoc support Daniel Vetter 2017-12-05 10:16 ` [PATCH i-g-t 3/3] meson: build a full dependency for lib_igt_perf Daniel Vetter @ 2017-12-05 11:17 ` Patchwork 2017-12-05 12:17 ` ✗ Fi.CI.IGT: failure " Patchwork 3 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2017-12-05 11:17 UTC (permalink / raw) To: Daniel Vetter; +Cc: intel-gfx == Series Details == Series: series starting with [1/3] lib: avoid < in gtkdoc comments URL : https://patchwork.freedesktop.org/series/34893/ State : success == Summary == IGT patchset tested on top of latest successful build ece35d37e6b0afc0ba99f66179279960042c87bc tests/gem_seqno_wrap: Drop gem_seqno_wrap.c with latest DRM-Tip kernel build CI_DRM_3456 84cd3d972bdd drm-tip: 2017y-12m-05d-08h-41m-59s UTC integration manifest No testlist changes. Test debugfs_test: Subgroup read_all_entries: dmesg-warn -> DMESG-FAIL (fi-elk-e7500) fdo#103989 Test kms_chamelium: Subgroup dp-crc-fast: dmesg-fail -> PASS (fi-kbl-7500u) fdo#103841 Test kms_pipe_crc_basic: Subgroup suspend-read-crc-pipe-b: pass -> INCOMPLETE (fi-snb-2520m) fdo#103713 fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989 fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841 fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713 fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:437s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:447s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:391s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:526s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:282s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:507s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:509s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:491s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:475s fi-elk-e7500 total:224 pass:163 dwarn:14 dfail:1 fail:0 skip:45 fi-gdg-551 total:288 pass:178 dwarn:1 dfail:0 fail:1 skip:108 time:274s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:539s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:377s fi-hsw-4770r total:288 pass:224 dwarn:0 dfail:0 fail:0 skip:64 time:258s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:399s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:480s fi-ivb-3770 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:451s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:484s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:533s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:475s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:533s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:590s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:452s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:545s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:567s fi-skl-6700k total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:524s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:501s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:446s fi-snb-2520m total:245 pass:211 dwarn:0 dfail:0 fail:0 skip:33 fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:416s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:613s fi-cnl-y total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:620s fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:492s == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_598/ _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* ✗ Fi.CI.IGT: failure for series starting with [1/3] lib: avoid < in gtkdoc comments 2017-12-05 10:16 [PATCH i-g-t 1/3] lib: avoid < in gtkdoc comments Daniel Vetter ` (2 preceding siblings ...) 2017-12-05 11:17 ` ✓ Fi.CI.BAT: success for series starting with [1/3] lib: avoid < in gtkdoc comments Patchwork @ 2017-12-05 12:17 ` Patchwork 3 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2017-12-05 12:17 UTC (permalink / raw) To: Daniel Vetter; +Cc: intel-gfx == Series Details == Series: series starting with [1/3] lib: avoid < in gtkdoc comments URL : https://patchwork.freedesktop.org/series/34893/ State : failure == Summary == Test kms_flip: Subgroup plain-flip-fb-recreate-interruptible: pass -> FAIL (shard-hsw) fdo#100368 Test gem_eio: Subgroup in-flight: pass -> DMESG-FAIL (shard-snb) Test drv_module_reload: Subgroup basic-reload: pass -> DMESG-WARN (shard-hsw) fdo#102707 Test kms_frontbuffer_tracking: Subgroup fbc-1p-offscren-pri-shrfb-draw-blt: fail -> PASS (shard-snb) fdo#101623 Test gem_tiled_swapping: Subgroup non-threaded: pass -> INCOMPLETE (shard-snb) fdo#104009 fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368 fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707 fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623 fdo#104009 https://bugs.freedesktop.org/show_bug.cgi?id=104009 shard-hsw total:2608 pass:1492 dwarn:2 dfail:0 fail:10 skip:1103 time:9165s shard-snb total:2608 pass:1271 dwarn:1 dfail:1 fail:10 skip:1324 time:7881s Blacklisted hosts: shard-apl total:2679 pass:1680 dwarn:1 dfail:0 fail:21 skip:977 time:13721s shard-kbl total:2604 pass:1747 dwarn:4 dfail:0 fail:20 skip:833 time:10552s == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_598/shards.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH i-g-t 1/3] lib: avoid < in gtkdoc comments @ 2017-12-04 20:48 Daniel Vetter 2017-12-04 20:48 ` [PATCH i-g-t 2/3] meson: gtkdoc support Daniel Vetter 0 siblings, 1 reply; 11+ messages in thread From: Daniel Vetter @ 2017-12-04 20:48 UTC (permalink / raw) To: Intel Graphics Development; +Cc: Daniel Vetter For reasons entirely not clear to me meson gtkdoc runs in strict xml parsing mode, whereas automake gtkdoc doesn't. And gtkdoc itself is tooooooooo dense to correctly escape this stuff. Paper around this. v2: {foo} instead of of tripy <foo> (Joonas) Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> --- lib/igt_aux.c | 4 ++-- lib/igt_core.c | 4 ++-- lib/igt_debugfs.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/igt_aux.c b/lib/igt_aux.c index e2424109ef20..8ca0b60d0925 100644 --- a/lib/igt_aux.c +++ b/lib/igt_aux.c @@ -998,7 +998,7 @@ void igt_drop_root(void) * @var: var lookup to to enable this wait * * Waits for a key press when run interactively and when the corresponding debug - * var is set in the --interactive-debug=<var> variable. Multiple keys + * var is set in the --interactive-debug=$var variable. Multiple keys * can be specified as a comma-separated list or alternatively "all" if a wait * should happen for all cases. * @@ -1039,7 +1039,7 @@ void igt_debug_wait_for_keypress(const char *var) * @expected: message to be printed as expected behaviour before wait for keys Y/n * * Waits for a key press when run interactively and when the corresponding debug - * var is set in the --interactive-debug=<var> variable. Multiple vars + * var is set in the --interactive-debug=$var variable. Multiple vars * can be specified as a comma-separated list or alternatively "all" if a wait * should happen for all cases. * diff --git a/lib/igt_core.c b/lib/igt_core.c index 03fa6e4e836b..cc94350874fc 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -167,10 +167,10 @@ * test logic. * * - When adding a new feature test function which uses igt_skip() internally, - * use the <prefix>_require_<feature_name> naming scheme. When you + * use the {prefix}_require_{feature_name} naming scheme. When you * instead add a feature test function which returns a boolean, because your * main test logic must take different actions depending upon the feature's - * availability, then instead use the <prefix>_has_<feature_name>. + * availability, then instead use the {prefix}_has_<feature_name>. * * - As already mentioned eschew explicit error handling logic as much as * possible. If your test absolutely has to handle the error of some function diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 9af8a5933480..49b68dfed0aa 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -231,7 +231,7 @@ int igt_debugfs_dir(int device) * @mode: mode bits as used by open() * * This opens a debugfs file as a Unix file descriptor. The filename should be - * relative to the drm device's root, i.e. without "drm/<minor>". + * relative to the drm device's root, i.e. without "drm/$minor". * * Returns: * The Unix file descriptor for the debugfs file or -1 if that didn't work out. -- 2.15.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH i-g-t 2/3] meson: gtkdoc support 2017-12-04 20:48 [PATCH i-g-t 1/3] " Daniel Vetter @ 2017-12-04 20:48 ` Daniel Vetter 2017-12-05 9:42 ` Petri Latvala 0 siblings, 1 reply; 11+ messages in thread From: Daniel Vetter @ 2017-12-04 20:48 UTC (permalink / raw) To: Intel Graphics Development; +Cc: Daniel Vetter Bunch of neat improvements: - xml generates correctly depend upon the test binaries - no need to re-run autogen.sh when new chapters/functions get added, all handed by meson Still one issue: - the gtkdoc target doesn't depend upon the custom_target yet, hacked around using build_by_default: true This is an issue known to upstream already: https://github.com/mesonbuild/meson/issues/2148 v2: Bump meson version to 0.42, since that's the first release which adds the build dir when running the gtkdoc tools, and hence allows including generated files. v2: - Undo the bump, it's only needed for generated source files. Other generated files as input should work with 0.40 already. - Generate version.xml from version.xml.in, which allows us to keep the &version; entity. v3: Add github issue link. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> --- docs/meson.build | 1 + .../intel-gpu-tools/generate_description_xml.sh | 44 ++++++++++++ .../intel-gpu-tools/generate_programs_xml.sh | 22 ++++++ docs/reference/intel-gpu-tools/meson.build | 80 ++++++++++++++++++++++ docs/reference/meson.build | 1 + meson.build | 3 + meson.sh | 2 +- tests/meson.build | 6 +- 8 files changed, 157 insertions(+), 2 deletions(-) create mode 100644 docs/meson.build create mode 100644 docs/reference/intel-gpu-tools/generate_description_xml.sh create mode 100755 docs/reference/intel-gpu-tools/generate_programs_xml.sh create mode 100644 docs/reference/intel-gpu-tools/meson.build create mode 100644 docs/reference/meson.build diff --git a/docs/meson.build b/docs/meson.build new file mode 100644 index 000000000000..ead14c4015d9 --- /dev/null +++ b/docs/meson.build @@ -0,0 +1 @@ +subdir('reference') diff --git a/docs/reference/intel-gpu-tools/generate_description_xml.sh b/docs/reference/intel-gpu-tools/generate_description_xml.sh new file mode 100644 index 000000000000..8e39e0c4c289 --- /dev/null +++ b/docs/reference/intel-gpu-tools/generate_description_xml.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +output=$1 +filter=$2 +testlist=$3 +testdir=$(dirname $testlist) + +echo "<?xml version=\"1.0\"?>" > $output +echo "<!DOCTYPE refsect1 PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"" >> $output +echo " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"" >> $output +echo "[" >> $output +echo " <!ENTITY % local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">" >> $output +echo " <!ENTITY version SYSTEM \"version.xml\">" >> $output +echo "]>" >> $output +echo "<refsect1>" >> $output +echo "<title>Description</title>" >> $output +for test in `cat $testlist | tr ' ' '\n' | grep "^$filter" | sort`; do + echo "<refsect2 id=\"$test\"><title>" >> $output; + echo "$test" | perl -pe 's/(?<=_)$(KEYWORDS)(?=(_|\W))/<acronym>\1<\/acronym>/g' >> $output; + echo "</title><para><![CDATA[" >> $output; + testprog=$testdir/$test; + ./$testprog --help-description >> $output; + echo "]]></para>" >> $output; + if ./$testprog --list-subtests > /dev/null ; then + echo "<refsect3><title>Subtests</title>" >> $output; + subtest_list=`./$testprog --list-subtests`; + subtest_count=`echo $subtest_list | wc -w`; + if [ $subtest_count -gt 100 ]; then + echo "<para>This test has over 100 subtests. " >> $output; + echo "Run <command>$test</command> <option>--list-subtests</option> to list them.</para>" >> $output; + else + echo "<simplelist>" >> $output; + for subtest in $subtest_list; do + echo "<member>" >> $output; + echo "$subtest" | perl -pe 's/\b$(KEYWORDS)\b/<acronym>\1<\/acronym>/g' >> $output; + echo "</member>" >> $output; + done; + echo "</simplelist>" >> $output; + fi; + echo "</refsect3>" >> $output; + fi; + echo "</refsect2>" >> $output; +done; +echo "</refsect1>" >> $output diff --git a/docs/reference/intel-gpu-tools/generate_programs_xml.sh b/docs/reference/intel-gpu-tools/generate_programs_xml.sh new file mode 100755 index 000000000000..73adc8cc7bfc --- /dev/null +++ b/docs/reference/intel-gpu-tools/generate_programs_xml.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +output=$1 +filter=$2 +testlist=$3 + +echo "<?xml version=\"1.0\"?>" > $output +echo "<!DOCTYPE refsect1 PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"" >> $output +echo " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"" >> $output +echo "[" >> $output +echo " <!ENTITY % local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">" >> $output +echo " <!ENTITY version SYSTEM \"version.xml\">" >> $output +echo "]>" >> $output +echo "<refsect1>" >> $output +echo "<title>Programs</title>" >> $output +echo "<informaltable pgwide=\"1\" frame=\"none\"><tgroup cols=\"2\"><tbody>" >> $output +for test in `cat $testlist | tr ' ' '\n' | grep "^$filter" | sort`; do + echo "<row><entry role=\"program_name\">" >> $output; + echo "<link linkend=\"$test\">$test</link></entry></row>" >> $output; +done; +echo "</tbody></tgroup></informaltable>" >> $output +echo "</refsect1>" >> $output diff --git a/docs/reference/intel-gpu-tools/meson.build b/docs/reference/intel-gpu-tools/meson.build new file mode 100644 index 000000000000..1c009229aae2 --- /dev/null +++ b/docs/reference/intel-gpu-tools/meson.build @@ -0,0 +1,80 @@ +gnome = import('gnome') + +ignore_headers = [ + 'gen6_render.h', + 'gen7_media.h', + 'gen7_render.h', + 'gen8_media.h', + 'gen8_render.h', + 'gpgpu_fill.h', + 'i830_reg.h', + 'i915_3d.h', + 'i915_pciids.h', + 'i915_reg.h', + 'igt_edid_template.h', + 'intel_reg.h', + 'debug.h', + 'instdone.h', + 'media_fill.h', + 'rendercopy.h', + 'media_spin.h', + 'media_fill_gen9.h', + 'gen9_render.h', + 'version.h', +] + +test_groups = [ + 'amdgpu', + 'chamelium', + 'core', + 'debugfs', + 'drm', + 'drv', + 'gem', + 'gen3', + 'gen7', + 'gvt', + 'kms', + 'meta', + 'perf', + 'pm', + 'prime', + 'sw_sync', + 'testdisplay', + 'tools', + 'vgem', +] + +gen_description = find_program('generate_description_xml.sh') +gen_programs = find_program('generate_programs_xml.sh') + +test_list_files = [] + +foreach group : test_groups + programs_xml = 'igt_test_programs_' + group + '_programs.xml' + custom_target(programs_xml, + output : programs_xml, + build_by_default : true, + command : [ gen_programs, '@OUTPUT@', group, test_list ]) + + description_xml = 'igt_test_programs_' + group + '_description.xml' + custom_target(description_xml, + output : description_xml, + build_by_default : true, + depends : test_executables, + command : [ gen_description, '@OUTPUT@', group, test_list ]) +endforeach + +configure_file(input: 'version.xml.in', + output: 'version.xml', + install: false, configuration: config) + +gnome.gtkdoc('intel-gpu-tools', + content_files : ['igt_test_programs.xml'], + dependencies : lib_igt, + install : true, + main_xml : 'intel-gpu-tools-docs.xml', + scan_args : '--rebuild-sections', + mkdb_args : '--output-format=xml', + ignore_headers : ignore_headers, + src_dir : inc_for_gtkdoc) diff --git a/docs/reference/meson.build b/docs/reference/meson.build new file mode 100644 index 000000000000..944f28a5615e --- /dev/null +++ b/docs/reference/meson.build @@ -0,0 +1 @@ +subdir('intel-gpu-tools') diff --git a/meson.build b/meson.build index a564893dc7cb..0950d3c7bbd5 100644 --- a/meson.build +++ b/meson.build @@ -28,6 +28,8 @@ endforeach inc = include_directories('include/drm-uapi', 'lib', '.') +inc_for_gtkdoc = include_directories('lib') + config = configuration_data() libdrm = dependency('libdrm', version : '>=2.4.82') @@ -136,3 +138,4 @@ if libdrm_intel.found() endif endif subdir('man') +subdir('docs') diff --git a/meson.sh b/meson.sh index cbf1a9326dbe..ae8e3488d962 100755 --- a/meson.sh +++ b/meson.sh @@ -28,7 +28,7 @@ install uninstall: echo "meson install support not yet completed" && false docs: - echo "meson gtkdoc support not yet completed" && false + ninja -C build intel-gpu-tools-doc EOF diff --git a/tests/meson.build b/tests/meson.build index 8d8abe062640..088c37ec9b15 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -260,12 +260,14 @@ endif libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-gpu-tools') +test_executables = [] + foreach prog : test_progs link = [] if prog == 'perf_pmu' link += lib_igt_perf endif - executable(prog, prog + '.c', + test_executables += executable(prog, prog + '.c', dependencies : test_deps, install_dir : libexecdir, link_with : link, @@ -287,6 +289,8 @@ custom_target('testlist', install : true, install_dir : pkgdatadir) +test_list = files('test-list.txt') + test_script = find_program('igt_command_line.sh') foreach prog : test_progs test('testcase check: ' + prog, test_script, -- 2.15.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH i-g-t 2/3] meson: gtkdoc support 2017-12-04 20:48 ` [PATCH i-g-t 2/3] meson: gtkdoc support Daniel Vetter @ 2017-12-05 9:42 ` Petri Latvala 0 siblings, 0 replies; 11+ messages in thread From: Petri Latvala @ 2017-12-05 9:42 UTC (permalink / raw) To: Daniel Vetter; +Cc: Intel Graphics Development On Mon, Dec 04, 2017 at 09:48:36PM +0100, Daniel Vetter wrote: > Bunch of neat improvements: > > - xml generates correctly depend upon the test binaries > - no need to re-run autogen.sh when new chapters/functions get added, > all handed by meson > > Still one issue: > > - the gtkdoc target doesn't depend upon the custom_target yet, hacked > around using build_by_default: true > > This is an issue known to upstream already: > > https://github.com/mesonbuild/meson/issues/2148 > > v2: Bump meson version to 0.42, since that's the first release which > adds the build dir when running the gtkdoc tools, and hence allows > including generated files. > > v2: > - Undo the bump, it's only needed for generated source files. Other > generated files as input should work with 0.40 already. > > - Generate version.xml from version.xml.in, which allows us to keep > the &version; entity. > > v3: Add github issue link. > > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> > --- > docs/meson.build | 1 + > .../intel-gpu-tools/generate_description_xml.sh | 44 ++++++++++++ > .../intel-gpu-tools/generate_programs_xml.sh | 22 ++++++ > docs/reference/intel-gpu-tools/meson.build | 80 ++++++++++++++++++++++ > docs/reference/meson.build | 1 + > meson.build | 3 + > meson.sh | 2 +- > tests/meson.build | 6 +- > 8 files changed, 157 insertions(+), 2 deletions(-) > create mode 100644 docs/meson.build > create mode 100644 docs/reference/intel-gpu-tools/generate_description_xml.sh > create mode 100755 docs/reference/intel-gpu-tools/generate_programs_xml.sh > create mode 100644 docs/reference/intel-gpu-tools/meson.build > create mode 100644 docs/reference/meson.build > > diff --git a/docs/meson.build b/docs/meson.build > new file mode 100644 > index 000000000000..ead14c4015d9 > --- /dev/null > +++ b/docs/meson.build > @@ -0,0 +1 @@ > +subdir('reference') > diff --git a/docs/reference/intel-gpu-tools/generate_description_xml.sh b/docs/reference/intel-gpu-tools/generate_description_xml.sh > new file mode 100644 > index 000000000000..8e39e0c4c289 > --- /dev/null > +++ b/docs/reference/intel-gpu-tools/generate_description_xml.sh > @@ -0,0 +1,44 @@ > +#!/bin/sh > + > +output=$1 > +filter=$2 > +testlist=$3 > +testdir=$(dirname $testlist) > + > +echo "<?xml version=\"1.0\"?>" > $output > +echo "<!DOCTYPE refsect1 PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"" >> $output > +echo " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"" >> $output > +echo "[" >> $output > +echo " <!ENTITY % local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">" >> $output > +echo " <!ENTITY version SYSTEM \"version.xml\">" >> $output > +echo "]>" >> $output > +echo "<refsect1>" >> $output > +echo "<title>Description</title>" >> $output > +for test in `cat $testlist | tr ' ' '\n' | grep "^$filter" | sort`; do > + echo "<refsect2 id=\"$test\"><title>" >> $output; > + echo "$test" | perl -pe 's/(?<=_)$(KEYWORDS)(?=(_|\W))/<acronym>\1<\/acronym>/g' >> $output; > + echo "</title><para><![CDATA[" >> $output; > + testprog=$testdir/$test; > + ./$testprog --help-description >> $output; > + echo "]]></para>" >> $output; > + if ./$testprog --list-subtests > /dev/null ; then > + echo "<refsect3><title>Subtests</title>" >> $output; > + subtest_list=`./$testprog --list-subtests`; > + subtest_count=`echo $subtest_list | wc -w`; > + if [ $subtest_count -gt 100 ]; then > + echo "<para>This test has over 100 subtests. " >> $output; > + echo "Run <command>$test</command> <option>--list-subtests</option> to list them.</para>" >> $output; > + else > + echo "<simplelist>" >> $output; > + for subtest in $subtest_list; do > + echo "<member>" >> $output; > + echo "$subtest" | perl -pe 's/\b$(KEYWORDS)\b/<acronym>\1<\/acronym>/g' >> $output; > + echo "</member>" >> $output; > + done; > + echo "</simplelist>" >> $output; > + fi; > + echo "</refsect3>" >> $output; > + fi; > + echo "</refsect2>" >> $output; > +done; > +echo "</refsect1>" >> $output > diff --git a/docs/reference/intel-gpu-tools/generate_programs_xml.sh b/docs/reference/intel-gpu-tools/generate_programs_xml.sh > new file mode 100755 > index 000000000000..73adc8cc7bfc > --- /dev/null > +++ b/docs/reference/intel-gpu-tools/generate_programs_xml.sh > @@ -0,0 +1,22 @@ > +#!/bin/sh > + > +output=$1 > +filter=$2 > +testlist=$3 > + > +echo "<?xml version=\"1.0\"?>" > $output > +echo "<!DOCTYPE refsect1 PUBLIC \"-//OASIS//DTD DocBook XML V4.3//EN\"" >> $output > +echo " \"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd\"" >> $output > +echo "[" >> $output > +echo " <!ENTITY % local.common.attrib \"xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'\">" >> $output > +echo " <!ENTITY version SYSTEM \"version.xml\">" >> $output > +echo "]>" >> $output > +echo "<refsect1>" >> $output > +echo "<title>Programs</title>" >> $output > +echo "<informaltable pgwide=\"1\" frame=\"none\"><tgroup cols=\"2\"><tbody>" >> $output > +for test in `cat $testlist | tr ' ' '\n' | grep "^$filter" | sort`; do > + echo "<row><entry role=\"program_name\">" >> $output; > + echo "<link linkend=\"$test\">$test</link></entry></row>" >> $output; > +done; > +echo "</tbody></tgroup></informaltable>" >> $output > +echo "</refsect1>" >> $output > diff --git a/docs/reference/intel-gpu-tools/meson.build b/docs/reference/intel-gpu-tools/meson.build > new file mode 100644 > index 000000000000..1c009229aae2 > --- /dev/null > +++ b/docs/reference/intel-gpu-tools/meson.build > @@ -0,0 +1,80 @@ > +gnome = import('gnome') > + > +ignore_headers = [ > + 'gen6_render.h', > + 'gen7_media.h', > + 'gen7_render.h', > + 'gen8_media.h', > + 'gen8_render.h', > + 'gpgpu_fill.h', > + 'i830_reg.h', > + 'i915_3d.h', > + 'i915_pciids.h', > + 'i915_reg.h', > + 'igt_edid_template.h', > + 'intel_reg.h', > + 'debug.h', > + 'instdone.h', > + 'media_fill.h', > + 'rendercopy.h', > + 'media_spin.h', > + 'media_fill_gen9.h', > + 'gen9_render.h', > + 'version.h', > +] > + > +test_groups = [ > + 'amdgpu', > + 'chamelium', > + 'core', > + 'debugfs', > + 'drm', > + 'drv', > + 'gem', > + 'gen3', > + 'gen7', > + 'gvt', > + 'kms', > + 'meta', > + 'perf', > + 'pm', > + 'prime', > + 'sw_sync', > + 'testdisplay', > + 'tools', > + 'vgem', > +] > + > +gen_description = find_program('generate_description_xml.sh') > +gen_programs = find_program('generate_programs_xml.sh') > + > +test_list_files = [] > + > +foreach group : test_groups > + programs_xml = 'igt_test_programs_' + group + '_programs.xml' > + custom_target(programs_xml, > + output : programs_xml, > + build_by_default : true, > + command : [ gen_programs, '@OUTPUT@', group, test_list ]) > + > + description_xml = 'igt_test_programs_' + group + '_description.xml' > + custom_target(description_xml, > + output : description_xml, > + build_by_default : true, > + depends : test_executables, > + command : [ gen_description, '@OUTPUT@', group, test_list ]) > +endforeach > + > +configure_file(input: 'version.xml.in', > + output: 'version.xml', > + install: false, configuration: config) > + > +gnome.gtkdoc('intel-gpu-tools', > + content_files : ['igt_test_programs.xml'], > + dependencies : lib_igt, > + install : true, > + main_xml : 'intel-gpu-tools-docs.xml', > + scan_args : '--rebuild-sections', > + mkdb_args : '--output-format=xml', > + ignore_headers : ignore_headers, > + src_dir : inc_for_gtkdoc) > diff --git a/docs/reference/meson.build b/docs/reference/meson.build > new file mode 100644 > index 000000000000..944f28a5615e > --- /dev/null > +++ b/docs/reference/meson.build > @@ -0,0 +1 @@ > +subdir('intel-gpu-tools') > diff --git a/meson.build b/meson.build > index a564893dc7cb..0950d3c7bbd5 100644 > --- a/meson.build > +++ b/meson.build > @@ -28,6 +28,8 @@ endforeach > > inc = include_directories('include/drm-uapi', 'lib', '.') > > +inc_for_gtkdoc = include_directories('lib') > + > config = configuration_data() > > libdrm = dependency('libdrm', version : '>=2.4.82') > @@ -136,3 +138,4 @@ if libdrm_intel.found() > endif > endif > subdir('man') > +subdir('docs') > diff --git a/meson.sh b/meson.sh > index cbf1a9326dbe..ae8e3488d962 100755 > --- a/meson.sh > +++ b/meson.sh > @@ -28,7 +28,7 @@ install uninstall: > echo "meson install support not yet completed" && false > > docs: > - echo "meson gtkdoc support not yet completed" && false > + ninja -C build intel-gpu-tools-doc > > EOF > > diff --git a/tests/meson.build b/tests/meson.build > index 8d8abe062640..088c37ec9b15 100644 > --- a/tests/meson.build > +++ b/tests/meson.build > @@ -260,12 +260,14 @@ endif > > libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-gpu-tools') > > +test_executables = [] > + > foreach prog : test_progs > link = [] > if prog == 'perf_pmu' > link += lib_igt_perf > endif > - executable(prog, prog + '.c', > + test_executables += executable(prog, prog + '.c', > dependencies : test_deps, > install_dir : libexecdir, > link_with : link, > @@ -287,6 +289,8 @@ custom_target('testlist', > install : true, > install_dir : pkgdatadir) > > +test_list = files('test-list.txt') > + This breaks building from a clean checkout. files() can only be used for files that already exist. You can use the object from custom_target() directly for test-list.txt: --- a/tests/meson.build +++ b/tests/meson.build @@ -280,14 +280,12 @@ test_progs += 'testdisplay' pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools') gen_testlist = find_program('generate_testlist.sh') -custom_target('testlist', +test_list = custom_target('testlist', output : 'test-list.txt', command : [ gen_testlist, '@OUTPUT@', test_progs ], install : true, install_dir : pkgdatadir) -- Petri Latvala _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-03-06 13:50 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-12-05 10:16 [PATCH i-g-t 1/3] lib: avoid < in gtkdoc comments Daniel Vetter 2017-12-05 10:16 ` [PATCH i-g-t 2/3] meson: gtkdoc support Daniel Vetter 2018-02-22 23:54 ` Eric Anholt 2018-03-06 13:50 ` Daniel Vetter 2017-12-05 10:16 ` [PATCH i-g-t 3/3] meson: build a full dependency for lib_igt_perf Daniel Vetter 2017-12-05 10:44 ` Petri Latvala 2017-12-05 11:05 ` Petri Latvala 2017-12-05 11:17 ` ✓ Fi.CI.BAT: success for series starting with [1/3] lib: avoid < in gtkdoc comments Patchwork 2017-12-05 12:17 ` ✗ Fi.CI.IGT: failure " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2017-12-04 20:48 [PATCH i-g-t 1/3] " Daniel Vetter 2017-12-04 20:48 ` [PATCH i-g-t 2/3] meson: gtkdoc support Daniel Vetter 2017-12-05 9:42 ` Petri Latvala
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.