From cf1c867c8a80dc4d76195d39c684d2324986c412 Mon Sep 17 00:00:00 2001 From: csilvers Date: Tue, 20 May 2008 21:49:52 +0000 Subject: In the benchmark code, make sure a directory exists before cd-ing into it. This is to handle projects like ACE, which require you to build from an entirely new directory. Also fix up an obsolete help-text sentence. Reviewed by fergus@google.com git-svn-id: http://distcc.googlecode.com/svn/trunk@329 01de4be4-8c4a-0410-9132-4925637da917 --- bench/Build.py | 3 +++ bench/benchmark.py | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'bench') diff --git a/bench/Build.py b/bench/Build.py index e6b3c35..8f49605 100755 --- a/bench/Build.py +++ b/bench/Build.py @@ -78,6 +78,7 @@ class Build: rm_files((configure_log, distcc_log)) + make_dir(self.build_dir) print "** Configuring..." run_cmd("cd %s && \\\nDISTCC_LOG='%s' \\\nCC='%s' \\\nCXX='%s' \\\n%s \\\n>%s 2>&1" % (self.build_dir, distcc_log, self.compiler.cc, @@ -95,6 +96,7 @@ class Build: rm_files((build_log, distcc_log)) + make_dir(self.build_dir) print "** Building..." if self.project.pre_build_cmd: cmd = ("cd %s && %s > %s 2>&1" % (self.build_dir, @@ -125,6 +127,7 @@ class Build: def clean(self): clean_log = os.path.join(self.log_dir, "bench-clean.log") + make_dir(self.build_dir) print "** Cleaning build directory" cmd = "cd %s && make clean >%s 2>&1" % (self.build_dir, clean_log) run_cmd(cmd) diff --git a/bench/benchmark.py b/bench/benchmark.py index 57edd7a..464a0bc 100755 --- a/bench/benchmark.py +++ b/bench/benchmark.py @@ -47,8 +47,6 @@ # TODO: Allow choice of which compiler and make options to use. -# TODO: Add option to run tests repeatedly and show mean and std. dev. - # TODO: Perhaps add option to do "make clean" -- this might be faster # than unzipping and configuring every time. But perhaps also less # reproducible. @@ -117,7 +115,7 @@ Options: to perform The C and C++ compiler versions used can be set with the --cc and --cxx -options. These must precede any -c/--compiler options. +options. Use of distcc features is set with the -c/--compiler option. The argument to -c/--compiler has three components, separated by commas. The first -- cgit v1.2.1