[augeas-devel] [PATCH 0 of 3] Never use installed lenses in tests

David Lutterkort lutter at redhat.com
Mon Sep 8 23:39:06 UTC 2008


There was no way to keep augtool and augparse from searching the default
module directory $datadir/augeas/lenses for modules. As a result, tests
always searched that directory if a module was not found in any explicitly
given directories.

When a module was removed, this lead to the tests passing even if another
module still referenced that module.

These patches add an option '--nostdinc' to suppress searching the default
module directory, and use that in all tests. As a nice sideeffect, you can
now use augtool and augparse completely independently of any configuration
management context. If you have some Augeas modules in ~/lenses, you can
run 'augtool --nostdinc -I ~/lenses ...' and augtool will only read and
write files that your custom modules in ~/lenses mention. Or you can start
augtool without any modules - why you'd do that, I do not know ;)

David

15 files changed, 92 insertions(+), 47 deletions(-)
src/augeas.c              |   42 +++++++++++++++++++++++-------------------
src/augeas.h              |    4 +++-
src/augparse.c            |   24 ++++++++++++++++++++----
src/augtool.c             |   39 +++++++++++++++++++++++++++++----------
src/syntax.c              |    2 ++
src/try                   |    8 ++++----
tests/augtest             |    2 +-
tests/test-bug-1.sh       |    2 +-
tests/test-get.sh         |    2 +-
tests/test-interpreter.sh |    2 +-
tests/test-lenses.sh      |    2 +-
tests/test-mv.sh          |    3 ++-
tests/test-put-symlink.sh |    2 +-
tests/test-save-empty.sh  |    3 ++-
tests/test-valgrind.sh    |    2 +-




More information about the augeas-devel mailing list