Skip to content

Commit

Permalink
Do not build xc by default (#1536)
Browse files Browse the repository at this point in the history
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <[email protected]>
  • Loading branch information
dominikschulz authored Aug 18, 2020
1 parent dc65f6e commit cf6ebc6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ clean:
@rm -f gopass-*.tar.gz
@rm -f gopass-*-*
@rm -f tests/tests
@rm -f *.test
@rm -rf dist/*
@rm -f *.completion
@printf '%s\n' '$(OK)'
Expand Down Expand Up @@ -113,7 +114,7 @@ fulltest: $(GOPASS_OUTPUT)
@echo "mode: atomic" > coverage-all.out
@$(foreach pkg, $(PKGS),\
echo -n " ";\
go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -coverprofile=coverage.out -covermode=atomic $(pkg) -tags 'xc' || exit 1;\
go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -coverprofile=coverage.out -covermode=atomic $(pkg) || exit 1;\
tail -n +2 coverage.out >> coverage-all.out;)
@$(GO) tool cover -html=coverage-all.out -o coverage-all.html

Expand All @@ -122,22 +123,22 @@ fulltest-nocover: $(GOPASS_OUTPUT)
@echo "mode: atomic" > coverage-all.out
@$(foreach pkg, $(PKGS),\
echo -n " ";\
go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) $(pkg) -tags 'xc' || exit 1;)
go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) $(pkg) || exit 1;)

racetest: $(GOPASS_OUTPUT)
@echo ">> TEST, \"full-mode\": race detector on"
@echo "mode: atomic" > coverage-all.out
@$(foreach pkg, $(PKGS),\
echo -n " ";\
go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -race -coverprofile=coverage.out -covermode=atomic $(pkg) -tags 'xc' || exit 1;\
go test -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) -race -coverprofile=coverage.out -covermode=atomic $(pkg) || exit 1;\
tail -n +2 coverage.out >> coverage-all.out;)
@$(GO) tool cover -html=coverage-all.out -o coverage-all.html

test: $(GOPASS_OUTPUT)
@echo ">> TEST, \"fast-mode\": race detector off"
@$(foreach pkg, $(PKGS),\
echo -n " ";\
$(GO) test -test.short -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) $(pkg) -tags 'xc' || exit 1)
$(GO) test -test.short -run '(Test|Example)' $(BUILDFLAGS) $(TESTFLAGS) $(pkg) || exit 1)

test-integration: $(GOPASS_OUTPUT)
cd tests && GOPASS_BINARY=$(PWD)/$(GOPASS_OUTPUT) GOPASS_TEST_DIR=$(PWD)/tests go test -v
Expand All @@ -155,7 +156,7 @@ crosscompile:

full:
@echo -n ">> COMPILE linux/amd64 xc"
$(GO) build -o $(GOPASS_OUTPUT)-full -tags "xc"
$(GO) build -o $(GOPASS_OUTPUT)-full

%.completion: $(GOPASS_OUTPUT)
@printf ">> $* completion, output = $@"
Expand Down
6 changes: 3 additions & 3 deletions internal/action/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ func TestInitParseContext(t *testing.T) {
check func(context.Context) error
}{
{
name: "crypto xc",
flags: map[string]string{"crypto": "xc"},
name: "crypto age",
flags: map[string]string{"crypto": "age"},
check: func(ctx context.Context) error {
if be := backend.GetCryptoBackend(ctx); be != backend.XC {
if be := backend.GetCryptoBackend(ctx); be != backend.Age {
return fmt.Errorf("wrong backend: %d", be)
}
return nil
Expand Down
4 changes: 2 additions & 2 deletions internal/notify/icon.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"os"
"path/filepath"

"github.com/gopasspw/gopass/internal/config"
"github.com/gopasspw/gopass/pkg/appdir"
"github.com/gopasspw/gopass/pkg/fsutil"
)

func iconURI() string {
iconFN := filepath.Join(config.Directory(), "gopass-logo-small.png")
iconFN := filepath.Join(appdir.UserCache(), "gopass-logo-small.png")
if !fsutil.IsFile(iconFN) {
fh, err := os.OpenFile(iconFN, os.O_WRONLY|os.O_CREATE, 0644)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/notify/notify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestIcon(t *testing.T) {
_ = os.Remove(fn)
_ = iconURI()
fh, err := os.Open(fn)
assert.NoError(t, err)
require.NoError(t, err)
defer func() {
assert.NoError(t, fh.Close())
}()
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestGetCommands(t *testing.T) {
c.Context = ctx

commands := getCommands(act, app)
assert.Equal(t, 37, len(commands))
assert.Equal(t, 36, len(commands))

prefix := ""
testCommands(t, c, commands, prefix)
Expand Down
2 changes: 1 addition & 1 deletion pkg/tempfile/mount_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func tempdirBase() string {
}

func (t *File) mount(ctx context.Context) error {
// create 16MB ramdisk
// create 32MB ramdisk
cmd := exec.CommandContext(ctx, "hdid", "-drivekey", "system-image=yes", "-nomount", "ram://32768")
cmd.Stderr = os.Stderr

Expand Down

0 comments on commit cf6ebc6

Please sign in to comment.