From 43e809bdb3d061e08cec3da06b08e9543ff9c0f8 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Sun, 13 Sep 2015 01:24:57 +0530 Subject: [PATCH 1/2] tools: open `test.tap` file in write-binary mode By default the logfile is opened in append mode. This commit makes sure that the file is opened in write-binary mode, so that the file will be created if it doesn't exist or overwrite if it exists. Fixes: #2834 --- tools/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test.py b/tools/test.py index 452b99edbc4024..59a31bf1cfabe4 100755 --- a/tools/test.py +++ b/tools/test.py @@ -1418,7 +1418,7 @@ def Main(): logger.addHandler(ch) logger.setLevel(logging.INFO) if options.logfile: - fh = logging.FileHandler(options.logfile) + fh = logging.FileHandler(options.logfile, mode='wb') logger.addHandler(fh) workspace = abspath(join(dirname(sys.argv[0]), '..')) From 89d52372efd36ad3fc01ad3b72a8edc463302afb Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Sun, 13 Sep 2015 01:26:33 +0530 Subject: [PATCH 2/2] build: clean up the generated tap file Make `make clean` cleanup the generated tap file as well. Fixes: #2834 --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 3d6d6f7686679a..c99f6c21f830ac 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,7 @@ clean: -rm -rf out/Makefile $(NODE_EXE) $(NODE_G_EXE) out/$(BUILDTYPE)/$(NODE_EXE) @if [ -d out ]; then find out/ -name '*.o' -o -name '*.a' | xargs rm -rf; fi -rm -rf node_modules + -rm -f test.tap distclean: -rm -rf out