This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Diffing and unit-testing eCos configuration files
- From: Martin Hans <mha at sophion dot com>
- To: "ecos-discuss at sources dot redhat dot com" <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 26 Jul 2012 08:16:19 +0000
- Subject: [ECOS] Diffing and unit-testing eCos configuration files
Hi all,
I have been frustrated that it is so hard to compare two different eCos configuration files or two versions of the same configuration file and see what the REAL differences are. Also, I had a need to keep the settings in two configuration files the same - except for a few settings.
I am publishing my solution to this here: https://bugzilla.ecoscentric.com/show_bug.cgi?id=1001632
This
* adds support for ecosconfig to dump the ecos configuration in an easily diffable and parseable format
* provides a python module which makes it easy to read an ecos configuration file
* provides a python script which diffs two ecos config files - they may also be specific revisions in subversion
* demonstrates how to write a unit-test that checks two config files against each other
* demonstrates how to write a unit-test that checks that certain critical values are not accidentally changed
I hope this may be useful to someone.
/Martin
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss