[Reproducible-commits] [blog] 01/01: Fix some formatting issues
Ceridwen
ceridwen-guest at moszumanska.debian.org
Mon Jun 20 23:03:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
ceridwen-guest pushed a commit to branch master
in repository blog.
commit fad841ca956993aa50afddc1e4ba749f27dd0e23
Author: Ceridwen <ceridwenv at gmail.com>
Date: Mon Jun 20 19:03:54 2016 -0400
Fix some formatting issues
---
drafts/people/ceridwen/reprotest_week4.mdwn | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drafts/people/ceridwen/reprotest_week4.mdwn b/drafts/people/ceridwen/reprotest_week4.mdwn
index 9abc6cd..cb22c3e 100644
--- a/drafts/people/ceridwen/reprotest_week4.mdwn
+++ b/drafts/people/ceridwen/reprotest_week4.mdwn
@@ -7,14 +7,17 @@ I've spent most of the past week reverse-engineering autopkgtest, with
some help from the maintainer, [Martin
Pitt](https://www.piware.de/tag/autopkgtest/).
+TODO: give a brief overview of why I'm using autopkgtest's code.
+
As I outlined [last
week](https://reproducible.alioth.debian.org/blog/posts/people/ceridwen/reprotest_week3/),
autopkgtest is composed of a main command-line program and other
command-line programs `chroot`, `lxd`, `schroot`, `null`, `schroot`,
-and `qemu`, which live in a directory virt/. (I've followed
+and `qemu`, which live in a directory `virt/`. (I've followed
autopkgtest 4.0 in dropping the `adt-virt-` prefix and other name
conventions.) Autopkgtest's directory structure looks like:
+
autopkgtest/
lib/
adt_testbed.py
@@ -69,20 +72,20 @@ First, setuptools makes it very, very difficult to distribute code
that isn't in Python packages, so this approach more or less doesn't
work with PyPi at all. Second, different OSes have different
directory layouts for Python packages, so an absolute path like
-/usr/share/autopkgtest/python isn't portable.
+`/usr/share/autopkgtest/python` isn't portable.
The main code of reprotest at the moment lives in its `__init__.py`.
The autopkgtest CLI of the main runner is specific to running tests,
so my entry point is going to be `adt_testbed`. My first attempt to
-refactor this involved putting an empty `__init__.py` in lib/ to turn
-into a package so that I could import the modules in the files in lib/
+refactor this involved putting an empty `__init__.py` in `lib/` to turn
+into a package so that I could import the modules in the files in `lib/`
using code like `from reprotest.lib import adtlog`. This works fine
-for the files in lib/ and makes `adt_testbed` importable in the main
-`__init__.py`. However, the executables in virt/, which are invoked
+for the files in `lib/` and makes `adt_testbed` importable in the main
+`__init__.py`. However, the executables in `virt/`, which are invoked
by `subprocess` calls in adt_testbed.py, *also* need to import modules
-from lib/ for the various `adtlog` functions and the timeout functions
+from `lib/` for the various `adtlog` functions and the timeout functions
in `VirtSubproc`. I haven't been able to find a simple modification
-of `sys.path` that allows the new Python processes launched from virt/
+of `sys.path` that allows the new Python processes launched from `virt/`
to properly import `reprotest.lib` as a package, which means I'm
looking at some kind of larger refactoring, either changing all the
`subprocess` calls in `adt_testbed` so they work with `reprotest.virt`
@@ -94,6 +97,6 @@ it might have something to do with combining the logging from a
process and its subprocesses, but because the Python subprocesses are
importing their own instances of the `adtlog` module, this isn't the
case. Another problem related to logging and debugging is that the
-programs in virt/ interact through stdin and stdout, which means that
+programs in `virt/` interact through stdin and stdout, which means that
I haven't been able to use simple prints to help work out their state
during execution.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/blog.git
More information about the Reproducible-commits
mailing list