[PATCH xserver 03/10] tests: Convert test/xi2/ to single binary
Emil Velikov
emil.l.velikov at gmail.com
Fri Jan 13 13:52:03 UTC 2017
Hi Mihail,
On 30 December 2016 at 08:30, Mihail Konev <k.mvc at ya.ru> wrote:
> Instead of multiple test binaries, use a single one which executes
> a test depending on the command-line argument being passed.
>
> For testsuite, emulate multiple binaries with shell scripts
> that pass an appropriate argument.
>
> Speeds up partial rebuild, as each linking takes a noticeable
> amount of time, and all of them have to be done for verification
> purposes.
>
> Signed-off-by: Mihail Konev <k.mvc at ya.ru>
> ---
> test/xi2/.gitignore | 1 +
> test/xi2/Makefile.am | 87 +++++++++++++++-----------------
> test/xi2/common.sh | 3 ++
> test/xi2/protocol-common.h | 12 +++++
> test/xi2/protocol-eventconvert.c | 2 +-
> test/xi2/protocol-xigetclientpointer.c | 2 +-
> test/xi2/protocol-xigetselectedevents.c | 2 +-
> test/xi2/protocol-xipassivegrabdevice.c | 2 +-
> test/xi2/protocol-xiquerydevice.c | 2 +-
> test/xi2/protocol-xiquerypointer.c | 2 +-
> test/xi2/protocol-xiqueryversion.c | 2 +-
> test/xi2/protocol-xiselectevents.c | 2 +-
> test/xi2/protocol-xisetclientpointer.c | 2 +-
> test/xi2/protocol-xiwarppointer.c | 2 +-
> test/xi2/protocol_eventconvert.sh | 2 +
> test/xi2/protocol_xigetclientpointer.sh | 2 +
> test/xi2/protocol_xigetselectedevents.sh | 2 +
> test/xi2/protocol_xipassivegrabdevice.sh | 2 +
> test/xi2/protocol_xiquerydevice.sh | 2 +
> test/xi2/protocol_xiquerypointer.sh | 2 +
> test/xi2/protocol_xiqueryversion.sh | 2 +
> test/xi2/protocol_xiselectevents.sh | 2 +
> test/xi2/protocol_xisetclientpointer.sh | 2 +
> test/xi2/protocol_xiwarppointer.sh | 2 +
> test/xi2/tests.c | 24 +++++++++
> test/xi2/xi2.c | 2 +-
> test/xi2/xi2.sh | 2 +
> 27 files changed, 115 insertions(+), 56 deletions(-)
> create mode 100644 test/xi2/common.sh
> create mode 100755 test/xi2/protocol_eventconvert.sh
> create mode 100755 test/xi2/protocol_xigetclientpointer.sh
> create mode 100755 test/xi2/protocol_xigetselectedevents.sh
> create mode 100755 test/xi2/protocol_xipassivegrabdevice.sh
> create mode 100755 test/xi2/protocol_xiquerydevice.sh
> create mode 100755 test/xi2/protocol_xiquerypointer.sh
> create mode 100755 test/xi2/protocol_xiqueryversion.sh
> create mode 100755 test/xi2/protocol_xiselectevents.sh
> create mode 100755 test/xi2/protocol_xisetclientpointer.sh
> create mode 100755 test/xi2/protocol_xiwarppointer.sh
> create mode 100644 test/xi2/tests.c
> create mode 100755 test/xi2/xi2.sh
>
Coming a bit late, so pardon if the following suggestion has already
been covered.
Rather than having individual test .sh files wrapped around common.sh,
simply creating a link (there's some examples in xserver code) at
build-time will be sufficient.
Multiple projects already use the approach with busybox being one of
the more common ones.
Emil
More information about the xorg-devel
mailing list