diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-21 18:38:25 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-09-21 18:38:25 +0200 |
| commit | 213e5625a9aa677230f261fcee01086f9ee1f850 (patch) | |
| tree | 21a422f2152f0f1921b431199acb69cc7568e07b /src/allocators/mesh.py | |
| parent | 84eec0baba49bff0a5c2b64834bc2d75d687e7b5 (diff) | |
| download | allocbench-213e5625a9aa677230f261fcee01086f9ee1f850.tar.gz allocbench-213e5625a9aa677230f261fcee01086f9ee1f850.zip | |
replace AllocatorSources with Artifacts
Diffstat (limited to 'src/allocators/mesh.py')
| -rw-r--r-- | src/allocators/mesh.py | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/allocators/mesh.py b/src/allocators/mesh.py index f8b7c16..2391e23 100644 --- a/src/allocators/mesh.py +++ b/src/allocators/mesh.py @@ -17,29 +17,23 @@ """Mesh definition for allocbench""" -from src.allocator import Allocator, AllocatorSources - -sources = AllocatorSources("Mesh", - retrieve_cmds=["git clone https://github.com/plasma-umass/Mesh"], - reset_cmds=["git reset --hard"]) - -# sources = src.allocator.GitAllocatorSources("Mesh", -# "https://github.com/plasma-umass/Mesh", -# "adsf0982345") +from src.allocator import Allocator +from src.artifact import GitArtifact class Mesh(Allocator): """Mesh allocator""" - def __init__(self, name, **kwargs): - kwargs["sources"] = sources - kwargs["LD_PRELOAD"] = "{srcdir}/libmesh.so" - kwargs["build_cmds"] = ["cd {srcdir}; git submodule update --init", - "cd {srcdir}; ./configure", - "cd {srcdir}; make -j 4", - "mkdir -p {dir}"] + sources = GitArtifact("Mesh", "https://github.com/plasma-umass/Mesh") + + def __init__(self, name, **kwargs): + self.LD_PRELOAD = "{dir}/libmesh.so" + self.build_cmds = ["cd {srcdir}; ./configure", + "cd {srcdir}; make -j 4", + "mkdir -p {dir}", + "ln -f -s {srcdir}/libmesh.so {dir}/libmesh.so"] super().__init__(name, **kwargs) -mesh = Mesh("Mesh", color="xkcd:mint") +mesh = Mesh("Mesh", version="4a1012cee990cb98cc1ea0294a836f467b29be02", color="xkcd:mint") |
