Skip to content

Commit e85bb76

Browse files
committed
Merge branch 'master' into deploy
To bring in Fedora 35.
2 parents 844fbdd + b8bde4c commit e85bb76

7 files changed

Lines changed: 88 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ There are images for various toolchains, they are encoded in the distro name/ver
6262
- Ubuntu 20.04 `ubuntu@20.04`
6363
- Ubuntu 18.04 `ubuntu@18.04`
6464
- Ubuntu 16.04 `ubuntu@16.04`
65+
- Fedora 35 `fedora@35`
6566
- Fedora 34 `fedora@34`
6667
- Fedora 33 `fedora@33`
6768
- Fedora 32 `fedora@32`

build/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ docs@${1}@${2}: image@${1}@${2}
5757
DOCS += docs@${1}@${2}
5858
endef
5959

60-
FEDORA_DISTROS := fedora@34 fedora@33 fedora@32 fedora@31
60+
FEDORA_DISTROS := fedora@35 fedora@34 fedora@33 fedora@32 fedora@31
6161
UBUNTU_DISTROS := ubuntu@21.10 ubuntu@21.04 ubuntu@20.10 ubuntu@20.04 ubuntu@18.04 ubuntu@16.04
6262
KORG_DISTROS := korg@11.1.0 korg@10.3.0 korg@9.3.0 korg@8.1.0 korg@5.5.0
6363
ALL_DISTROS := ${UBUNTU_DISTROS} ${KORG_DISTROS} ${FEDORA_DISTROS}

tests/golang-build/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
go1.16.6.tar.gz
2+
go-go1.16.6

tests/golang-build/Makefile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
help:
2+
@echo "Golang build test"
3+
@echo "Available targets:"
4+
@echo " download # download required sources"
5+
@echo " prepare # download and install dependencies"
6+
@echo " test # run the test"
7+
8+
version = 1.16.6
9+
tarball = go${version}.tar.gz
10+
11+
download: ${tarball}
12+
13+
${tarball}:
14+
wget -O $@.tmp https://github.com/golang/go/archive/refs/tags/${tarball}
15+
mv $@.tmp $@
16+
17+
prepare: download
18+
@./install-deps.sh
19+
20+
test: download
21+
@./test.sh
22+
23+
clean:
24+
rm -rf go-go${version}
25+
26+
distclean: clean
27+
rm -f ${tarball}
28+
29+
.PHONY: download prepare test clean distclean help

tests/golang-build/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Golang build test
2+
=================
3+
4+
This just builds go version 1.16.6, and then makes sure we can a basic go
5+
program with the build toolchain.
6+
7+
Building this version of go tests the following kernel fixes:
8+
- `a88603f4b92e ("powerpc/vdso: Don't use r30 to avoid breaking Go lang")`
9+
- `4a5cb51f3db4 ("powerpc/64s/interrupt: Fix check_return_regs_valid() false positive")`

tests/golang-build/install-deps.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
. /etc/os-release
6+
7+
sudo=""
8+
if [[ $(id -u) != 0 ]]; then
9+
sudo="sudo"
10+
fi
11+
12+
if [[ "$ID" == "fedora" ]]; then
13+
(set -x; $sudo dnf -y install tar golang)
14+
elif [[ "$ID_LIKE" == "debian" ]]; then
15+
(set -x; $sudo apt-get -y install tar golang-go)
16+
else
17+
echo "Unsupported distro!" >&2
18+
exit 1
19+
fi

tests/golang-build/test.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
name="golang-build"
6+
echo "test: $name"
7+
8+
rc=0
9+
go version || rc=1
10+
if [[ $rc -ne 0 ]]; then
11+
echo "Error: go missing, install with package manager" >&2
12+
echo "failure: $name"
13+
exit 1
14+
fi
15+
16+
rm -rf go-go1.16.6
17+
tar -xf go1.16.6.tar.gz
18+
cd go-go1.16.6/src
19+
20+
echo "Building ..."
21+
./all.bash
22+
23+
../bin/go run ../test/helloworld.go
24+
25+
echo "success: $name"
26+
27+
exit 0

0 commit comments

Comments
 (0)