Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is run-test.py itself broken? #20

Open
futatuki opened this issue Dec 15, 2021 · 4 comments
Open

Is run-test.py itself broken? #20

futatuki opened this issue Dec 15, 2021 · 4 comments

Comments

@futatuki
Copy link

When I ran 'python2.7 ./run-test.py' I always got:

W: Couldn't find node 'transaction...' in expected output tree
W:  * Node name:   transaction...
    Path:       __SVN_ROOT_NODE/transaction...
    Contents:   None
    Properties: {}
    Attributes: {'verb': 'Committing'}
    Children:  None (node is probably a file)

W: ERROR:  output of import command is unexpected.
W: EXPECTED OUTPUT TREE:
W: ROOT
  +-- svn-test-work
        +-- local_tmp
              +-- greekfiles
                    |-- A
                    |     |-- B
                    |     |     |-- E
                    |     |     |     |-- alpha
                    |     |     |     +-- beta
                    |     |     |-- F
                    |     |     +-- lambda
                    |     |-- C
                    |     |-- D
                    |     |     |-- G
                    |     |     |     |-- pi
                    |     |     |     |-- rho
                    |     |     |     +-- tau
                    |     |     |-- H
                    |     |     |     |-- chi
                    |     |     |     |-- omega
                    |     |     |     +-- psi
                    |     |     +-- gamma
                    |     +-- mu
                    +-- iota

W: ACTUAL OUTPUT TREE:
W: ROOT
  |-- svn-test-work
  |     +-- local_tmp
  |           +-- greekfiles
  |                 |-- A
  |                 |     |-- B
  |                 |     |     |-- E
  |                 |     |     |     |-- alpha
  |                 |     |     |     +-- beta
  |                 |     |     |-- F
  |                 |     |     +-- lambda
  |                 |     |-- C
  |                 |     |-- D
  |                 |     |     |-- G
  |                 |     |     |     |-- pi
  |                 |     |     |     |-- rho
  |                 |     |     |     +-- tau
  |                 |     |     |-- H
  |                 |     |     |     |-- chi
  |                 |     |     |     |-- omega
  |                 |     |     |     +-- psi
  |                 |     |     +-- gamma
  |                 |     +-- mu
  |                 +-- iota
  +-- transaction...

on FreeBSD 13 with Subversion 1.14.1, CentOS 7 with Subversion 1.14.1 and Scientific Linux with Subversion 1.9.7.

Even after I modified run-test.py with patch below, the behaiviour is not changed.

diff --git a/run-tests.py b/run-tests.py
index 7eaee08..cf9536f 100755
--- a/run-tests.py
+++ b/run-tests.py
@@ -935,6 +935,7 @@ class Cvs2SvnPropertiesTestCase(Cvs2SvnTestCase):
 @Cvs2SvnTestFunction
 def show_usage():
   "cvs2svn with no arguments shows usage"
+  raise Failure('Dummy failure.')
   out = run_script(cvs2svn, None)
   if (len(out) > 2 and out[0].find('ERROR:') == 0
       and out[1].find('DBM module')):
@@ -4310,7 +4311,8 @@ if __name__ == '__main__':
   svntest.main.svnadmin_binary    = svnadmin_binary
   svntest.main.svnversion_binary  = svnversion_binary
 
-  svntest.main.run_tests(test_list)
+  #svntest.main.run_tests(test_list)
+  svntest.main.run_tests([None, show_usage,])
   # NOTREACHED
 
 

Are there something wrong in my usage of run-test.py? Or is run-test.py itself broken now?

@futatuki
Copy link
Author

After updating svntest/ by copying from Subversion's source tree (trunk, r1895425), 'python2.7 run-test.py shows:

Traceback (most recent call last):
  File "run-tests.py", line 4340, in <module>
    svntest.main.run_tests(test_list)
  File "/home/futatuki/work/cvs2svn/svntest/main.py", line 2346, in run_tests
    sys.exit(execute_tests(test_list, serial_only))
  File "/home/futatuki/work/cvs2svn/svntest/main.py", line 2596, in execute_tests
    svntest.actions.setup_pristine_repositories()
  File "/home/futatuki/work/cvs2svn/svntest/actions.py", line 139, in setup_pristine_repositories
    main.pristine_greek_repos_url)
  File "/home/futatuki/work/cvs2svn/svntest/actions.py", line 75, in _setup_pristine_repo
    main.create_repos(repos_dir)
  File "/home/futatuki/work/cvs2svn/svntest/main.py", line 1210, in create_repos
    raise SVNRepositoryCreateFailure("".join(stderr).rstrip())
svntest.main.SVNRepositoryCreateFailure: svnadmin: E200007: Cannot guarantee compatibility beyond the current running version (1.14.1)

Is it need to run the test that Subversion older than 1.9?

@futatuki
Copy link
Author

It turned out that run-test.py uses 'bdb' type fs in Subversion repos.

With updated svntest tree and Subversion trunk(r1895939) binaries built with bdb support (although it is deprecated), I could run run-test.py successfully with 'FAIL: run-tests.py 42: non ascii files in .cvsignore'

Without updated svntest and Subversion trunk(r1895939) binaries built with bdb support, the result is just same as top comment.

Anyways, it seems some modification in test suites is needed to run it on environments nowadays.

@futatuki
Copy link
Author

futatuki commented Dec 16, 2021

On Scientific Linux with Subversion 1.9.7 and Python 2.7 environment, run-test.py with latest svntest (r1895939) shows exception like #20 (comment) but 'running version (1.9.7)'

However, with svntest on Subversion 1.9.7 (built with bdb support), I could run 'python2.7 run-test.py' successfully (test 42, 132, 133 failed).

@futatuki
Copy link
Author

It turned out that run-test.py uses 'bdb' type fs in Subversion repos.

This was incorrect. It was caused by embeded SVN_VERMINOR = 15 in svntest/main.py.

If I overwrited the value with 9, I could run the test with Subversion 1.9 and 1.14, with latest svntest (r1895939).

I'll make a PR.

futatuki added a commit to futatuki/cvs2svn that referenced this issue Dec 16, 2021
…owadays.

* svntest/__init__.py, svntest/actions.py, svntest/factory.py,
  svntest/main.py, svntest/objects.py, svntest/sandbox.py,
  svntest/testcase.py, svntest/tree.py, svntest/verify.py,
  svntest/wc.py:
    Update the svntest subdirectory from

      http://svn.apache.org/repos/asf/subversion/trunk/subversion/tests/cmdline/svntest

    using svntest/update.sh.  Adjust run-tests.py for changes in svntest.

* runtest.py:
  - Adjust required version of Python 2.
  - Get the minor version of installed svn program and set it to
    svntest.main.SVN_VER_MINOR. This allows at least Subversion >= 1.9
    to run the test suites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant