aboutsummaryrefslogtreecommitdiff
path: root/src/artifact.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-11-21 21:04:17 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-11-21 21:04:17 +0100
commitbfdb57ba4dfa6a5a8b199c19a1c0de027c5e3937 (patch)
tree70845cce2c16adc1bfa743f0f7a20b722fb40de3 /src/artifact.py
parent69ddf7df0daac4845e46397967a850277913e358 (diff)
downloadallocbench-bfdb57ba4dfa6a5a8b199c19a1c0de027c5e3937.tar.gz
allocbench-bfdb57ba4dfa6a5a8b199c19a1c0de027c5e3937.zip
keep not modified artifact data in cache
Diffstat (limited to 'src/artifact.py')
-rw-r--r--src/artifact.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/artifact.py b/src/artifact.py
index 010bc6b..fdeeead 100644
--- a/src/artifact.py
+++ b/src/artifact.py
@@ -74,7 +74,7 @@ class GitArtifact(Artifact):
# check if we have already provided this checkout
if os.path.exists(location):
- return
+ return location
# check if we have already retrieved the repo
if not os.path.exists(self.repo):
@@ -93,6 +93,7 @@ class GitArtifact(Artifact):
proc = subprocess.run(["git", "submodule", "update", "--init", "--recursive"], cwd=location,
# stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True)
+ return location
class ArchiveArtifact(Artifact):
"""External archive"""
@@ -126,7 +127,7 @@ class ArchiveArtifact(Artifact):
# Check if we already provided the archive at location
if os.path.exists(location):
- return
+ return location
os.makedirs(location, exist_ok=True)
@@ -140,3 +141,5 @@ class ArchiveArtifact(Artifact):
universal_newlines=True)
if proc.returncode != 0:
raise Exception(f"Failed to extract {self.name}")
+
+ return location