On 2021/03/31 23:53, Julian Foad wrote:
>> I've commited the former of above candidates (using script_dir at runtime).
> 
> Hello.  I just noticed this change makes some tests fail for me.  I am using 
> an out-of-tree build.  What seems to be happening is it is now building 
> "subversion/tests/cmdline/svneditor.sh" in the obj-dir (which is not in the 
> source tree) but then at test-running time it is searching for 
> "subversion/tests/cmdline/svneditor.sh" in the source tree, and not finding 
> it.  (Only the ".in" version of that file is in the source tree.)
> 
> Would you be able to check and fix this?

Ah, thank you for the report. I confirmed the issue.

Here is a patch addressing it.

[[[
Follow up to r188732: Fix the invocation of svneditor.sh on out of tree build.

* subversion/tests/cmdline/svneditor.sh.in ():
  Specify the absolute path for svneditor.py, instead of relative path from
  the script on execution.

* subversion/tests/cmdline/svntest/main.py (svneditor_script):
  Build the absolute path by using absolute path of current working directory
  on execution, like entries-dump or lock-helper, instead of using path of
  module self.

Index: subversion/tests/cmdline/svneditor.sh.in
===================================================================
--- subversion/tests/cmdline/svneditor.sh.in    (revision 1887713)
+++ subversion/tests/cmdline/svneditor.sh.in    (working copy)
@@ -25,5 +25,4 @@
 #    under the License.
 ######################################################################
 
-script_dir=`dirname "$0"`
-exec @PYTHON@ "$script_dir"/svneditor.py "$@"
+exec @PYTHON@ "@abs_srcdir@"/svneditor.py "$@"
Index: subversion/tests/cmdline/svntest/main.py
===================================================================
--- subversion/tests/cmdline/svntest/main.py    (revision 1887713)
+++ subversion/tests/cmdline/svntest/main.py    (working copy)
@@ -129,7 +129,10 @@ else:
 if windows:
   svneditor_script = os.path.join(sys.path[0], 'svneditor.bat')
 else:
-  svneditor_script = os.path.join(sys.path[0], 'svneditor.sh')
+  # This script is in the build tree, not in the source tree.  
+  svneditor_script = os.path.join(os.path.dirname(
+                                      os.path.dirname(os.path.abspath('.'))),
+                                  'tests/cmdline/svneditor.sh')
 
 # Username and password used by the working copies
 wc_author = 'jrandom'
]]]

Cheers,
-- 
Yasuhito FUTATSUKI <futat...@yf.bsclub.org>

Reply via email to