mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 15:46:17 +01:00
Fix a !srcdir problem with installed tests
When installing scripts which are not generated in a srcdir != builddir build, $< will have ../.. goo in it. So we need to strip the directory parts before using the filename to construct a new path.
This commit is contained in:
parent
dac1ad66eb
commit
d6e95cc5f5
@ -127,7 +127,7 @@ installed_test_meta_DATA = $(installed_testcases:=.test)
|
|||||||
%.test: %$(EXEEXT) Makefile
|
%.test: %$(EXEEXT) Makefile
|
||||||
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
|
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
|
||||||
echo 'Type=session' >> $@.tmp; \
|
echo 'Type=session' >> $@.tmp; \
|
||||||
echo 'Exec=$(installed_testdir)/$<' >> $@.tmp; \
|
echo 'Exec=$(installed_testdir)/(notdir $<)' >> $@.tmp; \
|
||||||
mv $@.tmp $@)
|
mv $@.tmp $@)
|
||||||
|
|
||||||
CLEANFILES += $(installed_test_meta_DATA)
|
CLEANFILES += $(installed_test_meta_DATA)
|
||||||
|
3
glib.mk
3
glib.mk
@ -54,6 +54,7 @@ lcov:
|
|||||||
genlcov:
|
genlcov:
|
||||||
$(AM_V_GEN) rm -f $(top_builddir)/tests/.libs/libmoduletestplugin_*.gcda; \
|
$(AM_V_GEN) rm -f $(top_builddir)/tests/.libs/libmoduletestplugin_*.gcda; \
|
||||||
$(LTP) --quiet --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name GLIB_PERF --no-checksum --compat-libtool --ignore-errors source; \
|
$(LTP) --quiet --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name GLIB_PERF --no-checksum --compat-libtool --ignore-errors source; \
|
||||||
|
$(LTP) --quiet --output-file glib-lcov.info --remove glib-lcov.info docs/reference/\* /tmp/\* gio/tests/gdbus-object-manager-example/\* ; \
|
||||||
LANG=C $(LTP_GENHTML) --quiet --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --frames --show-details glib-lcov.info --ignore-errors source
|
LANG=C $(LTP_GENHTML) --quiet --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --frames --show-details glib-lcov.info --ignore-errors source
|
||||||
@echo "file://$(abs_top_builddir)/glib-lcov/index.html"
|
@echo "file://$(abs_top_builddir)/glib-lcov/index.html"
|
||||||
|
|
||||||
@ -163,7 +164,7 @@ installed_test_meta_DATA = $(installed_testcases:=.test)
|
|||||||
%.test: %$(EXEEXT) Makefile
|
%.test: %$(EXEEXT) Makefile
|
||||||
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
|
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
|
||||||
echo 'Type=session' >> $@.tmp; \
|
echo 'Type=session' >> $@.tmp; \
|
||||||
echo 'Exec=$(installed_testdir)/$<' >> $@.tmp; \
|
echo 'Exec=$(installed_testdir)/$(notdir $<)' >> $@.tmp; \
|
||||||
mv $@.tmp $@)
|
mv $@.tmp $@)
|
||||||
|
|
||||||
CLEANFILES += $(installed_test_meta_DATA)
|
CLEANFILES += $(installed_test_meta_DATA)
|
||||||
|
Loading…
Reference in New Issue
Block a user