From 7b866744951dd6d5e9c7fa982b1f5672d653feb4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 16 Apr 2024 21:23:19 +0200 Subject: Adding debian version 1.20.14-2. Signed-off-by: Daniel Baumann --- debian/tests/control | 7 +++++++ debian/tests/hello-world | 20 ++++++++++++++++++++ debian/tests/regression-test | 8 ++++++++ 3 files changed, 35 insertions(+) create mode 100644 debian/tests/control create mode 100644 debian/tests/hello-world create mode 100644 debian/tests/regression-test (limited to 'debian/tests') diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..9bf42b2 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,7 @@ +Tests: hello-world +Depends: @, build-essential +Restrictions: allow-stderr, superficial + +Tests: regression-test +Depends: @, build-essential +Restrictions: allow-stderr diff --git a/debian/tests/hello-world b/debian/tests/hello-world new file mode 100644 index 0000000..1b8be0d --- /dev/null +++ b/debian/tests/hello-world @@ -0,0 +1,20 @@ +#!/bin/sh + +set -ex + +GO="/usr/lib/go-$(dpkg-parsechangelog -SSource | sed 's/golang-//')/bin/go" + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR +cat < hello.go +package main +import "fmt" +func main() { + fmt.Println("hello world") +} +EOF + +$GO run hello.go +$GO build hello.go +./hello diff --git a/debian/tests/regression-test b/debian/tests/regression-test new file mode 100644 index 0000000..00c12a1 --- /dev/null +++ b/debian/tests/regression-test @@ -0,0 +1,8 @@ +#!/bin/sh + +set -ex + +VER="$(dpkg-parsechangelog -SSource | sed 's/golang-//')" + +cd "/usr/lib/go-$VER/test" +"/usr/lib/go-$VER/bin/go" run run.go -v -- cgit v1.2.3