jolt 0.9.343__tar.gz → 0.9.347__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jolt-0.9.343 → jolt-0.9.347}/PKG-INFO +1 -1
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/git.py +21 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/ninja.py +9 -9
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/paths.py +11 -1
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/strings.py +1 -3
- {jolt-0.9.343 → jolt-0.9.347}/jolt/tools.py +1 -1
- jolt-0.9.347/jolt/version.py +1 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt.egg-info/PKG-INFO +1 -1
- jolt-0.9.343/jolt/version.py +0 -1
- {jolt-0.9.343 → jolt-0.9.347}/README.rst +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/__init__.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/__main__.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/bin/fstree-darwin-x86_64 +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/bin/fstree-linux-x86_64 +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/cache.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/chroot.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/cli.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/colors.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/common_pb2.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/common_pb2_grpc.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/config.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/error.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/expires.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/filesystem.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/graph.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/hooks.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/influence.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/inspection.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/loader.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/log.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/manifest.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/options.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/pkgs/__init__.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/pkgs/golang.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/pkgs/nodejs.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/__init__.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/alias.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/allure.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/autoweight.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/cache.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/cmake.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/conan.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/cxx.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/cxxinfo.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/dashboard.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/debian.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/docker.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/email.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/email.xslt +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/environ.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/gdb.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/gerrit.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/golang.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/googletest.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/http.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/junit.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/logstash.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/ninja-compdb.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/nodejs.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/podman.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/python.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/remote_execution/__init__.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/remote_execution/administration_pb2.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/remote_execution/administration_pb2_grpc.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/remote_execution/log_pb2.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/remote_execution/log_pb2_grpc.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/remote_execution/scheduler_pb2.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/remote_execution/scheduler_pb2_grpc.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/remote_execution/worker_pb2.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/remote_execution/worker_pb2_grpc.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/repo.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/report.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/scheduler.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/selfdeploy.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/symlinks.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/telemetry.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/timeline.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/volume.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/yaml-ninja.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/plugins/yamltask.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/scheduler.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/tasks.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/templates/cxxexecutable.cmake.template +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/templates/cxxlibrary.cmake.template +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/templates/export.sh.template +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/templates/timeline.html.template +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/timer.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/utils.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/version_utils.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt/xmldom.py +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt.egg-info/SOURCES.txt +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt.egg-info/dependency_links.txt +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt.egg-info/entry_points.txt +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt.egg-info/requires.txt +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/jolt.egg-info/top_level.txt +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/setup.cfg +0 -0
- {jolt-0.9.343 → jolt-0.9.347}/setup.py +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import pygit2
|
|
3
3
|
import re
|
|
4
|
+
from threading import RLock
|
|
4
5
|
import urllib.parse
|
|
5
6
|
|
|
6
7
|
from jolt.tasks import BooleanParameter, Export, Parameter, TaskRegistry, WorkspaceResource
|
|
@@ -20,6 +21,13 @@ from jolt.error import raise_task_error_if
|
|
|
20
21
|
log.verbose("[Git] Loaded")
|
|
21
22
|
|
|
22
23
|
|
|
24
|
+
def locked(func):
|
|
25
|
+
def _f(self, *args, **kwargs):
|
|
26
|
+
with self._lock:
|
|
27
|
+
return func(self, *args, **kwargs)
|
|
28
|
+
return _f
|
|
29
|
+
|
|
30
|
+
|
|
23
31
|
class GitRepository(object):
|
|
24
32
|
def __init__(self, url, path, relpath, refspecs=None):
|
|
25
33
|
self.path = path
|
|
@@ -35,6 +43,7 @@ class GitRepository(object):
|
|
|
35
43
|
self._tree_hash = {}
|
|
36
44
|
self._original_head = True
|
|
37
45
|
self._last_rev = None
|
|
46
|
+
self._lock = RLock()
|
|
38
47
|
self._init_repo()
|
|
39
48
|
|
|
40
49
|
def _init_repo(self):
|
|
@@ -68,6 +77,7 @@ class GitRepository(object):
|
|
|
68
77
|
def is_indexed(self):
|
|
69
78
|
return self.is_cloned() and fs.path.exists(self._git_index())
|
|
70
79
|
|
|
80
|
+
@locked
|
|
71
81
|
def clone(self):
|
|
72
82
|
log.info("Cloning into {0}", self.path)
|
|
73
83
|
|
|
@@ -117,6 +127,7 @@ class GitRepository(object):
|
|
|
117
127
|
"Failed to clone repository '{0}'", self.relpath)
|
|
118
128
|
|
|
119
129
|
@utils.cached.instance
|
|
130
|
+
@locked
|
|
120
131
|
def diff_unchecked(self):
|
|
121
132
|
if not self.is_indexed():
|
|
122
133
|
return ""
|
|
@@ -130,6 +141,7 @@ class GitRepository(object):
|
|
|
130
141
|
output_on_error=True,
|
|
131
142
|
output_rstrip=False)
|
|
132
143
|
|
|
144
|
+
@locked
|
|
133
145
|
def diff(self):
|
|
134
146
|
diff = self.diff_unchecked()
|
|
135
147
|
dlim = config.getsize("git", "maxdiffsize", "1 MiB")
|
|
@@ -139,6 +151,7 @@ class GitRepository(object):
|
|
|
139
151
|
.format(self.relpath, len(diff), dlim))
|
|
140
152
|
return diff
|
|
141
153
|
|
|
154
|
+
@locked
|
|
142
155
|
def patch(self, patch):
|
|
143
156
|
if not patch:
|
|
144
157
|
return
|
|
@@ -149,6 +162,7 @@ class GitRepository(object):
|
|
|
149
162
|
log.info("Applying patch to {0}", self.path)
|
|
150
163
|
self.tools.run("git apply --whitespace=nowarn {patchfile}", patchfile=patchfile)
|
|
151
164
|
|
|
165
|
+
@locked
|
|
152
166
|
def head(self):
|
|
153
167
|
if not self.is_cloned():
|
|
154
168
|
return None
|
|
@@ -192,6 +206,7 @@ class GitRepository(object):
|
|
|
192
206
|
output_on_error=True)
|
|
193
207
|
return tree
|
|
194
208
|
|
|
209
|
+
@locked
|
|
195
210
|
def tree_hash(self, rev=None, path="/"):
|
|
196
211
|
# When rev is None, the caller want the tree hash of the repository's
|
|
197
212
|
# current workspace state. If no checkout has been made, that would be the
|
|
@@ -231,14 +246,17 @@ class GitRepository(object):
|
|
|
231
246
|
|
|
232
247
|
return value
|
|
233
248
|
|
|
249
|
+
@locked
|
|
234
250
|
def clean(self):
|
|
235
251
|
with self.tools.cwd(self.path):
|
|
236
252
|
return self.tools.run("git clean -dfx", output_on_error=True)
|
|
237
253
|
|
|
254
|
+
@locked
|
|
238
255
|
def reset(self):
|
|
239
256
|
with self.tools.cwd(self.path):
|
|
240
257
|
return self.tools.run("git reset --hard", output_on_error=True)
|
|
241
258
|
|
|
259
|
+
@locked
|
|
242
260
|
def fetch(self, commit=None):
|
|
243
261
|
if commit and not self.is_valid_sha(commit):
|
|
244
262
|
commit = None
|
|
@@ -252,6 +270,7 @@ class GitRepository(object):
|
|
|
252
270
|
what=commit or refspec or '',
|
|
253
271
|
output_on_error=True)
|
|
254
272
|
|
|
273
|
+
@locked
|
|
255
274
|
def checkout(self, rev, commit=None):
|
|
256
275
|
if rev == self._last_rev:
|
|
257
276
|
log.debug("Checkout skipped, already @ {}", rev)
|
|
@@ -428,6 +447,7 @@ class Git(WorkspaceResource, FileInfluence):
|
|
|
428
447
|
|
|
429
448
|
def __init__(self, *args, **kwargs):
|
|
430
449
|
super().__init__(*args, **kwargs)
|
|
450
|
+
self._lock = RLock()
|
|
431
451
|
self.joltdir = JoltLoader.get().joltdir
|
|
432
452
|
|
|
433
453
|
# Set the path to the repo
|
|
@@ -502,6 +522,7 @@ class Git(WorkspaceResource, FileInfluence):
|
|
|
502
522
|
if force or self._must_influence() or self._revision.is_imported:
|
|
503
523
|
self._acquire_ws()
|
|
504
524
|
|
|
525
|
+
@locked
|
|
505
526
|
def _acquire_ws(self):
|
|
506
527
|
commit = None
|
|
507
528
|
if not self.git.is_cloned():
|
|
@@ -100,8 +100,8 @@ class attributes:
|
|
|
100
100
|
self.info("Collecting coverage data into {covdatadir}")
|
|
101
101
|
|
|
102
102
|
for _, artifact in deps.items():
|
|
103
|
-
if
|
|
104
|
-
tools.copy(artifact.paths.coverage_data, self.covdatadir)
|
|
103
|
+
if artifact.paths.coverage_data:
|
|
104
|
+
tools.copy(str(artifact.paths.coverage_data), self.covdatadir)
|
|
105
105
|
|
|
106
106
|
with tools.environ(GCOV_PREFIX=self.covdatadir):
|
|
107
107
|
yield
|
|
@@ -196,8 +196,8 @@ class attributes:
|
|
|
196
196
|
if not hasattr(self, "covdatadir"):
|
|
197
197
|
self.covdatadir = tools.builddir("coverage-data")
|
|
198
198
|
for _, artifact in deps.items():
|
|
199
|
-
if
|
|
200
|
-
tools.copy(artifact.paths.coverage_data, self.covdatadir)
|
|
199
|
+
if artifact.paths.coverage_data:
|
|
200
|
+
tools.copy(str(artifact.paths.coverage_data), self.covdatadir)
|
|
201
201
|
|
|
202
202
|
with tools.cwd(self.covdatadir):
|
|
203
203
|
datafiles = tools.glob("**/*.gcda")
|
|
@@ -359,8 +359,8 @@ class attributes:
|
|
|
359
359
|
if not hasattr(self, "covdatadir"):
|
|
360
360
|
self.covdatadir = tools.builddir("coverage-data")
|
|
361
361
|
for _, artifact in deps.items():
|
|
362
|
-
if
|
|
363
|
-
tools.copy(artifact.paths.coverage_data, self.covdatadir)
|
|
362
|
+
if artifact.paths.coverage_data:
|
|
363
|
+
tools.copy(str(artifact.paths.coverage_data), self.covdatadir)
|
|
364
364
|
|
|
365
365
|
reportdir = tools.builddir("coverage-report-lcov")
|
|
366
366
|
htmldir = tools.builddir("coverage-report-lcov-html")
|
|
@@ -412,7 +412,7 @@ class attributes:
|
|
|
412
412
|
|
|
413
413
|
reports = []
|
|
414
414
|
for _, artifact in deps.items():
|
|
415
|
-
if
|
|
415
|
+
if artifact.paths.coverage_report_lcov:
|
|
416
416
|
reports.append(str(artifact.paths.coverage_report_lcov))
|
|
417
417
|
if reports:
|
|
418
418
|
filtered_reports = []
|
|
@@ -2280,8 +2280,8 @@ if __name__ == "__main__":
|
|
|
2280
2280
|
pass
|
|
2281
2281
|
if self.selfsustained:
|
|
2282
2282
|
for _, artifact in deps.items():
|
|
2283
|
-
if
|
|
2284
|
-
tools.copy(artifact.paths.coverage_data, self.covdatadir)
|
|
2283
|
+
if artifact.paths.coverage_data:
|
|
2284
|
+
tools.copy(str(artifact.paths.coverage_data), self.covdatadir)
|
|
2285
2285
|
|
|
2286
2286
|
def publish(self, artifact, tools):
|
|
2287
2287
|
if bool(getattr(self, "coverage", False)):
|
|
@@ -16,6 +16,12 @@ class PathVariable(ArtifactStringAttribute):
|
|
|
16
16
|
def unapply(self, task, artifact):
|
|
17
17
|
pass
|
|
18
18
|
|
|
19
|
+
def __bool__(self):
|
|
20
|
+
return bool(str(self))
|
|
21
|
+
|
|
22
|
+
def __eq__(self, value: str) -> bool:
|
|
23
|
+
return str(self) == str(value)
|
|
24
|
+
|
|
19
25
|
def __str__(self):
|
|
20
26
|
if self._value is None:
|
|
21
27
|
return ""
|
|
@@ -30,6 +36,10 @@ class PathVariableSet(ArtifactAttributeSet):
|
|
|
30
36
|
def create(self, name):
|
|
31
37
|
return PathVariable(self._artifact, name)
|
|
32
38
|
|
|
39
|
+
def __getattr__(self, name):
|
|
40
|
+
attributes = self._get_attributes()
|
|
41
|
+
return attributes.get(name, None)
|
|
42
|
+
|
|
33
43
|
|
|
34
44
|
@ArtifactAttributeSetProvider.Register
|
|
35
45
|
class PathVariableSetProvider(ArtifactAttributeSetProvider):
|
|
@@ -41,7 +51,7 @@ class PathVariableSetProvider(ArtifactAttributeSetProvider):
|
|
|
41
51
|
return
|
|
42
52
|
|
|
43
53
|
for key, value in content["paths"].items():
|
|
44
|
-
|
|
54
|
+
setattr(artifact.paths, key, value)
|
|
45
55
|
|
|
46
56
|
def format(self, artifact, content):
|
|
47
57
|
if "paths" not in content:
|
|
@@ -11,9 +11,7 @@ class StringVariableSet(object):
|
|
|
11
11
|
|
|
12
12
|
def __getattr__(self, name):
|
|
13
13
|
attributes = self._get_attributes()
|
|
14
|
-
|
|
15
|
-
return None
|
|
16
|
-
return attributes[name]
|
|
14
|
+
return attributes.get(name, None)
|
|
17
15
|
|
|
18
16
|
def __setattr__(self, name, value):
|
|
19
17
|
if not isinstance(value, str):
|
|
@@ -1865,7 +1865,7 @@ class Tools(object):
|
|
|
1865
1865
|
|
|
1866
1866
|
if type(chroot) in [cache.Artifact, cache.ArtifactToolsProxy]:
|
|
1867
1867
|
raise_task_error_if(
|
|
1868
|
-
not
|
|
1868
|
+
not chroot.paths.rootfs, self._task,
|
|
1869
1869
|
"No 'rootfs' path in artifact")
|
|
1870
1870
|
chroot = chroot.paths.rootfs
|
|
1871
1871
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.347"
|
jolt-0.9.343/jolt/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.9.343"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|