jolt 0.9.172__py3-none-any.whl → 0.9.435__py3-none-any.whl

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.

Potentially problematic release.


This version of jolt might be problematic. Click here for more details.

Files changed (185) hide show
  1. jolt/__init__.py +80 -7
  2. jolt/__main__.py +9 -1
  3. jolt/bin/fstree-darwin-x86_64 +0 -0
  4. jolt/bin/fstree-linux-x86_64 +0 -0
  5. jolt/cache.py +596 -252
  6. jolt/chroot.py +36 -11
  7. jolt/cli.py +143 -130
  8. jolt/common_pb2.py +45 -45
  9. jolt/config.py +76 -40
  10. jolt/error.py +19 -4
  11. jolt/filesystem.py +2 -6
  12. jolt/graph.py +400 -82
  13. jolt/influence.py +110 -3
  14. jolt/loader.py +338 -174
  15. jolt/log.py +127 -31
  16. jolt/manifest.py +13 -46
  17. jolt/options.py +35 -11
  18. jolt/pkgs/abseil.py +42 -0
  19. jolt/pkgs/asio.py +25 -0
  20. jolt/pkgs/autoconf.py +41 -0
  21. jolt/pkgs/automake.py +41 -0
  22. jolt/pkgs/b2.py +31 -0
  23. jolt/pkgs/boost.py +111 -0
  24. jolt/pkgs/boringssl.py +32 -0
  25. jolt/pkgs/busybox.py +39 -0
  26. jolt/pkgs/bzip2.py +43 -0
  27. jolt/pkgs/cares.py +29 -0
  28. jolt/pkgs/catch2.py +36 -0
  29. jolt/pkgs/cbindgen.py +17 -0
  30. jolt/pkgs/cista.py +19 -0
  31. jolt/pkgs/clang.py +44 -0
  32. jolt/pkgs/cli11.py +24 -0
  33. jolt/pkgs/cmake.py +48 -0
  34. jolt/pkgs/cpython.py +196 -0
  35. jolt/pkgs/crun.py +29 -0
  36. jolt/pkgs/curl.py +38 -0
  37. jolt/pkgs/dbus.py +18 -0
  38. jolt/pkgs/double_conversion.py +24 -0
  39. jolt/pkgs/fastfloat.py +21 -0
  40. jolt/pkgs/ffmpeg.py +28 -0
  41. jolt/pkgs/flatbuffers.py +29 -0
  42. jolt/pkgs/fmt.py +27 -0
  43. jolt/pkgs/fstree.py +20 -0
  44. jolt/pkgs/gflags.py +18 -0
  45. jolt/pkgs/glib.py +18 -0
  46. jolt/pkgs/glog.py +25 -0
  47. jolt/pkgs/glslang.py +21 -0
  48. jolt/pkgs/golang.py +16 -11
  49. jolt/pkgs/googlebenchmark.py +18 -0
  50. jolt/pkgs/googletest.py +46 -0
  51. jolt/pkgs/gperf.py +15 -0
  52. jolt/pkgs/grpc.py +73 -0
  53. jolt/pkgs/hdf5.py +19 -0
  54. jolt/pkgs/help2man.py +14 -0
  55. jolt/pkgs/inja.py +28 -0
  56. jolt/pkgs/jsoncpp.py +31 -0
  57. jolt/pkgs/libarchive.py +43 -0
  58. jolt/pkgs/libcap.py +44 -0
  59. jolt/pkgs/libdrm.py +44 -0
  60. jolt/pkgs/libedit.py +42 -0
  61. jolt/pkgs/libevent.py +31 -0
  62. jolt/pkgs/libexpat.py +27 -0
  63. jolt/pkgs/libfastjson.py +21 -0
  64. jolt/pkgs/libffi.py +16 -0
  65. jolt/pkgs/libglvnd.py +30 -0
  66. jolt/pkgs/libogg.py +28 -0
  67. jolt/pkgs/libpciaccess.py +18 -0
  68. jolt/pkgs/libseccomp.py +21 -0
  69. jolt/pkgs/libtirpc.py +24 -0
  70. jolt/pkgs/libtool.py +42 -0
  71. jolt/pkgs/libunwind.py +35 -0
  72. jolt/pkgs/libva.py +18 -0
  73. jolt/pkgs/libvorbis.py +33 -0
  74. jolt/pkgs/libxml2.py +35 -0
  75. jolt/pkgs/libxslt.py +17 -0
  76. jolt/pkgs/libyajl.py +16 -0
  77. jolt/pkgs/llvm.py +81 -0
  78. jolt/pkgs/lua.py +54 -0
  79. jolt/pkgs/lz4.py +26 -0
  80. jolt/pkgs/m4.py +14 -0
  81. jolt/pkgs/make.py +17 -0
  82. jolt/pkgs/mesa.py +81 -0
  83. jolt/pkgs/meson.py +17 -0
  84. jolt/pkgs/mstch.py +28 -0
  85. jolt/pkgs/mysql.py +60 -0
  86. jolt/pkgs/nasm.py +49 -0
  87. jolt/pkgs/ncurses.py +30 -0
  88. jolt/pkgs/ng_log.py +25 -0
  89. jolt/pkgs/ninja.py +45 -0
  90. jolt/pkgs/nlohmann_json.py +25 -0
  91. jolt/pkgs/nodejs.py +19 -11
  92. jolt/pkgs/opencv.py +24 -0
  93. jolt/pkgs/openjdk.py +26 -0
  94. jolt/pkgs/openssl.py +103 -0
  95. jolt/pkgs/paho.py +76 -0
  96. jolt/pkgs/patchelf.py +16 -0
  97. jolt/pkgs/perl.py +42 -0
  98. jolt/pkgs/pkgconfig.py +64 -0
  99. jolt/pkgs/poco.py +39 -0
  100. jolt/pkgs/protobuf.py +77 -0
  101. jolt/pkgs/pugixml.py +27 -0
  102. jolt/pkgs/python.py +19 -0
  103. jolt/pkgs/qt.py +35 -0
  104. jolt/pkgs/rapidjson.py +26 -0
  105. jolt/pkgs/rapidyaml.py +28 -0
  106. jolt/pkgs/re2.py +30 -0
  107. jolt/pkgs/re2c.py +17 -0
  108. jolt/pkgs/readline.py +15 -0
  109. jolt/pkgs/rust.py +41 -0
  110. jolt/pkgs/sdl.py +28 -0
  111. jolt/pkgs/simdjson.py +27 -0
  112. jolt/pkgs/soci.py +46 -0
  113. jolt/pkgs/spdlog.py +29 -0
  114. jolt/pkgs/spirv_llvm.py +21 -0
  115. jolt/pkgs/spirv_tools.py +24 -0
  116. jolt/pkgs/sqlite.py +83 -0
  117. jolt/pkgs/ssl.py +12 -0
  118. jolt/pkgs/texinfo.py +15 -0
  119. jolt/pkgs/tomlplusplus.py +22 -0
  120. jolt/pkgs/wayland.py +26 -0
  121. jolt/pkgs/x11.py +58 -0
  122. jolt/pkgs/xerces_c.py +20 -0
  123. jolt/pkgs/xorg.py +360 -0
  124. jolt/pkgs/xz.py +29 -0
  125. jolt/pkgs/yamlcpp.py +30 -0
  126. jolt/pkgs/zeromq.py +47 -0
  127. jolt/pkgs/zlib.py +87 -0
  128. jolt/pkgs/zstd.py +33 -0
  129. jolt/plugins/alias.py +3 -0
  130. jolt/plugins/allure.py +2 -2
  131. jolt/plugins/autotools.py +66 -0
  132. jolt/plugins/cache.py +1 -1
  133. jolt/plugins/cmake.py +74 -6
  134. jolt/plugins/conan.py +238 -0
  135. jolt/plugins/cxxinfo.py +7 -0
  136. jolt/plugins/docker.py +76 -19
  137. jolt/plugins/email.xslt +141 -118
  138. jolt/plugins/environ.py +11 -0
  139. jolt/plugins/fetch.py +141 -0
  140. jolt/plugins/gdb.py +33 -14
  141. jolt/plugins/gerrit.py +0 -13
  142. jolt/plugins/git.py +248 -66
  143. jolt/plugins/googletest.py +1 -1
  144. jolt/plugins/http.py +1 -1
  145. jolt/plugins/libtool.py +63 -0
  146. jolt/plugins/linux.py +990 -0
  147. jolt/plugins/logstash.py +4 -4
  148. jolt/plugins/meson.py +61 -0
  149. jolt/plugins/ninja-compdb.py +96 -28
  150. jolt/plugins/ninja.py +424 -150
  151. jolt/plugins/paths.py +11 -1
  152. jolt/plugins/pkgconfig.py +219 -0
  153. jolt/plugins/podman.py +131 -87
  154. jolt/plugins/python.py +137 -0
  155. jolt/plugins/remote_execution/administration_pb2.py +27 -19
  156. jolt/plugins/remote_execution/log_pb2.py +12 -12
  157. jolt/plugins/remote_execution/scheduler_pb2.py +23 -23
  158. jolt/plugins/remote_execution/worker_pb2.py +19 -19
  159. jolt/plugins/report.py +7 -2
  160. jolt/plugins/rust.py +25 -0
  161. jolt/plugins/scheduler.py +135 -86
  162. jolt/plugins/selfdeploy/setup.py +6 -6
  163. jolt/plugins/selfdeploy.py +49 -31
  164. jolt/plugins/strings.py +35 -22
  165. jolt/plugins/symlinks.py +11 -4
  166. jolt/plugins/telemetry.py +1 -2
  167. jolt/plugins/timeline.py +13 -3
  168. jolt/scheduler.py +467 -165
  169. jolt/tasks.py +427 -111
  170. jolt/templates/timeline.html.template +44 -47
  171. jolt/timer.py +22 -0
  172. jolt/tools.py +527 -188
  173. jolt/utils.py +183 -3
  174. jolt/version.py +1 -1
  175. jolt/xmldom.py +12 -2
  176. {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/METADATA +97 -41
  177. jolt-0.9.435.dist-info/RECORD +207 -0
  178. {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/WHEEL +1 -1
  179. jolt/plugins/amqp.py +0 -855
  180. jolt/plugins/debian.py +0 -338
  181. jolt/plugins/repo.py +0 -253
  182. jolt/plugins/snap.py +0 -122
  183. jolt-0.9.172.dist-info/RECORD +0 -92
  184. {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/entry_points.txt +0 -0
  185. {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/top_level.txt +0 -0
jolt/plugins/email.xslt CHANGED
@@ -1,15 +1,18 @@
1
1
  <?xml version="1.0"?>
2
2
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
3
 
4
- <xsl:variable name="Failures" select="jolt-manifest/task[result='FAILED']"/>
5
- <xsl:variable name="Unstable" select="jolt-manifest/task[result='UNSTABLE']"/>
6
- <xsl:variable name="FailuresAndUnstable" select="jolt-manifest/task[result='UNSTABLE' or result='FAILED']"/>
7
- <xsl:variable name="Successful" select="jolt-manifest/task[result='SUCCESS']"/>
8
- <xsl:variable name="Tasks" select="jolt-manifest/task"/>
9
- <xsl:variable name="Goals" select="jolt-manifest/task[goal='true']"/>
10
- <xsl:variable name="Hours" select="floor(jolt-manifest/duration div 3600)"/>
11
- <xsl:variable name="Minutes" select="floor((jolt-manifest/duration mod 3600) div 60)"/>
12
- <xsl:variable name="Seconds" select="floor(jolt-manifest/duration mod 60)"/>
4
+ <xsl:variable name="Failures" select="jolt-manifest/task[result='FAILED']" />
5
+ <xsl:variable name="Unstable" select="jolt-manifest/task[result='UNSTABLE']" />
6
+ <xsl:variable name="FailuresAndUnstable"
7
+ select="jolt-manifest/task[result='UNSTABLE' or result='FAILED']" />
8
+ <xsl:variable name="Executed"
9
+ select="jolt-manifest/task[result!='CANCELLED' and result!='SKIPPED']" />
10
+ <xsl:variable name="Successful" select="jolt-manifest/task[result='SUCCESS']" />
11
+ <xsl:variable name="Tasks" select="jolt-manifest/task" />
12
+ <xsl:variable name="Goals" select="jolt-manifest/task[goal='true']" />
13
+ <xsl:variable name="Hours" select="floor(jolt-manifest/duration div 3600)" />
14
+ <xsl:variable name="Minutes" select="floor((jolt-manifest/duration mod 3600) div 60)" />
15
+ <xsl:variable name="Seconds" select="floor(jolt-manifest/duration mod 60)" />
13
16
 
14
17
  <xsl:template match="/">
15
18
  <html>
@@ -17,25 +20,26 @@
17
20
  <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css" />
18
21
  <style type="text/css">
19
22
  pre {
20
- margin-bottom: 0px;
21
- margin-top: 0px;
22
- overflow-x: auto;
23
- white-space: pre-wrap;
24
- white-space: -moz-pre-wrap;
25
- white-space: -pre-wrap;
26
- white-space: -o-pre-wrap;
27
- word-wrap: break-word;
23
+ margin-bottom: 0px;
24
+ margin-top: 0px;
25
+ overflow-x: auto;
26
+ white-space: pre-wrap;
27
+ white-space: -moz-pre-wrap;
28
+ white-space: -pre-wrap;
29
+ white-space: -o-pre-wrap;
30
+ word-wrap: break-word;
28
31
  }
29
32
  a {
30
- color: #f44336;
33
+ color: #f44336;
31
34
  }
32
35
  a.log {
33
- color: white;
36
+ color: white;
34
37
  }
35
38
  </style>
36
39
  </head>
37
40
  <body>
38
- <table width="100%" bgcolor="#f1f1f1" style="border-bottom: 1px solid #c1c1c1; border-top: 1px solid #c1c1c1; fixed">
41
+ <table width="100%" bgcolor="#f1f1f1"
42
+ style="border-bottom: 1px solid #c1c1c1; border-top: 1px solid #c1c1c1; fixed">
39
43
  <tr>
40
44
  <td>
41
45
  <table width="720" cellpadding="10px">
@@ -52,30 +56,46 @@
52
56
  </td>
53
57
  <td width="25%" align="center" style="border-left: 1px solid #c0c0c0">
54
58
  <table>
55
- <tr><td width="100%" align="center">Completed</td></tr>
56
- <tr><td align="center"><h2><xsl:value-of select="count($Tasks)"/></h2></td></tr>
59
+ <tr>
60
+ <td width="100%" align="center">Completed</td>
61
+ </tr>
62
+ <tr>
63
+ <td align="center">
64
+ <h2>
65
+ <xsl:value-of select="count($Executed)" />
66
+ </h2>
67
+ </td>
68
+ </tr>
57
69
  </table>
58
70
  </td>
59
71
  <td width="25%" align="center" style="border-left: 1px solid #c0c0c0">
60
72
  <table>
61
- <tr><td width="100%" align="center">Failed</td></tr>
62
- <tr><td align="center"><h2><xsl:value-of select="count($FailuresAndUnstable)"/></h2></td></tr>
73
+ <tr>
74
+ <td width="100%" align="center">Failed</td>
75
+ </tr>
76
+ <tr>
77
+ <td align="center">
78
+ <h2>
79
+ <xsl:value-of select="count($FailuresAndUnstable)" />
80
+ </h2>
81
+ </td>
82
+ </tr>
63
83
  </table>
64
84
  </td>
65
85
  <td width="25%" align="center" style="border-left: 1px solid #c0c0c0">
66
86
  <table>
67
- <tr><td width="100%" align="center">Duration</td></tr>
87
+ <tr>
88
+ <td width="100%" align="center">Duration</td>
89
+ </tr>
68
90
  <tr>
69
91
  <td align="center">
70
92
  <h2>
71
93
  <xsl:if test="$Hours > 0">
72
- <xsl:value-of select="$Hours"/>h
73
- </xsl:if>
94
+ <xsl:value-of select="$Hours" />h </xsl:if>
74
95
  <xsl:if test="$Minutes > 0">
75
- <xsl:value-of select="$Minutes"/>min
76
- </xsl:if>
77
- <xsl:value-of select="$Seconds"/>s
78
- </h2>
96
+ <xsl:value-of select="$Minutes" />min </xsl:if>
97
+ <xsl:value-of
98
+ select="$Seconds" />s </h2>
79
99
  </td>
80
100
  </tr>
81
101
  </table>
@@ -88,119 +108,122 @@
88
108
 
89
109
  <xsl:choose>
90
110
  <xsl:when test="count($Failures) > 0">
91
- <p>
92
- This is an automated build report from Jolt. The build failed.
93
- <xsl:call-template name="jenkins-url" />
111
+ <p> This is an automated build report from Jolt. The build failed. <xsl:call-template
112
+ name="jenkins-url" />
94
113
  <xsl:call-template name="gerrit-url" />
95
114
  </p>
96
115
  </xsl:when>
97
116
  <xsl:when test="count($Unstable) > 0 and count($Failures) = 0">
98
- <p>
99
- This is an automated build report from Jolt. The build was successful, but unstable task failures were ignored.
100
- <xsl:call-template name="jenkins-url" />
101
- <xsl:call-template name="gerrit-url" />
117
+ <p> This is an automated build report from Jolt. The build was successful, but unstable
118
+ task failures were ignored. <xsl:call-template name="jenkins-url" />
119
+ <xsl:call-template
120
+ name="gerrit-url" />
102
121
  </p>
103
122
  </xsl:when>
104
123
  <xsl:otherwise>
105
- <p>
106
- This is an automated build report from Jolt. The build was successful.
107
- <xsl:call-template name="jenkins-url" />
124
+ <p> This is an automated build report from Jolt. The build was successful. <xsl:call-template
125
+ name="jenkins-url" />
108
126
  <xsl:call-template name="gerrit-url" />
109
127
  </p>
110
128
  </xsl:otherwise>
111
129
  </xsl:choose>
112
130
 
113
- <xsl:for-each select="$FailuresAndUnstable">
114
- <table width="100%" cellspacing="0" cellpadding="0" bgcolor="#f1f1f1">
115
- <xsl:element name="tr">
116
- <xsl:choose>
117
- <xsl:when test="result='FAILED'">
118
- <xsl:attribute name="bgcolor">#f44336</xsl:attribute>
119
- </xsl:when>
120
- <xsl:otherwise>
121
- <xsl:attribute name="bgcolor">#FF7E00</xsl:attribute>
122
- </xsl:otherwise>
123
- </xsl:choose>
124
- </xsl:element>
125
- <td style="padding: 10px">
126
- <table cellpadding="0" cellspacing="0">
127
- <tr>
128
- <td width="100%" style="font-size: 16pt; color: white;">
129
- <xsl:value-of select="@name"/>
130
- </td>
131
- <td>
132
- <xsl:if test="logstash != ''">
133
- <xsl:element name="a">
134
- <xsl:attribute name="class">log</xsl:attribute>
135
- <xsl:attribute name="href">
136
- <xsl:value-of select="logstash"/>
137
- </xsl:attribute>
138
- Log
139
- </xsl:element>
140
- </xsl:if>
141
- </td>
142
- </tr>
143
- </table>
144
- </td>
145
- <xsl:element name="tr"/>
146
-
147
- <xsl:for-each select="error">
148
- <tr>
149
- <td>
150
- <table width="100%">
151
- <tr>
152
- <td width="10%" style="padding: 5px; border-bottom: 1px solid #c1c1c1;"><xsl:value-of select="type"/></td>
153
- <td width="90%" style="padding: 5px; border-left: 1px solid #c1c1c1; border-bottom: 1px solid #c1c1c1;"><xsl:value-of select="location"/></td>
154
- </tr>
155
- </table>
156
- </td>
157
- </tr>
158
- <tr>
159
- <td style="padding: 5px; border-bottom: 1px solid #c1c1c1;"><pre><xsl:value-of select="message"/></pre></td>
160
- </tr>
161
- <xsl:if test="details != ''">
162
- <tr>
163
- <td style="padding: 5px;">
164
- <pre><xsl:value-of select="details"/></pre>
165
- </td>
166
- </tr>
167
- </xsl:if>
168
- <tr>
169
- <td style="padding: 0px; border-bottom: 2px solid #f44336;"></td>
170
- </tr>
171
- </xsl:for-each>
131
+ <xsl:for-each select="$Failures">
132
+ <xsl:call-template name="task" />
133
+ </xsl:for-each>
172
134
 
173
- </table>
174
- <br/>
135
+ <xsl:for-each select="$Unstable">
136
+ <xsl:call-template name="task" />
175
137
  </xsl:for-each>
138
+
176
139
  </body>
177
140
  </html>
178
141
  </xsl:template>
179
142
 
180
143
  <xsl:template name="jenkins-url">
181
- <xsl:if test="jolt-manifest/parameter[@key='BUILD_URL']/@value != ''">
182
- See
183
- <xsl:element name="a">
144
+ <xsl:if test="jolt-manifest/parameter[@key='BUILD_URL']/@value != ''"> See <xsl:element name="a">
184
145
  <xsl:attribute name="href">
185
- <xsl:value-of select="jolt-manifest/parameter[@key='BUILD_URL']/@value"/>
146
+ <xsl:value-of select="jolt-manifest/parameter[@key='BUILD_URL']/@value" />
186
147
  </xsl:attribute>
187
- full build log
188
- </xsl:element>
189
- for details.
190
- </xsl:if>
148
+ full build log </xsl:element> for details. </xsl:if>
191
149
  </xsl:template>
192
150
 
193
151
  <xsl:template name="gerrit-url">
194
- <xsl:if test="jolt-manifest/parameter[@key='GERRIT_URL']/@value != ''">
195
- This
196
- <xsl:element name="a">
152
+ <xsl:if test="jolt-manifest/parameter[@key='GERRIT_URL']/@value != ''"> This <xsl:element
153
+ name="a">
197
154
  <xsl:attribute name="href">
198
- <xsl:value-of select="jolt-manifest/parameter[@key='GERRIT_URL']/@value"/>
155
+ <xsl:value-of select="jolt-manifest/parameter[@key='GERRIT_URL']/@value" />
199
156
  </xsl:attribute>
200
- Gerrit change
157
+ Gerrit change </xsl:element> was built. </xsl:if>
158
+ </xsl:template>
159
+
160
+ <xsl:template name="task">
161
+ <table width="100%" cellspacing="0" cellpadding="0" bgcolor="#f1f1f1">
162
+ <xsl:element name="tr">
163
+ <xsl:choose>
164
+ <xsl:when test="result='FAILED'">
165
+ <xsl:attribute name="bgcolor">#f44336</xsl:attribute>
166
+ </xsl:when>
167
+ <xsl:otherwise>
168
+ <xsl:attribute name="bgcolor">#FF7E00</xsl:attribute>
169
+ </xsl:otherwise>
170
+ </xsl:choose>
201
171
  </xsl:element>
202
- was built.
203
- </xsl:if>
172
+ <td style="padding: 10px">
173
+ <table cellpadding="0" cellspacing="0">
174
+ <tr>
175
+ <td width="100%" style="font-size: 16pt; color: white;">
176
+ <xsl:value-of select="@name" />
177
+ </td>
178
+ <td>
179
+ <xsl:if test="logstash != ''">
180
+ <xsl:element name="a">
181
+ <xsl:attribute name="class">log</xsl:attribute>
182
+ <xsl:attribute name="href">
183
+ <xsl:value-of select="logstash" />
184
+ </xsl:attribute> Log </xsl:element>
185
+ </xsl:if>
186
+ </td>
187
+ </tr>
188
+ </table>
189
+ </td>
190
+ <xsl:element name="tr" />
191
+
192
+ <xsl:for-each select="error">
193
+ <tr>
194
+ <td>
195
+ <table width="100%">
196
+ <tr>
197
+ <td width="10%" style="padding: 5px; border-bottom: 1px solid #c1c1c1;">
198
+ <xsl:value-of select="type" />
199
+ </td>
200
+ <td width="90%"
201
+ style="padding: 5px; border-left: 1px solid #c1c1c1; border-bottom: 1px solid #c1c1c1;">
202
+ <xsl:value-of select="location" />
203
+ </td>
204
+ </tr>
205
+ </table>
206
+ </td>
207
+ </tr>
208
+ <tr>
209
+ <td style="padding: 5px; border-bottom: 1px solid #c1c1c1;">
210
+ <pre><xsl:value-of select="message"/></pre>
211
+ </td>
212
+ </tr>
213
+ <xsl:if test="details != ''">
214
+ <tr>
215
+ <td style="padding: 5px;">
216
+ <pre><xsl:value-of select="details"/></pre>
217
+ </td>
218
+ </tr>
219
+ </xsl:if>
220
+ <tr>
221
+ <td style="padding: 0px; border-bottom: 2px solid #f44336;"></td>
222
+ </tr>
223
+ </xsl:for-each>
224
+
225
+ </table>
226
+ <br />
204
227
  </xsl:template>
205
228
 
206
- </xsl:stylesheet>
229
+ </xsl:stylesheet>
jolt/plugins/environ.py CHANGED
@@ -55,6 +55,17 @@ class PathEnvironmentVariable(EnvironmentVariable):
55
55
 
56
56
 
57
57
  class EnvironmentVariableSet(ArtifactAttributeSet):
58
+ """ A set of environment variables for an artifact.
59
+
60
+ Example:
61
+
62
+ .. code-block:: python
63
+
64
+ artifact.environ.FOO = "bar"
65
+ artifact.environ.PATH.append("bin")
66
+
67
+ """
68
+
58
69
  def __init__(self, artifact):
59
70
  super(EnvironmentVariableSet, self).__init__()
60
71
  super(ArtifactAttributeSet, self).__setattr__("_artifact", artifact)
jolt/plugins/fetch.py ADDED
@@ -0,0 +1,141 @@
1
+ import hashlib
2
+ from jolt import BooleanParameter, Parameter
3
+ from jolt.plugins.git import ErrorDict
4
+ from jolt.tasks import Resource, TaskRegistry
5
+ from jolt import filesystem as fs
6
+ from jolt import utils
7
+ from jolt.error import raise_error_if
8
+ from jolt.loader import JoltLoader
9
+ from jolt.tools import SUPPORTED_ARCHIVE_TYPES
10
+
11
+
12
+ class Fetch(Resource):
13
+ """
14
+ Fetch a file from a URL and extract it.
15
+
16
+ By default, the fetched file is extracted if it is a supported archive type.
17
+ Extraction may be disable by assigning the `extract` parameter to false.
18
+
19
+ The fetched content is placed in a build directory named after the resource.
20
+ The `path` parameter can be used to specify a different location relative to
21
+ the workspace root.
22
+
23
+ The path of the fetched content is made available to consuming tasks through
24
+ the `fetch` attribute. The `fetch` attribute is a dictionary where the key
25
+ is the name of the fetched file and the value is a path relative to the
26
+ workspace root. You can specify an alias for the filename / key through the
27
+ `alias` parameter.
28
+
29
+ The plugin must be loaded before it can be used. This is done by importing
30
+ the module, or by adding the following line to the configuration file:
31
+
32
+ .. code-block:: ini
33
+
34
+ [fetch]
35
+
36
+
37
+ Example:
38
+
39
+ .. code-block:: python
40
+
41
+ from jolt.plugins import fetch
42
+
43
+ class Example(Task):
44
+ requires = ["fetch:alias=zlib,url=https://zlib.net/zlib-1.3.1.tar.gz"]
45
+
46
+ def run(self, deps, tools):
47
+ self.info("The source tree is located at: {fetch[zlib]}")
48
+ with tools.cwd(self.fetch["zlib"]):
49
+ tools.run("make")
50
+
51
+ """
52
+
53
+ name = "fetch"
54
+ alias = Parameter(required=False, help="Name of the task used when referencing content. Defaults to the filename of the fetched file.")
55
+ extract = BooleanParameter(default=True, help="Whether to extract the fetched file.")
56
+ path = Parameter(required=False, help="Destination directory.")
57
+ url = Parameter(help="URL to fetch from.")
58
+ md5 = Parameter(required=False, help="Expected MD5 hash of the fetched file.")
59
+ sha256 = Parameter(required=False, help="Expected SHA256 hash of the fetched file.")
60
+
61
+ def __init__(self, *args, **kwargs):
62
+ super().__init__(*args, **kwargs)
63
+ self.joltdir = JoltLoader.get().joltdir
64
+
65
+ # Set the path to the extraction directory
66
+ if self.path.is_unset():
67
+ self.abspath = self.tools.builddir(utils.canonical(self.short_qualified_name), incremental="always", unique=False)
68
+ if not self._extract():
69
+ # Join with filename if not extracting
70
+ self.abspath = fs.path.join(self.abspath, self._get_filename())
71
+ else:
72
+ self.abspath = fs.path.join(self.joltdir, str(self.path) or self._get_name())
73
+
74
+ self.relpath = fs.path.relpath(self.abspath, self.tools.wsroot)
75
+
76
+ def _extract(self):
77
+ """ Check if the fetched file should/can be extracted. """
78
+ filename = self._get_filename()
79
+
80
+ if not any([filename.endswith(ext) for ext in SUPPORTED_ARCHIVE_TYPES]):
81
+ return False
82
+
83
+ return bool(self.extract)
84
+
85
+ def _acquire_ws(self):
86
+ # Create the destination directory if it does not exist
87
+ self.tools.rmtree(self.abspath, ignore_errors=True)
88
+ self.tools.mkdir(fs.path.dirname(self.abspath), recursively=True)
89
+
90
+ if self._extract():
91
+ with self.tools.tmpdir() as tmpdir, self.tools.cwd(tmpdir):
92
+ filename = self._get_filename()
93
+ self.tools.download(self.url, filename)
94
+ self._verify_sha256(filename)
95
+ self.tools.extract(filename, self.abspath)
96
+ else:
97
+ self.tools.download(self.url, self.abspath)
98
+ self._verify_sha256(self.abspath)
99
+
100
+ def acquire(self, artifact, deps, tools, owner):
101
+ self._acquire_ws()
102
+ self._assign_fetch(owner)
103
+ artifact.worktree = fs.path.relpath(self.abspath, owner.joltdir)
104
+
105
+ def _assign_fetch(self, task, none=False):
106
+ if not hasattr(task, "fetch"):
107
+ task.fetch = ErrorDict(self)
108
+ if none:
109
+ # None means the git repo is not cloned or checked out
110
+ # and should not be included in the git dictionary
111
+ # of the consuming task yet. If the consuming task
112
+ # requires the git repo for its influence collection,
113
+ # the dict will raise an error. The solution is to
114
+ # assign hash=true to the git requirement which
115
+ # will cause the git repo to be cloned and checked out
116
+ # before the influence collection is performed.
117
+ task.fetch[self._get_name()] = None
118
+ else:
119
+ # Assign the git repo to the consuming task.
120
+ # The git repo is cloned and checked out before
121
+ # any influence collection is performed.
122
+ task.fetch[self._get_name()] = fs.path.relpath(self.abspath, task.joltdir)
123
+
124
+ def _get_name(self):
125
+ return str(self.alias) if self.alias.is_set() else self._get_filename()
126
+
127
+ def _get_filename(self):
128
+ return fs.path.basename(str(self.url))
129
+
130
+ def _verify_sha256(self, filepath):
131
+ if not self.sha256.is_set():
132
+ return
133
+ actual_hash = self.tools.checksum_file(filepath, hashfn=hashlib.sha256)
134
+ expected_hash = str(self.sha256)
135
+ raise_error_if(
136
+ actual_hash != expected_hash,
137
+ f"SHA256 hash mismatch for fetched file '{filepath}': expected {expected_hash}, got {actual_hash}"
138
+ )
139
+
140
+
141
+ TaskRegistry.get().add_task_class(Fetch)
jolt/plugins/gdb.py CHANGED
@@ -1,7 +1,6 @@
1
1
  import click
2
2
  import os
3
3
  import sys
4
- import subprocess
5
4
 
6
5
  from jolt import cache
7
6
  from jolt import cli
@@ -9,6 +8,7 @@ from jolt import filesystem as fs
9
8
  from jolt import graph
10
9
  from jolt import log
11
10
  from jolt import scheduler
11
+ from jolt.error import raise_error
12
12
  from jolt.error import raise_task_error_if
13
13
  from jolt.hooks import TaskHookRegistry
14
14
  from jolt.options import JoltOptions
@@ -29,7 +29,7 @@ def get_task_artifacts(task):
29
29
  artifacts = []
30
30
  for dep in task.children:
31
31
  artifacts.extend(dep.artifacts)
32
- return task.artifacts[0], artifacts
32
+ return task.artifacts, artifacts
33
33
 
34
34
 
35
35
  @cli.cli.command(name="gdb", context_settings={"ignore_unknown_options": True})
@@ -70,36 +70,44 @@ def gdb(ctx, task, default, machine_interface, no_binary, gdb_args):
70
70
  if machine_interface:
71
71
  log.enable_gdb()
72
72
 
73
- manifest = ctx.obj["manifest"]
74
73
  options = JoltOptions(default=default)
75
74
  acache = cache.ArtifactCache.get(options)
76
75
  TaskHookRegistry.get(options)
77
76
  executors = scheduler.ExecutorRegistry.get(options)
78
77
  registry = TaskRegistry.get()
79
78
  strategy = scheduler.DownloadStrategy(executors, acache)
80
- queue = scheduler.TaskQueue(strategy, acache, {})
79
+ queue = scheduler.TaskQueue()
81
80
 
82
81
  for params in default:
83
82
  registry.set_default_parameters(params)
84
83
 
85
- gb = graph.GraphBuilder(registry, acache, manifest, options, progress=True)
84
+ gb = graph.GraphBuilder(registry, acache, options, progress=True)
86
85
  dag = gb.build([task])
87
86
 
88
87
  try:
89
88
  with log.progress("Progress", dag.number_of_tasks(), " tasks", estimates=False, debug=False) as p:
89
+ in_progress = set()
90
+
90
91
  while dag.has_tasks() or not queue.empty():
91
- leafs = dag.select(lambda graph, task: task.is_ready())
92
+ leafs = dag.select(lambda graph, task: task.is_ready() and task not in in_progress)
92
93
 
93
94
  while leafs:
94
95
  task = leafs.pop()
95
- queue.submit(task)
96
+ executor = strategy.create_executor({}, task)
97
+ queue.submit(executor)
98
+ in_progress.add(task)
96
99
 
97
- task, error = queue.wait()
100
+ task, _ = queue.wait()
98
101
 
99
102
  # Materialize workspace resources so that
100
103
  # source code is available to the debugger.
101
104
  if isinstance(task.task, WorkspaceResource):
102
- task.task.acquire()
105
+ task.task.acquire_ws()
106
+
107
+ # Unpack the task if it is not a resource task and has a custom unpack method
108
+ if not task.is_resource():
109
+ if task.is_unpackable():
110
+ task.unpack()
103
111
 
104
112
  p.update(1)
105
113
 
@@ -108,27 +116,37 @@ def gdb(ctx, task, default, machine_interface, no_binary, gdb_args):
108
116
  log.warning("Interrupted by user")
109
117
  try:
110
118
  queue.abort()
119
+ executors.shutdown()
111
120
  sys.exit(1)
112
121
  except KeyboardInterrupt:
113
122
  print()
114
123
  log.warning("Interrupted again, exiting")
115
124
  os._exit(1)
125
+
116
126
  except Exception as e:
117
127
  log.set_interactive(True)
118
128
  raise e
119
129
 
130
+ finally:
131
+ queue.shutdown()
132
+
120
133
  assert len(dag.goals), "Too many tasks, can only debug one executable at a time"
121
134
 
122
135
  for goal in dag.goals:
123
136
  main, deps = get_task_artifacts(goal)
124
- stage_artifacts([main] + deps, goal.tools)
137
+ stage_artifacts(main + deps, goal.tools)
125
138
 
139
+ # Find an artifact with an executable
140
+ main = [artifact for artifact in main if artifact.strings.executable]
126
141
  raise_task_error_if(
127
- main.strings.executable.get_value() is None,
128
- goal, "No executable found in task artifact")
142
+ not main, goal, "No executable found in task artifact")
143
+ main = main[0]
129
144
 
130
145
  with acache.get_context(goal):
131
146
  gdb = goal.tools.getenv("GDB", "gdb")
147
+ gdb = goal.tools.which(gdb)
148
+ if not gdb:
149
+ raise_error("GDB not found in PATH")
132
150
  cmd = [gdb]
133
151
  sysroot = goal.tools.getenv("SDKTARGETSYSROOT", goal.tools.getenv("SYSROOT"))
134
152
  if sysroot:
@@ -146,9 +164,10 @@ def gdb(ctx, task, default, machine_interface, no_binary, gdb_args):
146
164
  cmd += gdb_args
147
165
 
148
166
  if isinstance(goal.task, ninja.CXXProject):
149
- cwd = goal.tools.builddir("ninja", incremental=True)
167
+ cwd = goal.tools.wsroot
150
168
  else:
151
169
  cwd = goal.task.joltdir
152
170
 
153
171
  with goal.tools.environ() as env:
154
- subprocess.call(cmd, env=env, cwd=cwd)
172
+ os.chdir(cwd)
173
+ os.execve(cmd[0], cmd, env)
jolt/plugins/gerrit.py CHANGED
@@ -7,18 +7,6 @@ from jolt.plugins import git
7
7
  log.verbose("[Gerrit] Loaded")
8
8
 
9
9
 
10
- class GerritSrc(git.GitSrc):
11
- name = "gerrit-src"
12
- url = Parameter(help="URL to the Gerrit git repo to be cloned. Required.")
13
- sha = Parameter(required=False, help="Specific commit or tag to be checked out. Optional.")
14
- path = Parameter(required=False, help="Local path where the repository should be cloned.")
15
- _revision = Export(value=lambda self: self._get_revision() or self.git.head())
16
-
17
- def __init__(self, *args, **kwargs):
18
- refspec1 = '+refs/changes/*:refs/remotes/origin/changes/*'
19
- super().__init__(*args, refspecs=[refspec1], **kwargs)
20
-
21
-
22
10
  class Gerrit(git.Git):
23
11
  name = "gerrit"
24
12
  url = Parameter(help="URL to the Gerrit git repo to be cloned. Required.")
@@ -31,5 +19,4 @@ class Gerrit(git.Git):
31
19
  super().__init__(*args, refspecs=[refspec1], **kwargs)
32
20
 
33
21
 
34
- TaskRegistry.get().add_task_class(GerritSrc)
35
22
  TaskRegistry.get().add_task_class(Gerrit)