Commit 7936c8db authored by Christian Dietrich's avatar Christian Dietrich
Browse files

experiments: makefile for historical builds

parent 5458918b
......@@ -34,3 +34,18 @@ endef
$(foreach project,MUSL POSTGRESQL CPYTHON MBEDTLS LUA BASH SAMBA,\
$(foreach mode,normal ccache clang-hash,\
$(eval $(call inc_template,$(project),$(mode),$(shell echo $(project) | tr '[:upper:]' '[:lower:]' )))))
define hist_template
hist_$3_$2:
./historical_build.py -s \
-d ../versuchung-data --jobs $(JOBS) \
-v --clang_hash-clone-url ${CLANG_HASH} \
--project-clone-url ${$1} --mode $2 --commits 10 --dummy
hist_$3: hist_$3_$2
endef
$(foreach project,LUA MBEDTLS SAMBA,\
$(foreach mode,normal ccache clang-hash ccache-clang-hash,\
$(eval $(call hist_template,$(project),$(mode),$(shell echo $(project) | tr '[:upper:]' '[:lower:]' )))))
......@@ -22,7 +22,7 @@ class HistoricalCompilation(Experiment, ClangHashHelper):
"clang_hash": GitArchive("/home/stettberger/w/clang-hash/"),
"project": GitArchive("/home/stettberger/w/clang-hash/hash-projects/lua"),
"mode": String("normal"),
"commits": Integer(50),
"commits": Integer(500),
"jobs": Integer(4),
}
outputs = {
......@@ -31,7 +31,7 @@ class HistoricalCompilation(Experiment, ClangHashHelper):
def run(self):
# Determine the mode
modes = ('normal', 'ccache', 'clang-hash')
modes = ('normal', 'ccache', 'clang-hash', 'ccache-clang-hash')
if not self.mode.value in modes:
raise RuntimeError("Mode can only be one of: %s"%modes)
......
......@@ -51,7 +51,7 @@ class ClangHashHelper:
elif self.project_name() in ("musl", "cpython", "bash", "samba"):
shell("cd %s; ./configure", path)
elif self.project_name() in ('mbedtls'):
shell("cd %s; cmake . -DCMAKE_C_COMPILER=$CC", path)
shell("cd %s; mkdir build; cd build; cmake .. -DCMAKE_C_COMPILER=$CC", path)
elif self.project_name() in ('lua',):
# This is an ugly hack to make it possible to override the
# CC variable from the outsite.
......@@ -68,7 +68,10 @@ class ClangHashHelper:
raise RuntimeError("Not a valid project")
def call_make(self, path):
return shell("cd %s; make -j %s", path, str(self.jobs.value))
if self.project_name() == "mbedtls":
return shell("cd %s/build; make -j %s", path, str(self.jobs.value))
else:
return shell("cd %s; make -j %s", path, str(self.jobs.value))
def rebuild(self, path, info, fail_ok=False):
# Recompile!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment