xserver

xserver with xephyr scale patch
git clone https://git.neptards.moe/u3shit/xserver.git
Log | Files | Refs | README | LICENSE

meson.build (5692B)


      1 simple_xinit = executable(
      2     'simple-xinit',
      3     'simple-xinit.c',
      4     include_directories: inc,
      5 )
      6 
      7 piglit_env = environment()
      8 piglit_env.set('XSERVER_DIR', meson.source_root())
      9 piglit_env.set('XSERVER_BUILDDIR', meson.build_root())
     10 
     11 some_ops = ' -o clear,src,dst,over,xor,disjointover'
     12 rendercheck_tests = [
     13     ['blend/All/a8r8g8b8', '-t blend -f a8r8g8b8'],
     14     ['blend/All/x8r8g8b8', '-t blend -f a8r8g8b8,x8r8g8b8'],
     15     ['blend/All/a2r10g10b10', '-t blend -f a8r8g8b8,a2r10g10b10'],
     16     ['blend/Clear', '-t blend -o clear'],
     17     ['blend/Src', '-t blend -o src'],
     18     ['blend/Over', '-t blend -o over'],
     19     ['composite/Some/a8r8g8b8', '-t composite -f a8r8g8b8' + some_ops],
     20     ['composite/Some/x8r8g8b8', '-t composite -f a8r8g8b8,x8r8g8b8' + some_ops],
     21     ['composite/Some/a2r10g10b10', '-t composite -f a8r8g8b8,a2r10g10b10' + some_ops],
     22     ['ca composite/Some/a8r8g8b8', '-t cacomposite -f a8r8g8b8' + some_ops],
     23     ['ca composite/Some/a8', '-t cacomposite -f a8r8g8b8,a8' + some_ops],
     24     ['ca composite/Some/x8r8g8b8', '-t cacomposite -f a8r8g8b8,x8r8g8b8' + some_ops],
     25     ['ca composite/Some/a2r10g10b10', '-t cacomposite -f a8r8g8b8,a2r10g10b10' + some_ops],
     26     ['fill', '-t fill'],
     27     ['bug7366', '-t bug7366'],
     28     ['destination coordinates', '-t dcoords'],
     29     ['source coordinates', '-t scoords'],
     30     ['mask coordinates', '-t mcoords'],
     31     ['translated source coordinates', '-t tscoords'],
     32     ['translated mask coordinates', '-t tmcoords'],
     33     ['triangles', '-t triangles'],
     34     ['LibreOffice xRGB', '-t libreoffice_xrgb'],
     35     ['GTK ARGB vs xBGR', '-t gtk_argb_xbgr'],
     36 ]
     37 
     38 rendercheck = find_program('rendercheck', required:false)
     39 
     40 if get_option('xvfb')
     41     xvfb_args = [
     42         xvfb_server.full_path(),
     43         '-screen',
     44         'scrn',
     45         '1280x1024x24',
     46     ]
     47 
     48     test('XTS',
     49         find_program('scripts/xvfb-piglit.sh'),
     50         env: piglit_env,
     51         timeout: 1200,
     52         suite: 'xvfb'
     53     )
     54 
     55     if rendercheck.found()
     56         foreach rctest: rendercheck_tests
     57             test(rctest[0],
     58                  simple_xinit,
     59                  # Use full_path so people can copy and paste the
     60                  # command line from testlog.txt easily.
     61                  args: [
     62                      rendercheck.path(),
     63                      rctest[1].split(' '),
     64                      '--',
     65                      xvfb_args,
     66                  ],
     67                  suite: 'xvfb'
     68                 )
     69         endforeach
     70     endif
     71 
     72     if get_option('xephyr') and build_glamor
     73         test('XTS',
     74             find_program('scripts/xephyr-glamor-piglit.sh'),
     75             env: piglit_env,
     76             timeout: 1200,
     77             suite: 'xephr-glamor',
     78         )
     79 
     80         if rendercheck.found()
     81             foreach rctest: rendercheck_tests
     82                 test(rctest[0],
     83                      simple_xinit,
     84                      args: [simple_xinit.full_path(),
     85                             rendercheck.path(),
     86                             rctest[1].split(' '),
     87                             '----',
     88                             xephyr_server.full_path(),
     89                             '-glamor',
     90                             '-glamor-skip-present',
     91                             '-schedMax', '2000',
     92                             '--',
     93                             xvfb_args,
     94                            ],
     95                      suite: 'xephr-glamor',
     96                      timeout: 300,
     97                     )
     98             endforeach
     99         endif
    100     endif
    101 endif
    102 
    103 subdir('bigreq')
    104 subdir('damage')
    105 subdir('sync')
    106 
    107 if build_xorg
    108 # Tests that require at least some DDX functions in order to fully link
    109 # For now, requires xf86 ddx, could be adjusted to use another
    110     unit_sources = [
    111      '../mi/miinitext.c',
    112      '../mi/miinitext.h',
    113      'fixes.c',
    114      'input.c',
    115      'list.c',
    116      'misc.c',
    117      'signal-logging.c',
    118      'string.c',
    119      'test_xkb.c',
    120      'tests-common.c',
    121      'tests.c',
    122      'touch.c',
    123      'xfree86.c',
    124      'xtest.c',
    125     ]
    126     unit_defines = ['-DXORG_TESTS']
    127     unit_includes = [inc, xorg_inc]
    128 
    129     if build_res
    130         unit_sources += ['hashtabletest.c']
    131         unit_defines += ['-DRES_TESTS']
    132     endif
    133 
    134     unit_c_args = unit_defines
    135     if meson.get_compiler('c').has_link_argument('-Wl,-wrap')
    136        # LTO breaks with -Wl,-wrap on certain configurations
    137        unit_c_args += ['-fno-lto']
    138        unit_sources += [
    139         'xi1/protocol-xchangedevicecontrol.c',
    140         'xi2/protocol-common.c',
    141         'xi2/protocol-xiqueryversion.c',
    142         'xi2/protocol-xiquerydevice.c',
    143         'xi2/protocol-xiselectevents.c',
    144         'xi2/protocol-xigetselectedevents.c',
    145         'xi2/protocol-xisetclientpointer.c',
    146         'xi2/protocol-xigetclientpointer.c',
    147         'xi2/protocol-xiquerypointer.c',
    148         'xi2/protocol-xipassivegrabdevice.c',
    149         'xi2/protocol-xiwarppointer.c',
    150         'xi2/protocol-eventconvert.c',
    151         'xi2/xi2.c',
    152        ]
    153        unit_defines += ['-DLDWRAP_TESTS']
    154        unit_includes += [include_directories('xi1', 'xi2')]
    155        ldwraps = [
    156         '-Wl,-wrap,dixLookupWindow',
    157         '-Wl,-wrap,dixLookupClient',
    158         '-Wl,-wrap,WriteToClient',
    159         '-Wl,-wrap,dixLookupWindow',
    160         '-Wl,-wrap,XISetEventMask',
    161         '-Wl,-wrap,AddResource',
    162         '-Wl,-wrap,GrabButton',
    163        ]
    164     else
    165        ldwraps = []
    166        message('ld -wrap required for xi1 & xi2 unit tests, skipping')
    167     endif
    168 
    169     unit = executable('tests',
    170          unit_sources,
    171          c_args: unit_c_args,
    172          dependencies: [pixman_dep, randrproto_dep, inputproto_dep, libxcvt_dep],
    173          include_directories: unit_includes,
    174          link_args: ldwraps,
    175          link_with: xorg_link,
    176     )
    177 
    178     test('unit', unit)
    179 endif