aboutsummaryrefslogtreecommitdiffstats
path: root/community/syncthing
diff options
context:
space:
mode:
authorShiz <hi@shiz.me>2017-05-12 21:35:25 +0200
committerShiz <hi@shiz.me>2017-05-12 21:35:25 +0200
commitcbc4d878e9cefa5e0913e61bd41caac2c723e5ed (patch)
treeec2b26daed86d0d863ded80cb099a14c03ad15b1 /community/syncthing
parentde7df9fd249f488ec141ce01c871912581cae506 (diff)
community/syncthing: fix tests
Diffstat (limited to 'community/syncthing')
-rw-r--r--community/syncthing/APKBUILD10
-rw-r--r--community/syncthing/only-test-with-race-when-provided.patch14
2 files changed, 19 insertions, 5 deletions
diff --git a/community/syncthing/APKBUILD b/community/syncthing/APKBUILD
index 15b204d4218..669600400d6 100644
--- a/community/syncthing/APKBUILD
+++ b/community/syncthing/APKBUILD
@@ -18,7 +18,8 @@ options="!strip"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
$pkgname.confd
- $pkgname.initd"
+ $pkgname.initd
+ only-test-with-race-when-provided.patch"
builddir="$srcdir/src/github.com/$pkgname/$pkgname"
@@ -37,11 +38,9 @@ build() {
go run build.go -no-upgrade -version=v$pkgver
}
-# race check fails with musl
check() {
cd "$builddir"
- # race test will fail due to hardcoded glibc dependency
- go run build.go -no-upgrade test || true
+ go run build.go -no-upgrade test
}
package() {
@@ -62,4 +61,5 @@ utils() {
sha512sums="438d3385dc3b9737bc0ec275462b9dc41a630b353443061fddb9e48b184b5cb39e3ccf144fef4e30f4523d1c6a96f2a8a9d87bc27e9734b1f7d7d462c9c15e51 syncthing-0.14.27.tar.gz
b19cc3d802caa33f4d06852de590d2d984c12cf27d0540162cd7195da4f3f149c83c72e7a10f385b32b27fff6f39d33698e7402442a3f32a9da136c5d19059ae syncthing.confd
-21fa7b0090e579ad0f02bb8cc9a78736eb99811613823bf12d477262da2281543d07b47ae0888e2e3876a687bf4cab3c89405447373a9c5ab2915989c5f9dce8 syncthing.initd"
+21fa7b0090e579ad0f02bb8cc9a78736eb99811613823bf12d477262da2281543d07b47ae0888e2e3876a687bf4cab3c89405447373a9c5ab2915989c5f9dce8 syncthing.initd
+3fd2b699e07891ae16c67af56d516ba0fde13d5e5d067dd680fc59f9fc5b2f7c5f685b040841588cca6de1f7fb4b094572e5eb73dda8ab30d4b2994d3f526047 only-test-with-race-when-provided.patch"
diff --git a/community/syncthing/only-test-with-race-when-provided.patch b/community/syncthing/only-test-with-race-when-provided.patch
new file mode 100644
index 00000000000..5b8e4c7f4b5
--- /dev/null
+++ b/community/syncthing/only-test-with-race-when-provided.patch
@@ -0,0 +1,14 @@
+Only use -race when -race is also given to build.go on the command line:
+x86_64 musl targets do not support the Go race runtime.
+diff -Nru a/build.go b/build.go
+--- a/build.go 2017-04-15 07:38:23.000000000 +0000
++++ b/build.go 2017-05-12 19:26:36.982569748 +0000
+@@ -379,7 +379,7 @@
+ func test(pkgs ...string) {
+ lazyRebuildAssets()
+
+- useRace := runtime.GOARCH == "amd64"
++ useRace := race && runtime.GOARCH == "amd64"
+ switch runtime.GOOS {
+ case "darwin", "linux", "freebsd", "windows":
+ default: