Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #19 from schibsted/gcc-9
Browse files Browse the repository at this point in the history
Add fixes for GCC 9 and Go 1.14.
  • Loading branch information
perj authored Apr 14, 2020
2 parents 641c355 + c460a2b commit 081dab2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
9 changes: 8 additions & 1 deletion core/test/sapp/sapp-tests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"net/http/httptrace"
"os"
"os/exec"
"runtime"

"github.com/schibsted/sebase/core/pkg/fd_pool"
"github.com/schibsted/sebase/core/pkg/sapp"
Expand All @@ -21,7 +22,9 @@ var app sapp.Sapp
const dialDomain = "foobar"
const bodyOk = "Hello, world!\n"
const bodyDenied = "Forbidden by ACL\n"
const getFailLog = "client.Do failed: Get https://sapp-test-server-log.foobar:8080/panic: EOF"
const getFailLog113 = "client.Do failed: Get https://sapp-test-server-log.foobar:8080/panic: EOF"

var getFailLog = `client.Do failed: Get "https://sapp-test-server-log.foobar:8080/panic": EOF`

func main() {
app.Flags("", true)
Expand All @@ -31,6 +34,10 @@ func main() {

app.Pool.SetDialDomain(dialDomain)

if runtime.Version() < "go1.14" {
getFailLog = getFailLog113
}

var tests = []struct {
service string
method string
Expand Down
2 changes: 2 additions & 0 deletions plog/plugins/elasticsearch/Builddesc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
GOMODULE(elasticsearch
enabled::!nocgo[]
destdir[lib/plogd/plugins]
)

GOTEST(sebase-plog-elasticsearch
enabled::!nocgo[]
)
4 changes: 2 additions & 2 deletions test/test.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ FROM ubuntu:xenial
ENV PATH=/root/go/bin:/usr/local/go/bin:$PATH

RUN apt-get update && apt-get install -y curl etcd g++ gcc git gperf jq libbsd-dev libcurl4-openssl-dev libicu-dev libpcre3-dev libssl-dev libyajl-dev make ninja-build protobuf-c-compiler python && apt-get clean
RUN curl https://dl.google.com/go/go1.12.5.linux-amd64.tar.gz | tar -C /usr/local -xzf -
RUN go get github.com/schibsted/sebuild/cmd/seb
RUN curl https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz | tar -C /usr/local -xzf -
RUN GO111MODULE=on go get github.com/schibsted/sebuild/v2/cmd/seb
# Python is only needed for test, should try to remove it maybe.

# Trick etcd into sending systemd notifications like we want.
Expand Down
3 changes: 3 additions & 0 deletions util/lib/Builddesc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ LIB(sebase-util
libs::linux[
bsd
]
srcopts::gcc[
aes.c:-Wno-stringop-truncation
]
)
2 changes: 1 addition & 1 deletion util/test/string-functions/str.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test_p(void) {

if ((res = strstrptrs(haystack, needle, needle + strlen(needle), ":")) != NULL)
return 0;
fprintf(stderr, "Non-match failed (%s)\n", res);
fprintf(stderr, "Non-match failed\n");
return 1;
}

Expand Down

0 comments on commit 081dab2

Please sign in to comment.