Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data, packaging: separate check and implicit build makefile targets #14964

Merged
merged 3 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ all install clean:
$(MAKE) -C env $@
$(MAKE) -C desktop $@
$(MAKE) -C polkit $@

check:
$(MAKE) -C systemd $@
2 changes: 1 addition & 1 deletion data/systemd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SYSTEMD_UNITS_GENERATED := $(wildcard *.in)
SYSTEMD_UNITS = $(sort $(SYSTEMD_UNITS_GENERATED:.in=) $(wildcard *.service) $(wildcard *.timer) $(wildcard *.socket) $(wildcard *.target))

.PHONY: all
all: $(SYSTEMD_UNITS) check
all: $(SYSTEMD_UNITS)

.PHONY: check
check: snapd.run-from-snap snapd.core-fixup.sh
Expand Down
3 changes: 2 additions & 1 deletion packaging/arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ check() {
# done, not after building the tree.
# ./run-checks --static
TMPDIR=/tmp make -C cmd -k check
TMPDIR=/tmp make -C data -k check
}

package() {
Expand All @@ -133,7 +134,7 @@ package() {
"$pkgdir/usr/share/zsh/site-functions/_snap"

# Install systemd units, dbus services and a script for environment variables
make -C data/ install \
make -C data install \
DBUSSERVICESDIR=/usr/share/dbus-1/services \
BINDIR=/usr/bin \
SYSTEMDSYSTEMUNITDIR=/usr/lib/systemd/system \
Expand Down
6 changes: 3 additions & 3 deletions packaging/fedora/snapd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -801,9 +801,9 @@ export GO111MODULE=off
%endif

# snap-confine tests (these always run!)
pushd ./cmd
make check
popd
make -C cmd -k check
# and data files
make -C data -k check

%files
#define license tag if not already defined
Expand Down
3 changes: 2 additions & 1 deletion packaging/opensuse/snapd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ for binary in snap-exec snap-update-ns snapctl; do
ldd $binary 2>&1 | grep 'not a dynamic executable'
done

%make_build -C %{indigo_srcdir}/cmd check
%make_build -C %{indigo_srcdir}/cmd -k check
%make_build -C %{indigo_srcdir}/data -k check
# Use the common packaging helper for testing.
%make_build -C %{indigo_srcdir} -f %{indigo_srcdir}/packaging/snapd.mk \
GOPATH=%{indigo_gopath}:$GOPATH SNAPD_DEFINES_DIR=%{_builddir} \
Expand Down
4 changes: 3 additions & 1 deletion packaging/ubuntu-14.04/rules
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
endif
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# run the snap-confine tests
$(MAKE) -C cmd check
$(MAKE) -C cmd -k check
# and data files tests
$(MAKE) -C data -k check
endif

override_dh_install:
Expand Down
4 changes: 3 additions & 1 deletion packaging/ubuntu-16.04/rules
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
endif
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# run the snap-confine tests
$(MAKE) -C cmd check
$(MAKE) -C cmd -k check
# and data files tests
$(MAKE) -C data -k check
endif


Expand Down
Loading