diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2018-02-12 18:36:07 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-02-13 09:17:47 +0100 |
commit | f075b0b6f69f1bae3735eb8560b8f571c708aafd (patch) | |
tree | 22742b579ab98103d58aeed85a4135a1c41979d7 /rumba/prototypes/ouroboros.py | |
parent | 25bd117a9ce2bb4365743848d3c8742e3deb8afa (diff) | |
download | rumba-f075b0b6f69f1bae3735eb8560b8f571c708aafd.tar.gz rumba-f075b0b6f69f1bae3735eb8560b8f571c708aafd.zip |
prototypes: Add option to choose git repo and branch
This adds two extra parameters to the Experiment class, so that users
can specify their custom repositories and branches for testing new
features.
Diffstat (limited to 'rumba/prototypes/ouroboros.py')
-rw-r--r-- | rumba/prototypes/ouroboros.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index 653c486..fd94f77 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -37,8 +37,10 @@ logger = log.get_logger(__name__) # An experiment over the Ouroboros implementation class Experiment(mod.Experiment): - def __init__(self, testbed, nodes=None): - mod.Experiment.__init__(self, testbed, nodes) + def __init__(self, testbed, nodes=None, + git_repo='git://ouroboros.ilabt.imec.be/ouroboros', + git_branch='master'): + mod.Experiment.__init__(self, testbed, nodes, git_repo, git_branch) self.r_ipcps = dict() @staticmethod @@ -61,11 +63,13 @@ class Experiment(mod.Experiment): packages = ["cmake", "protobuf-c-compiler", "git", "libfuse-dev", "libgcrypt20-dev", "libssl-dev"] + fs_loc = '/tmp/prototype' + cmds = ["sudo apt-get install libprotobuf-c-dev --yes || true", - "sudo rm -r ~/ouroboros || true", - "git clone -b be git://ouroboros.ilabt.imec.be/ouroboros " + - "~/ouroboros", - "cd ~/ouroboros && mkdir build && cd build && " + + "sudo rm -r " + fs_loc + " || true", + "git clone -b " + self.git_branch + " " + self.git_repo + \ + " " + fs_loc, + "cd " + fs_loc + " && mkdir build && cd build && " + "cmake -DCMAKE_BUILD_TYPE=Debug -DCONNECT_TIMEOUT=60000 " + \ "-DREG_TIMEOUT=60000 -DQUERY_TIMEOUT=4000 .. && " + \ "sudo make install -j$(nproc)"] |