main/pure-maps: enable tests (MR 1917)
This commit is contained in:
parent
3ff6fc578b
commit
bf4cdd65c1
3 changed files with 75 additions and 4 deletions
|
@ -0,0 +1,23 @@
|
|||
From 86c41e3ea75d2be6a9ea328bf8eb7644441362f9 Mon Sep 17 00:00:00 2001
|
||||
From: Newbyte <newbie13xd@gmail.com>
|
||||
Date: Tue, 2 Feb 2021 13:18:17 +0100
|
||||
Subject: [PATCH 1/1] explicitly invoke python3 in check-json
|
||||
|
||||
python refers to python2 in some distributions which we don't want
|
||||
---
|
||||
tools/check-json | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/check-json b/tools/check-json
|
||||
index de0ee430..6e35395d 100755
|
||||
--- a/tools/check-json
|
||||
+++ b/tools/check-json
|
||||
@@ -3,4 +3,4 @@
|
||||
set -e
|
||||
|
||||
echo Checking "$1"
|
||||
-python -m json.tool "$1" > /dev/null || (echo Check failed && exit 255)
|
||||
+python3 -m json.tool "$1" > /dev/null || (echo Check failed && exit 255)
|
||||
--
|
||||
2.26.2
|
||||
|
40
main/pure-maps/0001-replace-jsonlint-with-json.tool.patch
Normal file
40
main/pure-maps/0001-replace-jsonlint-with-json.tool.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
From 413046fe7050de246cc94584d159830c95f3ba14 Mon Sep 17 00:00:00 2001
|
||||
From: Rinigus <rinigus.git@gmail.com>
|
||||
Date: Fri, 29 Jan 2021 22:34:29 +0200
|
||||
Subject: [PATCH 1/1] replace jsonlint with json.tool
|
||||
|
||||
As proposed by Newbyte
|
||||
---
|
||||
Makefile.test | 2 +-
|
||||
tools/check-json | 6 ++++++
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
create mode 100755 tools/check-json
|
||||
|
||||
diff --git a/Makefile.test b/Makefile.test
|
||||
index ef3ba60a..8f244a74 100644
|
||||
--- a/Makefile.test
|
||||
+++ b/Makefile.test
|
||||
@@ -4,7 +4,7 @@ all: check test
|
||||
|
||||
check:
|
||||
python3 -m pyflakes geocoders guides poor routers
|
||||
- find . -type f -name "*.json" -exec jsonlint -q {} \;
|
||||
+ find . -type f -name "*.json" -print0 | xargs -0 -n 1 tools/check-json
|
||||
|
||||
test:
|
||||
py.test geocoders guides poor routers
|
||||
diff --git a/tools/check-json b/tools/check-json
|
||||
new file mode 100755
|
||||
index 00000000..de0ee430
|
||||
--- /dev/null
|
||||
+++ b/tools/check-json
|
||||
@@ -0,0 +1,6 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+set -e
|
||||
+
|
||||
+echo Checking "$1"
|
||||
+python -m json.tool "$1" > /dev/null || (echo Check failed && exit 255)
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
# Maintainer: Bart Ribbers <bribbers@disroot.org>
|
||||
pkgname=pure-maps
|
||||
pkgver=2.4.1
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
_commit_geomag="8eb9a730c8643fb7d63fdee4fd9a195ee8ba4df2"
|
||||
pkgdesc="Maps and navigation"
|
||||
url="https://github.com/rinigus/pure-maps"
|
||||
|
@ -33,11 +33,13 @@ makedepends="
|
|||
qtchooser
|
||||
s2geometry-dev
|
||||
"
|
||||
checkdepends="py3-pytest"
|
||||
subpackages="$pkgname-lang"
|
||||
source="https://github.com/rinigus/pure-maps/archive/$pkgver/pure-maps-$pkgver.tar.gz
|
||||
https://github.com/rinigus/geomag/archive/$_commit_geomag/geomag-$_commit_geomag.tar.gz
|
||||
0001-replace-jsonlint-with-json.tool.patch
|
||||
0001-explicitly-invoke-python3-in-check-json.patch
|
||||
"
|
||||
options="!check" # Requires jsonlint which is not available
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
@ -52,7 +54,11 @@ build() {
|
|||
}
|
||||
|
||||
check() {
|
||||
make test
|
||||
# We can't use Makefile.test because we need to disable some tests
|
||||
make -f Makefile.test check
|
||||
# Disabled as they require API keys to be present
|
||||
py.test -k 'not test_geocode and not test_autocomplete_type and not test_nearby' geocoders guides poor routers
|
||||
py.test poor/test/delayed_test_config.py
|
||||
}
|
||||
|
||||
package() {
|
||||
|
@ -64,4 +70,6 @@ package() {
|
|||
}
|
||||
|
||||
sha512sums="4a7a3bbb9b573abdd7b6e1f837eafcce3a732c1b330de4df813f197d8e3a3ebf33d47b81fd75c9d8f49041b5a3fbf27efd773111f38e4465b8d4930cfe90ec93 pure-maps-2.4.1.tar.gz
|
||||
13e11b6cb35162315deb86c6c6240a3555760397d7aa88ac9c3348d476e9e9547b03210134119c60790511489e3f2a13afb93a3c77d40b1258c664b6fcc0425c geomag-8eb9a730c8643fb7d63fdee4fd9a195ee8ba4df2.tar.gz"
|
||||
13e11b6cb35162315deb86c6c6240a3555760397d7aa88ac9c3348d476e9e9547b03210134119c60790511489e3f2a13afb93a3c77d40b1258c664b6fcc0425c geomag-8eb9a730c8643fb7d63fdee4fd9a195ee8ba4df2.tar.gz
|
||||
01344056bc0cfb23205bd75022177cd6cc680055cab5ee64895c894264b539de6697b97bec11fc6de18baf7b048930d16f422527635b2dcd35382a9228b8f397 0001-replace-jsonlint-with-json.tool.patch
|
||||
39ddddb31b37c74fcac9b7f3263a2d04893673d21eb8fecb353d8a3047cb314cc50f973089ae6472afed2714800ed9b98c16c92ae78fc908ff6a92fb9bfa82f1 0001-explicitly-invoke-python3-in-check-json.patch"
|
||||
|
|
Loading…
Reference in a new issue