# HG changeset patch # User Bryan O'Sullivan # Date 1173155183 28800 # Node ID 7b5894fffc3724ec8466c2c727850deb67fad0db # Parent 0707489b90fd6b4c319c0412048253bdcc524c51 Don't falsely signal success to make. diff -r 0707489b90fd -r 7b5894fffc37 en/examples/run-example --- a/en/examples/run-example Mon Mar 05 20:16:36 2007 -0800 +++ b/en/examples/run-example Mon Mar 05 20:26:23 2007 -0800 @@ -124,6 +124,14 @@ self.status('running %s ' % basename) tmpdir = tempfile.mkdtemp(prefix=basename) + # remove the marker file that we tell make to use to see if + # this run succeeded + try: + os.unlink(self.name + '.run') + except OSError, err: + if err.errno != errno.ENOENT: + raise + rcfile = os.path.join(tmpdir, '.hgrc') rcfp = open(rcfile, 'w') print >> rcfp, '[ui]' @@ -200,7 +208,6 @@ ofp.write(tex_escape(output)) ps = newps self.status('\n') - open(self.name + '.run', 'w') except: print >> sys.stderr, '(killed)' os.kill(self.pid, signal.SIGKILL) @@ -221,6 +228,8 @@ print >> sys.stderr, '(exit %s)' % os.WEXITSTATUS(rc) elif os.WIFSIGNALED(rc): print >> sys.stderr, '(signal %s)' % os.WTERMSIG(rc) + else: + open(self.name + '.run', 'w') return rc finally: shutil.rmtree(tmpdir)