]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Fix errors when executing --create-megatestdir.
authorCollin Funk <collin.funk1@gmail.com>
Thu, 7 Mar 2024 11:11:55 +0000 (03:11 -0800)
committerBruno Haible <bruno@clisp.org>
Thu, 7 Mar 2024 11:49:32 +0000 (12:49 +0100)
* pygnulib/GLTestDir.py (GLMegaTestDir.execute): Create a testdir for
each module in its own subdirectory. Create a testdir with all modules
in 'ALL'. Add missing join call on str object. Don't emit 'configure.ac'
into 'Makefile.am'. Make sure commands are executed in the proper
directory.

ChangeLog
pygnulib/GLTestDir.py

index 0858f6d878da58b1d999acfcf854d94c67e4c7aa..f85da3af66dbdf3eea467ea2c7630a20e2055b13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-03-07  Collin Funk  <collin.funk1@gmail.com>
+
+       gnulib-tool.py: Fix errors when executing --create-megatestdir.
+       * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Create a testdir for
+       each module in its own subdirectory. Create a testdir with all modules
+       in 'ALL'. Add missing join call on str object. Don't emit 'configure.ac'
+       into 'Makefile.am'. Make sure commands are executed in the proper
+       directory.
+
 2024-03-07  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Follow gnulib-tool changes, part 46.
index 296356bd9196d882b69562951c69cc102c74e7b4..8a3072ea09f39735cd28a504e9b28d99823658b8 100644 (file)
@@ -894,7 +894,7 @@ class GLMegaTestDir(object):
         # First, all modules one by one.
         for module in modules:
             self.config.setModules([str(module)])
-            #GLTestDir(self.config, self.megatestdir).execute()
+            GLTestDir(self.config, joinpath(self.megatestdir, str(module))).execute()
             megasubdirs += [str(module)]
 
         # Then, all modules all together.
@@ -904,7 +904,7 @@ class GLMegaTestDir(object):
                     if str(module) != 'config-h' ]
         self.config.setModules([ str(module)
                                  for module in modules ])
-        #GLTestDir(self.config, self.megatestdir).execute()
+        GLTestDir(self.config, joinpath(self.megatestdir, 'ALL')).execute()
         megasubdirs += ['ALL']
 
         # Create autobuild.
@@ -977,16 +977,16 @@ class GLMegaTestDir(object):
             emit += 'AC_CONFIG_AUX_DIR([%s])\n' % auxdir
         emit += 'AM_INIT_AUTOMAKE\n\n'
         emit += 'AC_PROG_MAKE_SET\n\n'
-        emit += 'AC_CONFIG_SUBDIRS([%s])\n' % ' '.megasubdirs
+        emit += 'AC_CONFIG_SUBDIRS([%s])\n' % ' '.join(megasubdirs)
         emit += 'AC_CONFIG_FILES([Makefile])\n'
         emit += 'AC_OUTPUT\n'
         emit = constants.nlconvert(emit)
-        path = joinpath(self.megatestdir, 'Makefile.am')
+        path = joinpath(self.megatestdir, 'configure.ac')
         with codecs.open(path, 'wb', 'UTF-8') as file:
             file.write(emit)
 
         # Create autogenerated files.
-        os.chdir(DIRS['cwd'])
+        os.chdir(self.megatestdir)
         args = [UTILS['aclocal']]
         constants.execute(args, verbose)
         try:  # Try to make a directory
@@ -999,4 +999,5 @@ class GLMegaTestDir(object):
         args = [UTILS['automake'], '--add-missing', '--copy']
         constants.execute(args, verbose)
         shutil.rmtree('autom4te.cache')
+        os.chdir(DIRS['cwd'])
         sp.call(['rm', '-rf', self.config['tempdir']], shell=False)