mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 04:16:46 +02:00
community/syncthing: fix tests
This commit is contained in:
parent
de7df9fd24
commit
cbc4d878e9
@ -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"
|
||||
|
||||
14
community/syncthing/only-test-with-race-when-provided.patch
Normal file
14
community/syncthing/only-test-with-race-when-provided.patch
Normal file
@ -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:
|
||||
Loading…
x
Reference in New Issue
Block a user