summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-03-18 20:11:51 +0000
committerKeith Bostic <keith@wiredtiger.com>2015-03-18 20:12:25 +0000
commit3be5f048991acff98bf17a8cb6c0c775bb982688 (patch)
tree4363703fc65f79750d3e8d497cc316faa956addf /test
parent579eff04711aa557abb1ed3bed71751856890527 (diff)
downloadmongo-3be5f048991acff98bf17a8cb6c0c775bb982688.tar.gz
Redirect the "cd" command to /dev/null so chatty cd implementations
don't add the new working directory to our output.
Diffstat (limited to 'test')
-rw-r--r--test/format/util.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/format/util.c b/test/format/util.c
index a1d1fa2b772..27294aae79f 100644
--- a/test/format/util.c
+++ b/test/format/util.c
@@ -293,12 +293,15 @@ path_setup(const char *home)
/*
* Home directory initialize command: remove everything except the RNG
* log file.
+ *
+ * Redirect the "cd" command to /dev/null so chatty cd implementations
+ * don't add the new working directory to our output.
*/
#undef CMD
#ifdef _WIN32
#define CMD "cd %s && del /s /q * && rd /s /q KVS"
#else
-#define CMD "cd %s && rm -rf `ls | sed /rand/d`"
+#define CMD "cd %s > /dev/null && rm -rf `ls | sed /rand/d`"
#endif
len = strlen(g.home) + strlen(CMD) + 1;
if ((g.home_init = malloc(len)) == NULL)
@@ -320,16 +323,19 @@ path_setup(const char *home)
/*
* Salvage command, save the interesting files so we can replay the
* salvage command as necessary.
+ *
+ * Redirect the "cd" command to /dev/null so chatty cd implementations
+ * don't add the new working directory to our output.
*/
#undef CMD
#ifdef _WIN32
#define CMD \
- "cd %s && " \
+ "cd %s " \
"rd /q /s slvg.copy & mkdir slvg.copy && " \
"copy WiredTiger* slvg.copy\\ && copy wt* slvg.copy\\"
#else
#define CMD \
- "cd %s && " \
+ "cd %s > /dev/null && " \
"rm -rf slvg.copy && mkdir slvg.copy && " \
"cp WiredTiger* wt* slvg.copy/"
#endif