aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-11-12 13:32:27 +0100
committerOliver Smith <osmith@sysmocom.de>2019-11-12 13:39:00 +0100
commit4359b885d4521fb4b9e6a9b4eae579d0ae857260 (patch)
tree252700c50200db84d5bfd335cac86f864b6855ad /tests
parent5b65461d686327ead0cb2a6d8493dfa9173d376c (diff)
tests/db_upgrade: disable for old sqlite versions
Skip the test if the installed sqlite version is older than 3.16.2 (current version of debian 9). This prevents test failures caused by the way we dump tables in the test, which does not work with older versions. This patch is a middle ground between reverting the db upgrade patch, and spending lots of time to replace the table dumping code with something that works with old sqlite versions to fix current build failures in OBS. Usually version checking is done in configure.ac, however I could not find a good way to pass the result to testsuite.at. So I decided to use pkg-config to do the test there. Fixes: 5b65461d686327ead0cb2a6d8493dfa9173d376c ("add db_upgrade test") Related: https://lists.osmocom.org/pipermail/openbsc/2019-November/013063.html Change-Id: I348c133003a95badbd6807d1519aa669115872fb
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.at3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index a8efe42..bd758c9 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -37,7 +37,10 @@ sqlite3 db_test.db < $abs_top_srcdir/sql/hlr.sql
AT_CHECK([$abs_top_builddir/tests/db/db_test], [], [expout], [experr])
AT_CLEANUP
+# AT_SKIP_IF: disable for old sqlite versions, because the way we dump tables in the test doesn't work with it.
+# https://lists.osmocom.org/pipermail/openbsc/2019-November/013063.html
AT_SETUP([db_upgrade])
+AT_SKIP_IF([ ! pkg-config sqlite3 --exists --atleast-version=3.16.2 ])
AT_KEYWORDS([db_upgrade])
cat $abs_srcdir/db_upgrade/db_upgrade_test.ok > expout
cat $abs_srcdir/db_upgrade/db_upgrade_test.err > experr