test: Install GNOME-style installed-tests metadata
This allows these tests to be discovered and run by gnome-desktop-test-runner. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
committed by
Sam Lantinga
parent
38ef678990
commit
ce502054ad
@@ -88,13 +88,24 @@ TARGETS = \
|
||||
@OPENGLES2_TARGETS@ += testgles2$(EXE)
|
||||
|
||||
|
||||
all: Makefile $(TARGETS) copydatafiles
|
||||
all: Makefile $(TARGETS) copydatafiles generatetestmeta
|
||||
|
||||
installedtestsdir = $(libexecdir)/installed-tests/SDL2
|
||||
installedtestsmetadir = $(datadir)/installed-tests/SDL2
|
||||
|
||||
generatetestmeta:
|
||||
rm -f *.test
|
||||
set -e; for exe in $(noninteractive) $(needs_audio) $(needs_display); do \
|
||||
sed \
|
||||
-e 's#@installedtestsdir@#$(installedtestsdir)#g' \
|
||||
-e "s#@exe@#$$exe#g" \
|
||||
< $(srcdir)/template.test.in > $$exe.test; \
|
||||
done
|
||||
|
||||
install: all
|
||||
install -D -t $(DESTDIR)$(installedtestsdir) $(TARGETS)
|
||||
install -m644 -D -t $(DESTDIR)$(installedtestsdir) $(DATA)
|
||||
install -m644 -D -t $(DESTDIR)$(installedtestsmetadir) *.test
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in
|
||||
$(SHELL) config.status $@
|
||||
@@ -362,7 +373,7 @@ testmouse$(EXE): $(srcdir)/testmouse.c
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(TARGETS)
|
||||
rm -f $(TARGETS) *.test
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile
|
||||
|
||||
Reference in New Issue
Block a user