]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/test/runtests.py
Amend 26ea1e1 for roundtrip tests
[lyx.git] / src / tex2lyx / test / runtests.py
index fab0f97833db8401ba247a7ebbcad5f4182437cf..7c82909dedbedb5ea4908d6c44b350236d156022 100755 (executable)
@@ -15,6 +15,8 @@
 # suffix, since I don't know how to transport command line arguments through
 # the autotools "make check" mechanism.
 
+from __future__ import print_function
+
 import os, string, sys, time, difflib, filecmp, subprocess, re
 
 def usage(prog_name):
@@ -60,29 +62,32 @@ def main(argv):
     else:
         suffix = ""
     lyx = os.path.join(os.path.dirname(tex2lyx), "lyx" + suffix)
-    inputdir = os.path.dirname(argv[0])
+    inputdir = os.path.realpath(os.path.dirname(argv[0]))
     if len(argv) >= 4+skipcount:
-        outputdir = sys.argv[3+skipcount]
+        outputdir = os.path.realpath(sys.argv[3+skipcount])
     else:
 #        outputdir = inputdir
-        outputdir = os.path.join(os.path.dirname(tex2lyx), "test")
+        outputdir = os.path.realpath(os.path.join(os.path.dirname(tex2lyx), "test"))
 
     if len(argv) >= 5+skipcount:
         files = [sys.argv[4+skipcount]]
     else:
         files = ['test.ltx', \
+                 'algo2e.tex', \
+                 'beamer.tex', \
                  'box-color-size-space-align.tex', \
                  'CJK.tex', \
                  'CJKutf8.tex', \
                  'test-insets.tex', \
+                 'test-insets-basic.tex', \
                  'test-memoir.tex', \
+                 'test-minted.tex', \
                  'test-modules.tex', \
                  'test-refstyle-theorems.tex', \
                  'test-scr.tex', \
                  'test-structure.tex', \
                  'verbatim.tex', \
-                 'XeTeX-polyglossia.tex', \
-                 'algo2e.tex']
+                 'XeTeX-polyglossia.tex']
 
     errors = []
     overwrite = (outputdir == inputdir)
@@ -96,13 +101,13 @@ def main(argv):
         else:
             lyxfile = os.path.join(outputdir, base + ".lyx")
             cmd = '%s -roundtrip -copyfiles -f %s %s' % (tex2lyx, texfile, lyxfile)
-        print 'Executing: ' + cmd + "\n"
+        print('Executing: ' + cmd + "\n")
         proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
         proc.wait()
         err = proc.returncode
         errorstring = proc.stderr.read()
         if not errorstring is None:
-            print errorstring
+            print(errorstring)
         if err != 0:
             errors.append(f)
         elif not overwrite: