Re: Failure to build netcfg....
On 03/02/13 06:49, Christian PERRIER wrote:
> /tmp/buildd/netcfg-1.105/test/mock_paths/test_nc_v6_interface_configured_simple/ip: line 6: cat: command not found
That script is a dummy replacement for /bin/ip - meaning that the PATH
must be altered by the test suite.
There was a well-hidden bug here truncating the last two characters from
the original PATH. If like me you have ":/usr/local/games:/usr/games"
in there it wouldn't have mattered. But otherwise it would truncate
":/bin" to ":/b" and cause this FTBFS.
Please find fix attached! Should we get a bug number for this?
Regards,
--
Steven Chamberlain
steven@pyro.eu.org
diff --git a/test/srunner.c b/test/srunner.c
index be01a35..9b01004 100644
--- a/test/srunner.c
+++ b/test/srunner.c
@@ -51,7 +51,7 @@ void srunner_mock_path(const char *testcase)
original_path = strdup(getenv("PATH"));
new_path_len = strlen(test_run_root)
- + 10 /* /mock_paths/ */
+ + 12 /* /mock_paths/ */
+ strlen(testcase) + 1 /* : */
+ strlen(original_path) + 1 /* \0 */;
Reply to: