diff options
Diffstat (limited to 't/recipes/checks/languages/golang/built-using/binaries-golang')
5 files changed, 36 insertions, 0 deletions
diff --git a/t/recipes/checks/languages/golang/built-using/binaries-golang/build-spec/fill-values b/t/recipes/checks/languages/golang/built-using/binaries-golang/build-spec/fill-values new file mode 100644 index 0000000..20669e9 --- /dev/null +++ b/t/recipes/checks/languages/golang/built-using/binaries-golang/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: binaries-golang +Extra-Build-Depends: golang-go (>= 2:1.1.1-4) +Description: Misc errors related to golang binaries +Package-Architecture: any diff --git a/t/recipes/checks/languages/golang/built-using/binaries-golang/build-spec/orig/Makefile b/t/recipes/checks/languages/golang/built-using/binaries-golang/build-spec/orig/Makefile new file mode 100644 index 0000000..f04b342 --- /dev/null +++ b/t/recipes/checks/languages/golang/built-using/binaries-golang/build-spec/orig/Makefile @@ -0,0 +1,16 @@ +NOPIE_CFLAGS = $(filter-out -fPIE,$(CFLAGS)) +NOPIE_LDFLAGS = $(filter-out -fPIE -pie,$(LDFLAGS)) +COMPILE:= $(CC) $(NOPIE_CFLAGS) $(CPPFLAGS) $(NOPIE_LDFLAGS) + +all: + # static version + $(COMPILE) -static -o basic.static basic.c + +install: + install -d $(DESTDIR)/usr/lib/foo/ + install -m 755 basic.static $(DESTDIR)/usr/lib/foo/static + +clean distclean: + rm -f basic + +check test: diff --git a/t/recipes/checks/languages/golang/built-using/binaries-golang/build-spec/orig/basic.c b/t/recipes/checks/languages/golang/built-using/binaries-golang/build-spec/orig/basic.c new file mode 100644 index 0000000..7dea5a0 --- /dev/null +++ b/t/recipes/checks/languages/golang/built-using/binaries-golang/build-spec/orig/basic.c @@ -0,0 +1,12 @@ +#include <stdio.h> + +int +main(void) +{ + char t[10]; + printf("Hello world!\n"); + /* Bad choice for reading from stdin, but it forces a stack + protector, so meh. + */ + gets (t); +} diff --git a/t/recipes/checks/languages/golang/built-using/binaries-golang/eval/desc b/t/recipes/checks/languages/golang/built-using/binaries-golang/eval/desc new file mode 100644 index 0000000..af9fa03 --- /dev/null +++ b/t/recipes/checks/languages/golang/built-using/binaries-golang/eval/desc @@ -0,0 +1,2 @@ +Testname: binaries-golang +Check: languages/golang/built-using diff --git a/t/recipes/checks/languages/golang/built-using/binaries-golang/eval/hints b/t/recipes/checks/languages/golang/built-using/binaries-golang/eval/hints new file mode 100644 index 0000000..52f68b9 --- /dev/null +++ b/t/recipes/checks/languages/golang/built-using/binaries-golang/eval/hints @@ -0,0 +1 @@ +binaries-golang (source): missing-built-using-field-for-golang-package (in section for binaries-golang) [debian/control:10] |