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

debian: skip snap-confine unit tests on nocheck #2567

Merged
merged 2 commits into from Jan 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions debian/rules
Expand Up @@ -104,13 +104,16 @@ override_dh_auto_build:

override_dh_auto_test:
dh_auto_test -- $(GCCGOFLAGS)
# a tested default (production) build should have no test keys
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# check that only the main trusted account-key is included
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly related to this PR but I think the lines before this check are slightly confusing. I think we should check there for "testkeys" instead of "nocheck". I.e. write it like:

index 3dfad9a..494cab6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -102,13 +102,15 @@ override_dh_auto_build:
 
 override_dh_auto_test:
        dh_auto_test -- $(GCCGOFLAGS)
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(filter testkeys,$(DEB_BUILD_OPTIONS)))
        # check that only the main trusted account-key is included
        [ $$(strings _build/bin/snapd|grep -c -E "public-key-sha3-384: [a-zA-Z0-9_-]{64}") -eq 1 ]
        strings _build/bin/snapd|grep -c "^public-key-sha3-384: -CvQKAwRQ5h3Ffn10FILJoEZUXOv6km9FwA80-Rcj-f-6jadQ89VRswHNiEB9Lxk$$"
 endif
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        # run the snap-confine tests
        $(MAKE) -C cmd check
+endif
 
 override_dh_systemd_enable:
        # enable auto-import

WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I'll make it so!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: I assume you meant ifneq in the first line.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comment got obsolete by telegram discussion(s)

[ $$(strings _build/bin/snapd|grep -c -E "public-key-sha3-384: [a-zA-Z0-9_-]{64}") -eq 1 ]
strings _build/bin/snapd|grep -c "^public-key-sha3-384: -CvQKAwRQ5h3Ffn10FILJoEZUXOv6km9FwA80-Rcj-f-6jadQ89VRswHNiEB9Lxk$$"
endif
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
# run the snap-confine tests
$(MAKE) -C cmd check
endif

override_dh_systemd_enable:
# enable auto-import
Expand Down