ACK
On 10/03/2011 10:05 AM, Radek Novacek wrote:
File /etc/fstab is empty in mock, so use /etc/mtab instead.
Don't compile this test on windows, because augeas is linux-only.
---
src/tests/mh_api_sysconfig.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/tests/mh_api_sysconfig.h b/src/tests/mh_api_sysconfig.h
index 7e1532e..8d9d512 100644
--- a/src/tests/mh_api_sysconfig.h
+++ b/src/tests/mh_api_sysconfig.h
@@ -72,13 +72,15 @@ class MhApiSysconfigSuite : public CxxTest::TestSuite
/**
* This test compares result of mh_sysconfig_query, mh_sysconfig_run_string
- * and mh_sysconfig_run_uri commands.
+ * and mh_sysconfig_run_uri commands. This test is linux-only (no augeas
+ * on windows).
*/
+#ifndef WIN32
void testAugeasQuery(void)
{
const char key[] = "org.matahariproject.test.unittest.augeas";
- const char query[] = "/files/etc/fstab/1/spec";
- const char command[] = "get /files/etc/fstab/1/spec";
+ const char query[] = "/files/etc/mtab/1/spec";
+ const char command[] = "get /files/etc/mtab/1/spec";
char tmp_file[] = "matahari-sysconfig-test_XXXXXX";
char *query_result, *run_string_result, *run_string_result_stripped;
char *run_uri_result, *run_uri_result_stripped;
@@ -124,6 +126,7 @@ class MhApiSysconfigSuite : public CxxTest::TestSuite
free(abs_path);
free(uri);
}
+#endif
};
#endif
--
Russell Bryant