+2024-05-08 Bruno Haible <bruno@clisp.org>
+
+ gnulib-tool: In --megatestdir mode, stop when there is an error.
+ * gnulib-tool.sh (megatest): Fail when one of the 'configure' or 'make'
+ steps fails.
+ * pygnulib/main.py (main): Likewise.
+
2024-05-08 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Fix behavior of --test when a subprocess fails.
cd "$destdir"
mkdir build
cd build
- ../configure
- $MAKE
- $MAKE check
- $MAKE distclean
+ ../configure || func_exit 1
+ $MAKE || func_exit 1
+ $MAKE check || func_exit 1
+ $MAKE distclean || func_exit 1
remaining=`find . -type f -print`
if test -n "$remaining"; then
echo "Remaining files:" $remaining 1>&2
os.chdir(destdir)
os.mkdir('build')
os.chdir('build')
- sp.call(['../configure'])
- sp.call([UTILS['make']])
- sp.call([UTILS['make'], 'check'])
- sp.call([UTILS['make'], 'distclean'])
+ try: # Try to execute commands
+ sp.run(['../configure'], check=True)
+ sp.run([UTILS['make']], check=True)
+ sp.run([UTILS['make'], 'check'], check=True)
+ sp.run([UTILS['make'], 'distclean'], check=True)
+ except Exception:
+ sys.exit(1)
args = ['find', '.', '-type', 'f', '-print']
remaining = sp.check_output(args).decode(ENCS['shell'])
lines = [ line.strip()