aboutsummaryrefslogtreecommitdiff
path: root/src/allocator.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-09-22 18:35:47 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-09-22 18:35:47 +0200
commitcac85412d757b6054436dc9c63d30db645bc93ea (patch)
tree1858c4eefee907a1cc7c2031fdf7d0fd4f0fdb4c /src/allocator.py
parentcbc497138d1c4b77860e54304705cc157c2b800a (diff)
downloadallocbench-cac85412d757b6054436dc9c63d30db645bc93ea.tar.gz
allocbench-cac85412d757b6054436dc9c63d30db645bc93ea.zip
Add ArchiveArtifacts
ArchiveArtifacts check a downloaded archive against a provided checksum. The Archive is downloaded to cache/<name>/<name>.<format>. The only suported format is tar. ArchiveArtifacts can be used as sources of an Allocator.
Diffstat (limited to 'src/allocator.py')
-rw-r--r--src/allocator.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/allocator.py b/src/allocator.py
index 23b5147..b88b046 100644
--- a/src/allocator.py
+++ b/src/allocator.py
@@ -25,6 +25,7 @@ import shutil
import subprocess
import sys
+from src.artifact import ArchiveArtifact, GitArtifact
import src.globalvars
from src.util import print_status, print_debug, print_error, print_info2
@@ -76,7 +77,10 @@ class Allocator:
return
print_status("Preparing", self.name, "...")
- self.sources.provide(self.version, self.srcdir)
+ if type(self.sources) == GitArtifact:
+ self.sources.provide(self.version, self.srcdir)
+ elif type(self.sources) == ArchiveArtifact:
+ self.sources.provide(self.srcdir)
if self.patches:
stdout = subprocess.PIPE if src.globalvars.verbosity < 2 else None