summaryrefslogtreecommitdiff
path: root/modules/modhelp.py
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-09-25 16:15:16 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2022-09-25 16:15:16 -0400
commit650c20f1ca4e07591a727e1cfcc74b3363d15985 (patch)
tree85d11f6437cde22f410c25e0e5f71a3131ebd07d /modules/modhelp.py
parent8869332684c2302b5ba1ead4568bbc7ba1c0183e (diff)
parent4b85ae6a24380fb67a3315eaec9233f17a872473 (diff)
downloademacs-650c20f1ca4e07591a727e1cfcc74b3363d15985.tar.gz
emacs-650c20f1ca4e07591a727e1cfcc74b3363d15985.tar.bz2
emacs-650c20f1ca4e07591a727e1cfcc74b3363d15985.zip
Merge 'master' into noverlay
Diffstat (limited to 'modules/modhelp.py')
-rwxr-xr-xmodules/modhelp.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/modhelp.py b/modules/modhelp.py
index 78fadda4126..d8b4dceb789 100755
--- a/modules/modhelp.py
+++ b/modules/modhelp.py
@@ -2,7 +2,7 @@
# Module helper script.
-# Copyright 2015-2017 Free Software Foundation, Inc.
+# Copyright 2015-2022 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -45,31 +45,31 @@ def cmd_test(args):
failed = []
for m in mods:
- print '[*] %s: ------- start -------' % m
- print '[*] %s: running make' % m
+ print('[*] %s: ------- start -------' % m)
+ print('[*] %s: running make' % m)
r = sp.call(make_cmd, cwd=m)
if r != 0:
- print '[E] %s: make failed' % m
+ print('[E] %s: make failed' % m)
failed += [m]
continue
- print '[*] %s: running test' % m
+ print('[*] %s: running test' % m)
testpath = os.path.join(m, 'test.el')
if os.path.isfile(testpath):
emacs_cmd = [EMACS, '-batch', '-L', '.', '-l', 'ert',
'-l', testpath, '-f', 'ert-run-tests-batch-and-exit']
- print ' '.join(emacs_cmd)
+ print(' '.join(emacs_cmd))
r = sp.call(emacs_cmd)
if r != 0:
- print '[E] %s: test failed' % m
+ print('[E] %s: test failed' % m)
failed += [m]
continue
else:
- print '[W] %s: no test to run' % m
+ print('[W] %s: no test to run' % m)
- print '\n[*] %d/%d MODULES OK' % (len(mods)-len(failed), len(mods))
+ print('\n[*] %d/%d MODULES OK' % (len(mods)-len(failed), len(mods)))
for m in failed:
- print '\tfailed: %s' % m
+ print('\tfailed: %s' % m)
def to_lisp_sym(sym):
sym = re.sub('[_ ]', '-', sym)
@@ -81,7 +81,7 @@ def to_c_sym(sym):
def cmd_init(args):
if os.path.exists(args.module):
- print "%s: file/dir '%s' already exists" % (__file__, args.module)
+ print("%s: file/dir '%s' already exists" % (__file__, args.module))
return
os.mkdir(args.module)
@@ -98,10 +98,10 @@ def cmd_init(args):
if isinstance(path, string.Template):
path = path.substitute(template_vars)
path = os.path.join(args.module, path)
- print "writing %s..." % path
+ print("writing %s..." % path)
with open(path, "w+") as f:
f.write(t.substitute(template_vars))
- print "done! you can run %s test %s" % (__file__, args.module)
+ print("done! you can run %s test %s" % (__file__, args.module))
def main():