[reprotest] 03/04: main: revert logging settings back to python defaults, and other tweaks
Ximin Luo
infinity0 at debian.org
Fri Oct 13 14:33:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository reprotest.
commit 0790b6a01769d17c5080cd844190a809ce3b75f2
Author: Ximin Luo <infinity0 at debian.org>
Date: Fri Oct 13 16:26:08 2017 +0200
main: revert logging settings back to python defaults, and other tweaks
---
reprotest/__init__.py | 18 ++++++++++--------
reprotest/build.py | 6 ++----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index 5f5e793..ba3a225 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -86,7 +86,7 @@ def start_testbed(args, temp_dir, no_clean_on_error=False, host_distro='debian')
pass
except BaseException as e:
if no_clean_on_error:
- logging.warn("preserving temporary stuff: %s", testbed.scratch)
+ logging.warn("preserving temporary files in: %s", testbed.scratch)
should_clean = False
raise
finally:
@@ -192,16 +192,19 @@ class BuildContext(collections.namedtuple('_BuildContext',
# this dance is necessary because the cwd can't be cd'd into during the
# setup phase under some variations like user_group
new_script = build.to_script(no_clean_on_error)
- logging.info("executing build in %s ...", build.tree)
- logging.debug("#### REPROTEST BUILD ENVVARS ##################################################")
- logging.debug("\n".join(environ.env_diff(old_env, build.env)))
- logging.debug(new_script)
+ logging.info("executing build in %s", build.tree)
+ logging.debug("#### REPROTEST BUILD ENVVARS ###################################################\n" +
+ "\n".join(environ.env_diff(old_env, build.env)))
+ logging.debug("#### BEGIN REPROTEST BUILD SCRIPT ##############################################\n" +
+ new_script)
+ logging.debug("#### END REPROTEST BUILD SCRIPT ################################################")
testbed.check_exec2(['sh', '-ec', new_script],
xenv=['-i'] + ['%s=%s' % (k, v) for k, v in build.env.items()],
kind='build')
+ logging.info("build successful, copying artifacts")
dist_base = os.path.join(self.testbed_dist, VSRC_DIR)
testbed.check_exec2(shell_copy_pattern(dist_base, self.testbed_src, artifact_pattern))
- # FIXME: this is needed because of the FIXME in build.faketime(). we can rm it after that is fixed
+ # FIXME: `touch` is needed because of the FIXME in build.faketime(). we can rm it after that is fixed
testbed.check_exec2(['sh', '-ec',
r"""cd "{0}" && touch -d at 0 . .. {1}""".format(dist_base, artifact_pattern)])
@@ -655,8 +658,7 @@ def run(argv, dry_run=None):
verbosity = parsed_args.verbosity
adtlog.verbosity = verbosity - 1
- logging.basicConfig(
- format='%(message)s', level=30-10*verbosity, stream=sys.stdout)
+ logging.basicConfig(level=30-10*verbosity)
logging.debug('%r', parsed_args)
# Decide which form of the CLI we're using
diff --git a/reprotest/build.py b/reprotest/build.py
index ca99a12..4f4fe99 100644
--- a/reprotest/build.py
+++ b/reprotest/build.py
@@ -160,7 +160,6 @@ else
fi
"""
return """\
-#### BEGIN REPROTEST BUILD SCRIPT ##############################################
run_build() {{
{0}
}}
@@ -170,7 +169,6 @@ cleanup() {{
}}
{2}
-#### END REPROTEST BUILD SCRIPT ################################################
""".format(subshell.__str__(4), cleanup.__str__(4), main_script.rstrip()).rstrip()
else:
return str(subshell)
@@ -221,8 +219,8 @@ def fileordering(ctx, build, vary):
_ = build.move_tree(build.tree, old_tree, False)
_ = _.append_setup_exec('mkdir', '-p', build.tree)
_ = _.prepend_cleanup_exec('rmdir', build.tree)
- disorderfs = ['disorderfs'] + ([] if ctx.verbosity else ["-q"])
- _ = _.append_setup_exec(*(disorderfs + ['--shuffle-dirents=yes', old_tree, build.tree]))
+ disorderfs = ['disorderfs'] + (['>&2'] if ctx.verbosity >= 2 else ['-q'])
+ _ = _.append_setup_exec_raw(*disorderfs, *map(shlex.quote, ['--shuffle-dirents=yes', old_tree, build.tree]))
_ = _.prepend_cleanup_exec('fusermount', '-u', build.tree)
# the "user_group" variation hacks PATH to run "sudo -u XXX" instead of various tools, pick it up here
binpath = os.path.join(dirname(build.tree), 'bin')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git
More information about the Reproducible-commits
mailing list