summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorcsilvers <csilvers@01de4be4-8c4a-0410-9132-4925637da917>2008-05-20 21:49:52 +0000
committercsilvers <csilvers@01de4be4-8c4a-0410-9132-4925637da917>2008-05-20 21:49:52 +0000
commitcf1c867c8a80dc4d76195d39c684d2324986c412 (patch)
tree3280e96b7a3c45571e062e484dba8fe5893abdbd /bench
parent7f0a5a93b802a2f8fa7d3b490e3d84c7eb76ee16 (diff)
downloaddistcc-cf1c867c8a80dc4d76195d39c684d2324986c412.tar.gz
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
Diffstat (limited to 'bench')
-rwxr-xr-xbench/Build.py3
-rwxr-xr-xbench/benchmark.py4
2 files changed, 4 insertions, 3 deletions
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