On Thu, Jul 11, 2013 at 07:28:03AM -0400, James McCoy wrote: > On Tue, Jul 09, 2013 at 09:58:06PM +0200, Bram Moolenaar wrote: > > > > Patch 7.4a.010 > > Problem: Test 86 and 97 fail when building with Python or Python 3 and > > using a static library. > > Solution: Add configure check to add -fPIE compiler flag. > > Files: src/configure.in, src/auto/configure > > test86 is still failing for me, although not as bad as before, after > this patch. I get the below diff. The first hunk is because the test > isn't handling being run from a shadowdir. Not sure about the rest.
It was all due, in various ways, to the use of a shadow build directory. Attached patch fixes the remaining issues I've seen with building in a shadow directory. Cheers, -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]>
--- a/src/testdir/test89.in
+++ b/src/testdir/test89.in
@@ -51,7 +51,10 @@
:$put h
:"
:let cwd=getcwd()
-:cd ../..
+:cd ..
+:" Tests may be run from a shadow directory, so an extra cd needs to be done to
+:" get above src/
+:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif
:$put =''
:$put ='Testing findfile'
:$put =''
--- a/src/testdir/test86.in
+++ b/src/testdir/test86.in
@@ -857,8 +857,19 @@
cb.append(fnamemodify('.', ':p:h:t'))
cb.append(vim.eval('@%'))
os.chdir('..')
-cb.append(fnamemodify('.', ':p:h:t'))
-cb.append(vim.eval('@%').replace(os.path.sep, '/'))
+path = fnamemodify('.', ':p:h:t')
+if path != 'src':
+ # Running tests from a shadow directory, so move up another level
+ # This will result in @% looking like shadow/testdir/test86.in, hence the
+ # extra fnamemodify
+ os.chdir('..')
+ cb.append(fnamemodify('.', ':p:h:t'))
+ cb.append(fnamemodify(vim.eval('@%'), ':s?^%s.??' % path).replace(os.path.sep, '/'))
+ os.chdir(path)
+ del path
+else:
+ cb.append(fnamemodify('.', ':p:h:t'))
+ cb.append(vim.eval('@%').replace(os.path.sep, '/'))
os.chdir('testdir')
cb.append(fnamemodify('.', ':p:h:t'))
cb.append(vim.eval('@%'))
--- a/src/Makefile
+++ b/src/Makefile
@@ -2366,6 +2366,7 @@
../../testdir/vimrc.unix \
../../testdir/*.in \
../../testdir/*.vim \
+ ../../testdir/python* \
../../testdir/test83-tags? \
../../testdir/*.ok .
signature.asc
Description: Digital signature
