subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1674522 - in /subversion/trunk/subversion/tests/cmdline: svntest/wc.py upgrade_tests.py
Date Sat, 18 Apr 2015 14:54:33 GMT
Author: rhuijben
Date: Sat Apr 18 14:54:33 2015
New Revision: 1674522

URL: http://svn.apache.org/r1674522
Log:
Make pythons linked against an old sqlite3 version skip the tests that would
fail because python can't read wc.db.

* subversion/tests/cmdline/svntest/wc.py
  (python_sqlite_can_read_wc): Add test function.

* subversion/tests/cmdline/upgrade_tests.py
  (auto_analyze): Add annotation.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/wc.py
    subversion/trunk/subversion/tests/cmdline/upgrade_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/wc.py?rev=1674522&r1=1674521&r2=1674522&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Sat Apr 18 14:54:33 2015
@@ -980,6 +980,20 @@ def svn_uri_quote(url):
 
 # ------------
 
+def python_sqlite_can_read_wc():
+  """Check if the Python builtin is capable enough to peek into wc.db"""
+
+  try:
+    db = svntest.sqlite3.connect('')
+
+    c = db.cursor()
+    c.execute('select sqlite_version()')
+    ver = tuple(map(int, c.fetchall()[0][0].split('.')))
+
+    return ver >= (3, 6, 18) # Currently enough (1.7-1.9)
+  except:
+    return False
+
 def open_wc_db(local_path):
   """Open the SQLite DB for the WC path LOCAL_PATH.
      Return (DB object, WC root path, WC relpath of LOCAL_PATH)."""

Modified: subversion/trunk/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/upgrade_tests.py?rev=1674522&r1=1674521&r2=1674522&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/upgrade_tests.py Sat Apr 18 14:54:33 2015
@@ -1438,6 +1438,7 @@ def upgrade_1_7_dir_external(sbox):
   # svn: warning: W200033: sqlite[S5]: database is locked
   svntest.actions.run_and_verify_svn(None, [], 'upgrade', sbox.wc_dir)
 
+@SkipUnless(svntest.wc.python_sqlite_can_read_wc)
 def auto_analyze(sbox):
   """automatic SQLite ANALYZE"""
 



Mime
View raw message