Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
/stamp-h1
/src/python/location-query
/test.db
+/testdata.db
cd $(builddir)/src/perl && $(MAKE)
.PHONY: check-perl
-check-perl:
- cd $(builddir)/src/perl && $(MAKE) test srcdir=$(abs_srcdir)
+check-perl: testdata.db
+ cd $(builddir)/src/perl && $(MAKE) test database="../../$<"
.PHONY: install-perl
install-perl:
src/test-network
CLEANFILES += \
- test.db
+ test.db \
+ testdata.db
-EXTRA_DIST += \
- testdata/test.db
+testdata.db: examples/python/create-database.py
+ PYTHONPATH=$(abs_builddir)/src/python/.libs $(PYTHON) $< $@
check_PROGRAMS = \
src/test-libloc \
#!/usr/bin/python3
import location
+import sys
w = location.Writer()
print(n)
# Write the database to disk
-w.write("test.db")
+for f in sys.argv[1:]:
+ w.write(f)
use warnings;
# Where to find the test database.
-my $testdb = "$ENV{'srcdir'}/testdata/test.db";
+my $testdb = $ENV{'database'};
use Test::More tests => 5;
BEGIN { use_ok('Location') };
+++ /dev/null
-The database in this folder can be used to run various tests against it and
-has been created by using the "create-database.py" script in the examples directory.
-
-It contains the following content:
-
-Vendor: "IPFire Project"
-Description: "This is a geo location database"
-License: "CC"
-
-AS: "AS204867 (Lightning Wire Labs GmbH)"
-Subnet: "2a07:1c44:5800::/40"
-Country Code: "DE"