From 7699cf5ad7ef9538b2796373e9ad2ee690936b0c Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 7 Feb 2022 06:16:33 +0100 Subject: [PATCH] Import a test for Golang --- tests/golang/Makefile.NetBSD | 41 ++++++++++++++++++++++++++++++++++++ tests/golang/project.conf | 10 +++++++++ tests/project.conf | 4 ++-- tests/tests.sh | 1 + 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 tests/golang/Makefile.NetBSD create mode 100644 tests/golang/project.conf diff --git a/tests/golang/Makefile.NetBSD b/tests/golang/Makefile.NetBSD new file mode 100644 index 0000000..1cdfd15 --- /dev/null +++ b/tests/golang/Makefile.NetBSD @@ -0,0 +1,41 @@ +TARGETS = $(OBJDIR)main$(EXEEXT) $(OBJDIR)app$(EXEEXT) +OBJDIR = +PREFIX = /usr/local +DESTDIR = +BINDIR = $(PREFIX)/bin +SBINDIR = $(PREFIX)/sbin +GO = go +GOFLAGSF= +GOFLAGS = +EXEEXT = +RM = rm -f +LN = ln -f +MKDIR = mkdir -m 0755 -p +INSTALL = install + + +all: $(TARGETS) + +main_OBJS = +main_GOFLAGS = $(GOFLAGSF) $(GOFLAGS) -gcflags -S + +$(OBJDIR)main$(EXEEXT): main.go + $(GO) build $(main_GOFLAGS) -o $(OBJDIR)main$(EXEEXT) main.go + +app_OBJS = +app_GOFLAGS = $(GOFLAGSF) $(GOFLAGS) + +$(OBJDIR)app$(EXEEXT): app.go common.go + $(GO) build $(app_GOFLAGS) -o $(OBJDIR)app$(EXEEXT) app.go common.go + +clean: + $(RM) -- $(main_OBJS) $(app_OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +install: all + +uninstall: + +.PHONY: all clean distclean install uninstall diff --git a/tests/golang/project.conf b/tests/golang/project.conf new file mode 100644 index 0000000..9b99fce --- /dev/null +++ b/tests/golang/project.conf @@ -0,0 +1,10 @@ +targets=main,app + +[main] +type=binary +goflags=-gcflags -S +sources=main.go + +[app] +type=binary +sources=app.go,common.go diff --git a/tests/project.conf b/tests/project.conf index 06165a7..55a5a30 100644 --- a/tests/project.conf +++ b/tests/project.conf @@ -1,6 +1,6 @@ subdirs=gtkdoc targets=clint.log,coverage.log,distcheck.log,fixme.log,htmllint.log,markdown.1,markdown.html,markdown.pdf,markdown.rst,phplint.log,pylint.log,shlint.log,template-test.md,template-test.xml,tests.log,xmllint.log -dist=Makefile,binary/project.conf,binary/Makefile.Darwin,binary/Makefile.DeforaOS,binary/Makefile.NetBSD,binary/Makefile.Windows,command/project.conf,command/Makefile.NetBSD,config.sh,include/project.conf,include/Makefile.NetBSD,java/project.conf,java/Makefile.NetBSD,library/project.conf,library/Makefile.Darwin,library/Makefile.Linux,library/Makefile.NetBSD,library/Makefile.Windows,libtool/project.conf,libtool/Makefile.Darwin,libtool/Makefile.Linux,libtool/Makefile.NetBSD,libtool/Makefile.Windows,markdown.md,markdown.style,mode/project.conf,mode/Makefile.NetBSD,object/project.conf,object/Makefile.NetBSD,package/project.conf,package/Makefile.NetBSD,package/config.ent.NetBSD,package/config.h.NetBSD,package/config.sh.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD,template.md.in,template.xml.in,test.db,tests.sh,verilog/project.conf,verilog/Makefile.NetBSD +dist=Makefile,binary/project.conf,binary/Makefile.Darwin,binary/Makefile.DeforaOS,binary/Makefile.NetBSD,binary/Makefile.Windows,command/project.conf,command/Makefile.NetBSD,config.sh,include/project.conf,include/Makefile.NetBSD,golang/project.conf,golang/Makefile.NetBSD,java/project.conf,java/Makefile.NetBSD,library/project.conf,library/Makefile.Darwin,library/Makefile.Linux,library/Makefile.NetBSD,library/Makefile.Windows,libtool/project.conf,libtool/Makefile.Darwin,libtool/Makefile.Linux,libtool/Makefile.NetBSD,libtool/Makefile.Windows,markdown.md,markdown.style,mode/project.conf,mode/Makefile.NetBSD,object/project.conf,object/Makefile.NetBSD,package/project.conf,package/Makefile.NetBSD,package/config.ent.NetBSD,package/config.h.NetBSD,package/config.sh.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD,template.md.in,template.xml.in,test.db,tests.sh,verilog/project.conf,verilog/Makefile.NetBSD #targets [clint.log] @@ -91,7 +91,7 @@ depends=template.xml.in,test.db,../src/scripts/tools/template.sh,../config.sh type=script script=./tests.sh enabled=0 -depends=$(OBJDIR)../tools/configure$(EXEEXT),binary/project.conf,binary/Makefile.Darwin,binary/Makefile.DeforaOS,binary/Makefile.NetBSD,binary/Makefile.Windows,command/project.conf,command/Makefile.NetBSD,include/project.conf,include/Makefile.NetBSD,java/project.conf,java/Makefile.NetBSD,library/project.conf,library/Makefile.Darwin,library/Makefile.Linux,library/Makefile.NetBSD,library/Makefile.Windows,libtool/project.conf,libtool/Makefile.Darwin,libtool/Makefile.Linux,libtool/Makefile.NetBSD,libtool/Makefile.Windows,mode/project.conf,mode/Makefile.NetBSD,object/project.conf,object/Makefile.NetBSD,package/project.conf,package/Makefile.NetBSD,package/config.ent.NetBSD,package/config.h.NetBSD,package/config.sh.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD,verilog/project.conf,verilog/Makefile.NetBSD,tests.sh +depends=$(OBJDIR)../tools/configure$(EXEEXT),binary/project.conf,binary/Makefile.Darwin,binary/Makefile.DeforaOS,binary/Makefile.NetBSD,binary/Makefile.Windows,command/project.conf,command/Makefile.NetBSD,include/project.conf,include/Makefile.NetBSD,golang/project.conf,golang/Makefile.NetBSD,java/project.conf,java/Makefile.NetBSD,library/project.conf,library/Makefile.Darwin,library/Makefile.Linux,library/Makefile.NetBSD,library/Makefile.Windows,libtool/project.conf,libtool/Makefile.Darwin,libtool/Makefile.Linux,libtool/Makefile.NetBSD,libtool/Makefile.Windows,mode/project.conf,mode/Makefile.NetBSD,object/project.conf,object/Makefile.NetBSD,package/project.conf,package/Makefile.NetBSD,package/config.ent.NetBSD,package/config.h.NetBSD,package/config.sh.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD,verilog/project.conf,verilog/Makefile.NetBSD,tests.sh [xmllint.log] type=script diff --git a/tests/tests.sh b/tests/tests.sh index 81e8e04..d2bef53 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -93,6 +93,7 @@ _tests() _test "NetBSD" "binary" || ret=2 _test "NetBSD" "command" || ret=2 _test "NetBSD" "include" || ret=2 + _test "NetBSD" "golang" || ret=2 _test "NetBSD" "java" || ret=2 _test "NetBSD" "library" || ret=2 _test "NetBSD" "libtool" || ret=2