blob: db1b00462ff041bb2c44f288df66a76cbf2c3a89 [file] [log] [blame]
From 159d53d71c7539719b3883bbdc7b113c876a5e55 Mon Sep 17 00:00:00 2001
From: "Andrew G. Morgan" <morgan@kernel.org>
Date: Mon, 7 Sep 2020 14:02:03 -0700
Subject: [PATCH] Migrate all uses of tcapsh-static to sudotest target.
Since sudotest is mostly the reason for using a static binary, force
all uses to be under this test target.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
go/Makefile | 6 +++---
progs/Makefile | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/go/Makefile b/go/Makefile
index 19b3e29..508b380 100644
--- a/go/Makefile
+++ b/go/Makefile
@@ -70,16 +70,16 @@ ifeq ($(CGO_REQUIRED),0)
CGO_ENABLED="1" CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" GOPATH=$(GOPATH) $(GO) build -o $@-cgo $<
endif
-test: all ../progs/tcapsh-static
+test: all
CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" GOPATH="$(GOPATH)" $(GO) test $(IMPORTDIR)/psx
CGO_LDFLAGS_ALLOW="$(CGO_LDFLAGS_ALLOW)" GOPATH="$(GOPATH)" $(GO) test $(IMPORTDIR)/cap
LD_LIBRARY_PATH=../libcap ./compare-cap
+
+sudotest: test ../progs/tcapsh-static
./try-launching
ifeq ($(CGO_REQUIRED),0)
./try-launching-cgo
endif
-
-sudotest: test
sudo ./try-launching
ifeq ($(CGO_REQUIRED),0)
sudo ./try-launching-cgo
diff --git a/progs/Makefile b/progs/Makefile
index 1b27c41..f416e59 100644
--- a/progs/Makefile
+++ b/progs/Makefile
@@ -16,7 +16,7 @@ endif
DEPS=../libcap/libcap.a ../libcap/libpsx.a
-all: $(BUILD) tcapsh-static
+all: $(BUILD)
$(DEPS):
make -C ../libcap all
--
2.26.2