[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnulib-tool-py] Need an idea how to test variables
From: |
Bruno Haible |
Subject: |
Re: [gnulib-tool-py] Need an idea how to test variables |
Date: |
Sun, 08 Jul 2012 22:40:44 +0200 |
User-agent: |
KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; ) |
Hi Dmitriy,
Sorry to answer a mail from 2012-05-27 with so much delay...
> Let me explain quickly what we now have:
> 1. On initialization of GNULibImport, it gets all the variables from cache.
> Some of them may be set before, like sourcebase, pobase, etc. That means
> they will be used as default for mode == MODES['import'] (i.e. for mode ==
> 0).
> 2. Cached variables are being set to their analogues (e.g.
> self._cached_['auxdir'] => self._auxdir_). However, if user changed
> variable in __init__, it will be overwritten (i.e. self._auxdir_ will be
> 'myauxdir', if user creates GNULibImport instance like this:
> GNULibImport(0, auxdir='myauxdir')).
Yes, this is good. This is how the old gnulib-tool --import behaves.
> There is one question. I'd like to compare variables with old gnulib-tool,
> but each time I run setting some parameters it overwrites some files. What
> is the best way to compare e.g. $sourcebase from old gnulib-tool.sh with
> self._sourcebase_ from new gnulib-tool.py?
Easy solution: Make a copy into a temporary directory before running
gnulib-tool. For example, have a test case in
pytests/test001
then make a copy to
pytests/test001-tmp-sh
before running the old gnulib-tool on pytests/test001-tmp-sh, and
make a copy to
pytests/test001-tmp-py
before running the new gnulib-tool on pytests/test001-tmp-py. Finally do
a "diff -r pytests/test001-tmp-sh pytests/test001-tmp-py" to make sure there
are no differences.
Bruno
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [gnulib-tool-py] Need an idea how to test variables,
Bruno Haible <=