diff options
Diffstat (limited to 'meta/lib')
74 files changed, 1296 insertions, 1935 deletions
diff --git a/meta/lib/bblayers/makesetup.py b/meta/lib/bblayers/makesetup.py index 99d5973760..4199b5f069 100644 --- a/meta/lib/bblayers/makesetup.py +++ b/meta/lib/bblayers/makesetup.py | |||
@@ -48,8 +48,9 @@ class MakeSetupPlugin(LayerPlugin): | |||
48 | if l_name == 'workspace': | 48 | if l_name == 'workspace': |
49 | continue | 49 | continue |
50 | if l_ismodified: | 50 | if l_ismodified: |
51 | logger.error("Layer {name} in {path} has uncommitted modifications or is not in a git repository.".format(name=l_name,path=l_path)) | 51 | e = "Layer {name} in {path} has uncommitted modifications or is not in a git repository.".format(name=l_name,path=l_path) |
52 | return | 52 | logger.error(e) |
53 | raise Exception(e) | ||
53 | repo_path = oe.buildcfg.get_metadata_git_toplevel(l_path) | 54 | repo_path = oe.buildcfg.get_metadata_git_toplevel(l_path) |
54 | 55 | ||
55 | if self._is_submodule(repo_path): | 56 | if self._is_submodule(repo_path): |
@@ -62,9 +63,6 @@ class MakeSetupPlugin(LayerPlugin): | |||
62 | 'describe':oe.buildcfg.get_metadata_git_describe(repo_path)}} | 63 | 'describe':oe.buildcfg.get_metadata_git_describe(repo_path)}} |
63 | if repo_path == destdir_repo: | 64 | if repo_path == destdir_repo: |
64 | repos[repo_path]['contains_this_file'] = True | 65 | repos[repo_path]['contains_this_file'] = True |
65 | if not repos[repo_path]['git-remote']['remotes'] and not repos[repo_path]['contains_this_file']: | ||
66 | logger.error("Layer repository in {path} does not have any remotes configured. Please add at least one with 'git remote add'.".format(path=repo_path)) | ||
67 | return | ||
68 | 66 | ||
69 | top_path = os.path.commonpath([os.path.dirname(r) for r in repos.keys()]) | 67 | top_path = os.path.commonpath([os.path.dirname(r) for r in repos.keys()]) |
70 | 68 | ||
@@ -74,6 +72,7 @@ class MakeSetupPlugin(LayerPlugin): | |||
74 | repos_nopaths[r_nopath] = repos[r] | 72 | repos_nopaths[r_nopath] = repos[r] |
75 | r_relpath = os.path.relpath(r, top_path) | 73 | r_relpath = os.path.relpath(r, top_path) |
76 | repos_nopaths[r_nopath]['path'] = r_relpath | 74 | repos_nopaths[r_nopath]['path'] = r_relpath |
75 | repos_nopaths[r_nopath]['originpath'] = r | ||
77 | return repos_nopaths | 76 | return repos_nopaths |
78 | 77 | ||
79 | def do_make_setup(self, args): | 78 | def do_make_setup(self, args): |
diff --git a/meta/lib/bblayers/setupwriters/oe-setup-layers.py b/meta/lib/bblayers/setupwriters/oe-setup-layers.py index 59ca968ff3..8faeabfabc 100644 --- a/meta/lib/bblayers/setupwriters/oe-setup-layers.py +++ b/meta/lib/bblayers/setupwriters/oe-setup-layers.py | |||
@@ -85,6 +85,11 @@ class OeSetupLayersWriter(): | |||
85 | if not os.path.exists(args.destdir): | 85 | if not os.path.exists(args.destdir): |
86 | os.makedirs(args.destdir) | 86 | os.makedirs(args.destdir) |
87 | repos = parent.make_repo_config(args.destdir) | 87 | repos = parent.make_repo_config(args.destdir) |
88 | for r in repos.values(): | ||
89 | if not r['git-remote']['remotes'] and not r.get('contains_this_file', False): | ||
90 | e = "Layer repository in {path} does not have any remotes configured. Please add at least one with 'git remote add'.".format(path=r['originpath']) | ||
91 | raise Exception(e) | ||
92 | del r['originpath'] | ||
88 | json = {"version":"1.0","sources":repos} | 93 | json = {"version":"1.0","sources":repos} |
89 | if not repos: | 94 | if not repos: |
90 | err = "Could not determine layer sources" | 95 | err = "Could not determine layer sources" |
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py index 81abfbf9e2..ced751b835 100644 --- a/meta/lib/oe/copy_buildsystem.py +++ b/meta/lib/oe/copy_buildsystem.py | |||
@@ -193,13 +193,17 @@ def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, onlynative, p | |||
193 | else: | 193 | else: |
194 | f.write(line) | 194 | f.write(line) |
195 | invalue = False | 195 | invalue = False |
196 | elif line.startswith('SIGGEN_LOCKEDSIGS'): | 196 | elif line.startswith('SIGGEN_LOCKEDSIGS_t'): |
197 | invalue = True | 197 | invalue = True |
198 | f.write(line) | 198 | f.write(line) |
199 | else: | ||
200 | invalue = False | ||
201 | f.write(line) | ||
199 | 202 | ||
200 | def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output=None): | 203 | def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output=None): |
201 | merged = {} | 204 | merged = {} |
202 | arch_order = [] | 205 | arch_order = [] |
206 | otherdata = [] | ||
203 | with open(lockedsigs_main, 'r') as f: | 207 | with open(lockedsigs_main, 'r') as f: |
204 | invalue = None | 208 | invalue = None |
205 | for line in f: | 209 | for line in f: |
@@ -212,6 +216,9 @@ def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_outpu | |||
212 | invalue = line[18:].split('=', 1)[0].rstrip() | 216 | invalue = line[18:].split('=', 1)[0].rstrip() |
213 | merged[invalue] = [] | 217 | merged[invalue] = [] |
214 | arch_order.append(invalue) | 218 | arch_order.append(invalue) |
219 | else: | ||
220 | invalue = None | ||
221 | otherdata.append(line) | ||
215 | 222 | ||
216 | with open(lockedsigs_extra, 'r') as f: | 223 | with open(lockedsigs_extra, 'r') as f: |
217 | invalue = None | 224 | invalue = None |
@@ -246,6 +253,7 @@ def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_outpu | |||
246 | f.write(' "\n') | 253 | f.write(' "\n') |
247 | fulltypes.append(typename) | 254 | fulltypes.append(typename) |
248 | f.write('SIGGEN_LOCKEDSIGS_TYPES = "%s"\n' % ' '.join(fulltypes)) | 255 | f.write('SIGGEN_LOCKEDSIGS_TYPES = "%s"\n' % ' '.join(fulltypes)) |
256 | f.write('\n' + ''.join(otherdata)) | ||
249 | 257 | ||
250 | if copy_output: | 258 | if copy_output: |
251 | write_sigs_file(copy_output, list(tocopy.keys()), tocopy) | 259 | write_sigs_file(copy_output, list(tocopy.keys()), tocopy) |
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index 1511ba47c4..d1303f32bf 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py | |||
@@ -195,14 +195,28 @@ def strip_execs(pn, dstdir, strip_cmd, libdir, base_libdir, max_process, qa_alre | |||
195 | 195 | ||
196 | oe.utils.multiprocess_launch_mp(runstrip, sfiles, max_process) | 196 | oe.utils.multiprocess_launch_mp(runstrip, sfiles, max_process) |
197 | 197 | ||
198 | TRANSLATE = ( | ||
199 | ("@", "@at@"), | ||
200 | (" ", "@space@"), | ||
201 | ("\t", "@tab@"), | ||
202 | ("[", "@openbrace@"), | ||
203 | ("]", "@closebrace@"), | ||
204 | ("_", "@underscore@"), | ||
205 | (":", "@colon@"), | ||
206 | ) | ||
198 | 207 | ||
199 | def file_translate(file): | 208 | def file_translate(file): |
200 | ft = file.replace("@", "@at@") | 209 | ft = file |
201 | ft = ft.replace(" ", "@space@") | 210 | for s, replace in TRANSLATE: |
202 | ft = ft.replace("\t", "@tab@") | 211 | ft = ft.replace(s, replace) |
203 | ft = ft.replace("[", "@openbrace@") | 212 | |
204 | ft = ft.replace("]", "@closebrace@") | 213 | return ft |
205 | ft = ft.replace("_", "@underscore@") | 214 | |
215 | def file_reverse_translate(file): | ||
216 | ft = file | ||
217 | for s, replace in reversed(TRANSLATE): | ||
218 | ft = ft.replace(replace, s) | ||
219 | |||
206 | return ft | 220 | return ft |
207 | 221 | ||
208 | def filedeprunner(arg): | 222 | def filedeprunner(arg): |
diff --git a/meta/lib/oe/package_manager/__init__.py b/meta/lib/oe/package_manager/__init__.py index 6774cdb794..d3b2317894 100644 --- a/meta/lib/oe/package_manager/__init__.py +++ b/meta/lib/oe/package_manager/__init__.py | |||
@@ -449,7 +449,7 @@ class PackageManager(object, metaclass=ABCMeta): | |||
449 | return res | 449 | return res |
450 | return _append(uris, base_paths) | 450 | return _append(uris, base_paths) |
451 | 451 | ||
452 | def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies): | 452 | def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies, include_self=False): |
453 | """ | 453 | """ |
454 | Go through our do_package_write_X dependencies and hardlink the packages we depend | 454 | Go through our do_package_write_X dependencies and hardlink the packages we depend |
455 | upon into the repo directory. This prevents us seeing other packages that may | 455 | upon into the repo directory. This prevents us seeing other packages that may |
@@ -486,14 +486,17 @@ def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencie | |||
486 | bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?") | 486 | bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?") |
487 | pkgdeps = set() | 487 | pkgdeps = set() |
488 | start = [start] | 488 | start = [start] |
489 | seen = set(start) | 489 | if include_self: |
490 | seen = set() | ||
491 | else: | ||
492 | seen = set(start) | ||
490 | # Support direct dependencies (do_rootfs -> do_package_write_X) | 493 | # Support direct dependencies (do_rootfs -> do_package_write_X) |
491 | # or indirect dependencies within PN (do_populate_sdk_ext -> do_rootfs -> do_package_write_X) | 494 | # or indirect dependencies within PN (do_populate_sdk_ext -> do_rootfs -> do_package_write_X) |
492 | while start: | 495 | while start: |
493 | next = [] | 496 | next = [] |
494 | for dep2 in start: | 497 | for dep2 in start: |
495 | for dep in taskdepdata[dep2][3]: | 498 | for dep in taskdepdata[dep2][3]: |
496 | if taskdepdata[dep][0] != pn: | 499 | if include_self or taskdepdata[dep][0] != pn: |
497 | if "do_" + taskname in dep: | 500 | if "do_" + taskname in dep: |
498 | pkgdeps.add(dep) | 501 | pkgdeps.add(dep) |
499 | elif dep not in seen: | 502 | elif dep not in seen: |
diff --git a/meta/lib/oe/package_manager/common_deb_ipk.py b/meta/lib/oe/package_manager/common_deb_ipk.py new file mode 100644 index 0000000000..6a1e28ee6f --- /dev/null +++ b/meta/lib/oe/package_manager/common_deb_ipk.py | |||
@@ -0,0 +1,97 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: GPL-2.0-only | ||
5 | # | ||
6 | |||
7 | import glob | ||
8 | import os | ||
9 | import subprocess | ||
10 | import tempfile | ||
11 | |||
12 | import bb | ||
13 | |||
14 | from oe.package_manager import opkg_query, PackageManager | ||
15 | |||
16 | class OpkgDpkgPM(PackageManager): | ||
17 | def __init__(self, d, target_rootfs): | ||
18 | """ | ||
19 | This is an abstract class. Do not instantiate this directly. | ||
20 | """ | ||
21 | super(OpkgDpkgPM, self).__init__(d, target_rootfs) | ||
22 | |||
23 | def package_info(self, pkg): | ||
24 | """ | ||
25 | Returns a dictionary with the package info. | ||
26 | """ | ||
27 | raise NotImplementedError | ||
28 | |||
29 | def _common_package_info(self, cmd): | ||
30 | """ | ||
31 | "Returns a dictionary with the package info. | ||
32 | |||
33 | This method extracts the common parts for Opkg and Dpkg | ||
34 | """ | ||
35 | |||
36 | proc = subprocess.run(cmd, capture_output=True, encoding="utf-8", shell=True) | ||
37 | if proc.returncode: | ||
38 | bb.fatal("Unable to list available packages. Command '%s' " | ||
39 | "returned %d:\n%s" % (cmd, proc.returncode, proc.stderr)) | ||
40 | elif proc.stderr: | ||
41 | bb.note("Command '%s' returned stderr: %s" % (cmd, proc.stderr)) | ||
42 | |||
43 | return opkg_query(proc.stdout) | ||
44 | |||
45 | def extract(self, pkg): | ||
46 | """ | ||
47 | Returns the path to a tmpdir where resides the contents of a package. | ||
48 | |||
49 | Deleting the tmpdir is responsability of the caller. | ||
50 | """ | ||
51 | pkg_info = self.package_info(pkg) | ||
52 | if not pkg_info: | ||
53 | bb.fatal("Unable to get information for package '%s' while " | ||
54 | "trying to extract the package." % pkg) | ||
55 | |||
56 | ar_cmd = bb.utils.which(os.getenv("PATH"), "ar") | ||
57 | tar_cmd = bb.utils.which(os.getenv("PATH"), "tar") | ||
58 | pkg_path = pkg_info[pkg]["filepath"] | ||
59 | |||
60 | if not os.path.isfile(pkg_path): | ||
61 | bb.fatal("Unable to extract package for '%s'." | ||
62 | "File %s doesn't exists" % (pkg, pkg_path)) | ||
63 | |||
64 | tmp_dir = tempfile.mkdtemp() | ||
65 | current_dir = os.getcwd() | ||
66 | os.chdir(tmp_dir) | ||
67 | |||
68 | try: | ||
69 | cmd = [ar_cmd, 'x', pkg_path] | ||
70 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) | ||
71 | data_tar = glob.glob("data.tar.*") | ||
72 | if len(data_tar) != 1: | ||
73 | bb.fatal("Unable to extract %s package. Failed to identify " | ||
74 | "data tarball (found tarballs '%s').", | ||
75 | pkg_path, data_tar) | ||
76 | data_tar = data_tar[0] | ||
77 | cmd = [tar_cmd, 'xf', data_tar] | ||
78 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) | ||
79 | except subprocess.CalledProcessError as e: | ||
80 | bb.utils.remove(tmp_dir, recurse=True) | ||
81 | bb.fatal("Unable to extract %s package. Command '%s' " | ||
82 | "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8"))) | ||
83 | except OSError as e: | ||
84 | bb.utils.remove(tmp_dir, recurse=True) | ||
85 | bb.fatal("Unable to extract %s package. Command '%s' " | ||
86 | "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename)) | ||
87 | |||
88 | bb.note("Extracted %s to %s" % (pkg_path, tmp_dir)) | ||
89 | bb.utils.remove(os.path.join(tmp_dir, "debian-binary")) | ||
90 | bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz")) | ||
91 | bb.utils.remove(os.path.join(tmp_dir, data_tar)) | ||
92 | os.chdir(current_dir) | ||
93 | |||
94 | return tmp_dir | ||
95 | |||
96 | def _handle_intercept_failure(self, registered_pkgs): | ||
97 | self.mark_packages("unpacked", registered_pkgs.split()) | ||
diff --git a/meta/lib/oe/package_manager/deb/__init__.py b/meta/lib/oe/package_manager/deb/__init__.py index 0c23c884c1..e09e81e490 100644 --- a/meta/lib/oe/package_manager/deb/__init__.py +++ b/meta/lib/oe/package_manager/deb/__init__.py | |||
@@ -7,6 +7,7 @@ | |||
7 | import re | 7 | import re |
8 | import subprocess | 8 | import subprocess |
9 | from oe.package_manager import * | 9 | from oe.package_manager import * |
10 | from oe.package_manager.common_deb_ipk import OpkgDpkgPM | ||
10 | 11 | ||
11 | class DpkgIndexer(Indexer): | 12 | class DpkgIndexer(Indexer): |
12 | def _create_configs(self): | 13 | def _create_configs(self): |
@@ -111,72 +112,6 @@ class PMPkgsList(PkgsList): | |||
111 | 112 | ||
112 | return opkg_query(cmd_output) | 113 | return opkg_query(cmd_output) |
113 | 114 | ||
114 | class OpkgDpkgPM(PackageManager): | ||
115 | def __init__(self, d, target_rootfs): | ||
116 | """ | ||
117 | This is an abstract class. Do not instantiate this directly. | ||
118 | """ | ||
119 | super(OpkgDpkgPM, self).__init__(d, target_rootfs) | ||
120 | |||
121 | def package_info(self, pkg, cmd): | ||
122 | """ | ||
123 | Returns a dictionary with the package info. | ||
124 | |||
125 | This method extracts the common parts for Opkg and Dpkg | ||
126 | """ | ||
127 | |||
128 | try: | ||
129 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8") | ||
130 | except subprocess.CalledProcessError as e: | ||
131 | bb.fatal("Unable to list available packages. Command '%s' " | ||
132 | "returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8"))) | ||
133 | return opkg_query(output) | ||
134 | |||
135 | def extract(self, pkg, pkg_info): | ||
136 | """ | ||
137 | Returns the path to a tmpdir where resides the contents of a package. | ||
138 | |||
139 | Deleting the tmpdir is responsability of the caller. | ||
140 | |||
141 | This method extracts the common parts for Opkg and Dpkg | ||
142 | """ | ||
143 | |||
144 | ar_cmd = bb.utils.which(os.getenv("PATH"), "ar") | ||
145 | tar_cmd = bb.utils.which(os.getenv("PATH"), "tar") | ||
146 | pkg_path = pkg_info[pkg]["filepath"] | ||
147 | |||
148 | if not os.path.isfile(pkg_path): | ||
149 | bb.fatal("Unable to extract package for '%s'." | ||
150 | "File %s doesn't exists" % (pkg, pkg_path)) | ||
151 | |||
152 | tmp_dir = tempfile.mkdtemp() | ||
153 | current_dir = os.getcwd() | ||
154 | os.chdir(tmp_dir) | ||
155 | data_tar = 'data.tar.xz' | ||
156 | |||
157 | try: | ||
158 | cmd = [ar_cmd, 'x', pkg_path] | ||
159 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) | ||
160 | cmd = [tar_cmd, 'xf', data_tar] | ||
161 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) | ||
162 | except subprocess.CalledProcessError as e: | ||
163 | bb.utils.remove(tmp_dir, recurse=True) | ||
164 | bb.fatal("Unable to extract %s package. Command '%s' " | ||
165 | "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8"))) | ||
166 | except OSError as e: | ||
167 | bb.utils.remove(tmp_dir, recurse=True) | ||
168 | bb.fatal("Unable to extract %s package. Command '%s' " | ||
169 | "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename)) | ||
170 | |||
171 | bb.note("Extracted %s to %s" % (pkg_path, tmp_dir)) | ||
172 | bb.utils.remove(os.path.join(tmp_dir, "debian-binary")) | ||
173 | bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz")) | ||
174 | os.chdir(current_dir) | ||
175 | |||
176 | return tmp_dir | ||
177 | |||
178 | def _handle_intercept_failure(self, registered_pkgs): | ||
179 | self.mark_packages("unpacked", registered_pkgs.split()) | ||
180 | 115 | ||
181 | class DpkgPM(OpkgDpkgPM): | 116 | class DpkgPM(OpkgDpkgPM): |
182 | def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None, deb_repo_workdir="oe-rootfs-repo", filterbydependencies=True): | 117 | def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None, deb_repo_workdir="oe-rootfs-repo", filterbydependencies=True): |
@@ -496,7 +431,7 @@ class DpkgPM(OpkgDpkgPM): | |||
496 | Returns a dictionary with the package info. | 431 | Returns a dictionary with the package info. |
497 | """ | 432 | """ |
498 | cmd = "%s show %s" % (self.apt_cache_cmd, pkg) | 433 | cmd = "%s show %s" % (self.apt_cache_cmd, pkg) |
499 | pkg_info = super(DpkgPM, self).package_info(pkg, cmd) | 434 | pkg_info = self._common_package_info(cmd) |
500 | 435 | ||
501 | pkg_arch = pkg_info[pkg]["pkgarch"] | 436 | pkg_arch = pkg_info[pkg]["pkgarch"] |
502 | pkg_filename = pkg_info[pkg]["filename"] | 437 | pkg_filename = pkg_info[pkg]["filename"] |
@@ -504,19 +439,3 @@ class DpkgPM(OpkgDpkgPM): | |||
504 | os.path.join(self.deploy_dir, pkg_arch, pkg_filename) | 439 | os.path.join(self.deploy_dir, pkg_arch, pkg_filename) |
505 | 440 | ||
506 | return pkg_info | 441 | return pkg_info |
507 | |||
508 | def extract(self, pkg): | ||
509 | """ | ||
510 | Returns the path to a tmpdir where resides the contents of a package. | ||
511 | |||
512 | Deleting the tmpdir is responsability of the caller. | ||
513 | """ | ||
514 | pkg_info = self.package_info(pkg) | ||
515 | if not pkg_info: | ||
516 | bb.fatal("Unable to get information for package '%s' while " | ||
517 | "trying to extract the package." % pkg) | ||
518 | |||
519 | tmp_dir = super(DpkgPM, self).extract(pkg, pkg_info) | ||
520 | bb.utils.remove(os.path.join(tmp_dir, "data.tar.xz")) | ||
521 | |||
522 | return tmp_dir | ||
diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py index 8cc9953a02..3d998e52ff 100644 --- a/meta/lib/oe/package_manager/ipk/__init__.py +++ b/meta/lib/oe/package_manager/ipk/__init__.py | |||
@@ -8,6 +8,7 @@ import re | |||
8 | import shutil | 8 | import shutil |
9 | import subprocess | 9 | import subprocess |
10 | from oe.package_manager import * | 10 | from oe.package_manager import * |
11 | from oe.package_manager.common_deb_ipk import OpkgDpkgPM | ||
11 | 12 | ||
12 | class OpkgIndexer(Indexer): | 13 | class OpkgIndexer(Indexer): |
13 | def write_index(self): | 14 | def write_index(self): |
@@ -90,76 +91,6 @@ class PMPkgsList(PkgsList): | |||
90 | return opkg_query(cmd_output) | 91 | return opkg_query(cmd_output) |
91 | 92 | ||
92 | 93 | ||
93 | |||
94 | class OpkgDpkgPM(PackageManager): | ||
95 | def __init__(self, d, target_rootfs): | ||
96 | """ | ||
97 | This is an abstract class. Do not instantiate this directly. | ||
98 | """ | ||
99 | super(OpkgDpkgPM, self).__init__(d, target_rootfs) | ||
100 | |||
101 | def package_info(self, pkg, cmd): | ||
102 | """ | ||
103 | Returns a dictionary with the package info. | ||
104 | |||
105 | This method extracts the common parts for Opkg and Dpkg | ||
106 | """ | ||
107 | |||
108 | proc = subprocess.run(cmd, capture_output=True, encoding="utf-8", shell=True) | ||
109 | if proc.returncode: | ||
110 | bb.fatal("Unable to list available packages. Command '%s' " | ||
111 | "returned %d:\n%s" % (cmd, proc.returncode, proc.stderr)) | ||
112 | elif proc.stderr: | ||
113 | bb.note("Command '%s' returned stderr: %s" % (cmd, proc.stderr)) | ||
114 | |||
115 | return opkg_query(proc.stdout) | ||
116 | |||
117 | def extract(self, pkg, pkg_info): | ||
118 | """ | ||
119 | Returns the path to a tmpdir where resides the contents of a package. | ||
120 | |||
121 | Deleting the tmpdir is responsability of the caller. | ||
122 | |||
123 | This method extracts the common parts for Opkg and Dpkg | ||
124 | """ | ||
125 | |||
126 | ar_cmd = bb.utils.which(os.getenv("PATH"), "ar") | ||
127 | tar_cmd = bb.utils.which(os.getenv("PATH"), "tar") | ||
128 | pkg_path = pkg_info[pkg]["filepath"] | ||
129 | |||
130 | if not os.path.isfile(pkg_path): | ||
131 | bb.fatal("Unable to extract package for '%s'." | ||
132 | "File %s doesn't exists" % (pkg, pkg_path)) | ||
133 | |||
134 | tmp_dir = tempfile.mkdtemp() | ||
135 | current_dir = os.getcwd() | ||
136 | os.chdir(tmp_dir) | ||
137 | data_tar = 'data.tar.zst' | ||
138 | |||
139 | try: | ||
140 | cmd = [ar_cmd, 'x', pkg_path] | ||
141 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) | ||
142 | cmd = [tar_cmd, 'xf', data_tar] | ||
143 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT) | ||
144 | except subprocess.CalledProcessError as e: | ||
145 | bb.utils.remove(tmp_dir, recurse=True) | ||
146 | bb.fatal("Unable to extract %s package. Command '%s' " | ||
147 | "returned %d:\n%s" % (pkg_path, ' '.join(cmd), e.returncode, e.output.decode("utf-8"))) | ||
148 | except OSError as e: | ||
149 | bb.utils.remove(tmp_dir, recurse=True) | ||
150 | bb.fatal("Unable to extract %s package. Command '%s' " | ||
151 | "returned %d:\n%s at %s" % (pkg_path, ' '.join(cmd), e.errno, e.strerror, e.filename)) | ||
152 | |||
153 | bb.note("Extracted %s to %s" % (pkg_path, tmp_dir)) | ||
154 | bb.utils.remove(os.path.join(tmp_dir, "debian-binary")) | ||
155 | bb.utils.remove(os.path.join(tmp_dir, "control.tar.gz")) | ||
156 | os.chdir(current_dir) | ||
157 | |||
158 | return tmp_dir | ||
159 | |||
160 | def _handle_intercept_failure(self, registered_pkgs): | ||
161 | self.mark_packages("unpacked", registered_pkgs.split()) | ||
162 | |||
163 | class OpkgPM(OpkgDpkgPM): | 94 | class OpkgPM(OpkgDpkgPM): |
164 | def __init__(self, d, target_rootfs, config_file, archs, task_name='target', ipk_repo_workdir="oe-rootfs-repo", filterbydependencies=True, prepare_index=True): | 95 | def __init__(self, d, target_rootfs, config_file, archs, task_name='target', ipk_repo_workdir="oe-rootfs-repo", filterbydependencies=True, prepare_index=True): |
165 | super(OpkgPM, self).__init__(d, target_rootfs) | 96 | super(OpkgPM, self).__init__(d, target_rootfs) |
@@ -485,7 +416,7 @@ class OpkgPM(OpkgDpkgPM): | |||
485 | Returns a dictionary with the package info. | 416 | Returns a dictionary with the package info. |
486 | """ | 417 | """ |
487 | cmd = "%s %s info %s" % (self.opkg_cmd, self.opkg_args, pkg) | 418 | cmd = "%s %s info %s" % (self.opkg_cmd, self.opkg_args, pkg) |
488 | pkg_info = super(OpkgPM, self).package_info(pkg, cmd) | 419 | pkg_info = self._common_package_info(cmd) |
489 | 420 | ||
490 | pkg_arch = pkg_info[pkg]["arch"] | 421 | pkg_arch = pkg_info[pkg]["arch"] |
491 | pkg_filename = pkg_info[pkg]["filename"] | 422 | pkg_filename = pkg_info[pkg]["filename"] |
@@ -493,19 +424,3 @@ class OpkgPM(OpkgDpkgPM): | |||
493 | os.path.join(self.deploy_dir, pkg_arch, pkg_filename) | 424 | os.path.join(self.deploy_dir, pkg_arch, pkg_filename) |
494 | 425 | ||
495 | return pkg_info | 426 | return pkg_info |
496 | |||
497 | def extract(self, pkg): | ||
498 | """ | ||
499 | Returns the path to a tmpdir where resides the contents of a package. | ||
500 | |||
501 | Deleting the tmpdir is responsability of the caller. | ||
502 | """ | ||
503 | pkg_info = self.package_info(pkg) | ||
504 | if not pkg_info: | ||
505 | bb.fatal("Unable to get information for package '%s' while " | ||
506 | "trying to extract the package." % pkg) | ||
507 | |||
508 | tmp_dir = super(OpkgPM, self).extract(pkg, pkg_info) | ||
509 | bb.utils.remove(os.path.join(tmp_dir, "data.tar.zst")) | ||
510 | |||
511 | return tmp_dir | ||
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index de1fbdd3a8..2d69a33113 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -818,7 +818,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False, | |||
818 | instdirline = 'install -d ${D}%s' % os.path.dirname(instdestpath) | 818 | instdirline = 'install -d ${D}%s' % os.path.dirname(instdestpath) |
819 | if not instdirline in instfunclines: | 819 | if not instdirline in instfunclines: |
820 | instfunclines.append(instdirline) | 820 | instfunclines.append(instdirline) |
821 | instfunclines.append('install -m %s ${WORKDIR}/%s ${D}%s' % (perms, os.path.basename(srcfile), instdestpath)) | 821 | instfunclines.append('install -m %s ${UNPACKDIR}/%s ${D}%s' % (perms, os.path.basename(srcfile), instdestpath)) |
822 | if instfunclines: | 822 | if instfunclines: |
823 | bbappendlines.append(('do_install:append%s()' % appendoverride, '', instfunclines)) | 823 | bbappendlines.append(('do_install:append%s()' % appendoverride, '', instfunclines)) |
824 | 824 | ||
diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py index a9f717159e..1957c97434 100644 --- a/meta/lib/oe/reproducible.py +++ b/meta/lib/oe/reproducible.py | |||
@@ -75,10 +75,10 @@ def get_source_date_epoch_from_known_files(d, sourcedir): | |||
75 | return source_date_epoch | 75 | return source_date_epoch |
76 | 76 | ||
77 | def find_git_folder(d, sourcedir): | 77 | def find_git_folder(d, sourcedir): |
78 | # First guess: WORKDIR/git | 78 | # First guess: UNPACKDIR/git |
79 | # This is the default git fetcher unpack path | 79 | # This is the default git fetcher unpack path |
80 | workdir = d.getVar('WORKDIR') | 80 | unpackdir = d.getVar('UNPACKDIR') |
81 | gitpath = os.path.join(workdir, "git/.git") | 81 | gitpath = os.path.join(unpackdir, "git/.git") |
82 | if os.path.isdir(gitpath): | 82 | if os.path.isdir(gitpath): |
83 | return gitpath | 83 | return gitpath |
84 | 84 | ||
@@ -88,15 +88,16 @@ def find_git_folder(d, sourcedir): | |||
88 | return gitpath | 88 | return gitpath |
89 | 89 | ||
90 | # Perhaps there was a subpath or destsuffix specified. | 90 | # Perhaps there was a subpath or destsuffix specified. |
91 | # Go looking in the WORKDIR | 91 | # Go looking in the UNPACKDIR |
92 | exclude = set(["build", "image", "license-destdir", "patches", "pseudo", | 92 | for root, dirs, files in os.walk(unpackdir, topdown=True): |
93 | "recipe-sysroot", "recipe-sysroot-native", "sysroot-destdir", "temp"]) | ||
94 | for root, dirs, files in os.walk(workdir, topdown=True): | ||
95 | dirs[:] = [d for d in dirs if d not in exclude] | ||
96 | if '.git' in dirs: | 93 | if '.git' in dirs: |
97 | return os.path.join(root, ".git") | 94 | return os.path.join(root, ".git") |
98 | 95 | ||
99 | bb.warn("Failed to find a git repository in WORKDIR: %s" % workdir) | 96 | for root, dirs, files in os.walk(sourcedir, topdown=True): |
97 | if '.git' in dirs: | ||
98 | return os.path.join(root, ".git") | ||
99 | |||
100 | bb.warn("Failed to find a git repository in UNPACKDIR: %s" % unpackdir) | ||
100 | return None | 101 | return None |
101 | 102 | ||
102 | def get_source_date_epoch_from_git(d, sourcedir): | 103 | def get_source_date_epoch_from_git(d, sourcedir): |
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index a46e5502ab..b6f8ab92cb 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
@@ -93,6 +93,14 @@ def sstate_lockedsigs(d): | |||
93 | sigs[pn][task] = [h, siggen_lockedsigs_var] | 93 | sigs[pn][task] = [h, siggen_lockedsigs_var] |
94 | return sigs | 94 | return sigs |
95 | 95 | ||
96 | def lockedsigs_unihashmap(d): | ||
97 | unihashmap = {} | ||
98 | data = (d.getVar("SIGGEN_UNIHASHMAP") or "").split() | ||
99 | for entry in data: | ||
100 | pn, task, taskhash, unihash = entry.split(":") | ||
101 | unihashmap[(pn, task)] = (taskhash, unihash) | ||
102 | return unihashmap | ||
103 | |||
96 | class SignatureGeneratorOEBasicHashMixIn(object): | 104 | class SignatureGeneratorOEBasicHashMixIn(object): |
97 | supports_multiconfig_datacaches = True | 105 | supports_multiconfig_datacaches = True |
98 | 106 | ||
@@ -100,6 +108,7 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
100 | self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split() | 108 | self.abisaferecipes = (data.getVar("SIGGEN_EXCLUDERECIPES_ABISAFE") or "").split() |
101 | self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split() | 109 | self.saferecipedeps = (data.getVar("SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS") or "").split() |
102 | self.lockedsigs = sstate_lockedsigs(data) | 110 | self.lockedsigs = sstate_lockedsigs(data) |
111 | self.unihashmap = lockedsigs_unihashmap(data) | ||
103 | self.lockedhashes = {} | 112 | self.lockedhashes = {} |
104 | self.lockedpnmap = {} | 113 | self.lockedpnmap = {} |
105 | self.lockedhashfn = {} | 114 | self.lockedhashfn = {} |
@@ -209,6 +218,15 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
209 | def get_cached_unihash(self, tid): | 218 | def get_cached_unihash(self, tid): |
210 | if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal: | 219 | if tid in self.lockedhashes and self.lockedhashes[tid] and not self._internal: |
211 | return self.lockedhashes[tid] | 220 | return self.lockedhashes[tid] |
221 | |||
222 | (mc, _, task, fn) = bb.runqueue.split_tid_mcfn(tid) | ||
223 | recipename = self.lockedpnmap[fn] | ||
224 | |||
225 | if (recipename, task) in self.unihashmap: | ||
226 | taskhash, unihash = self.unihashmap[(recipename, task)] | ||
227 | if taskhash == self.taskhash[tid]: | ||
228 | return unihash | ||
229 | |||
212 | return super().get_cached_unihash(tid) | 230 | return super().get_cached_unihash(tid) |
213 | 231 | ||
214 | def dump_sigtask(self, fn, task, stampbase, runtime): | 232 | def dump_sigtask(self, fn, task, stampbase, runtime): |
@@ -219,6 +237,7 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
219 | 237 | ||
220 | def dump_lockedsigs(self, sigfile, taskfilter=None): | 238 | def dump_lockedsigs(self, sigfile, taskfilter=None): |
221 | types = {} | 239 | types = {} |
240 | unihashmap = {} | ||
222 | for tid in self.runtaskdeps: | 241 | for tid in self.runtaskdeps: |
223 | # Bitbake changed this to a tuple in newer versions | 242 | # Bitbake changed this to a tuple in newer versions |
224 | if isinstance(tid, tuple): | 243 | if isinstance(tid, tuple): |
@@ -226,13 +245,18 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
226 | if taskfilter: | 245 | if taskfilter: |
227 | if not tid in taskfilter: | 246 | if not tid in taskfilter: |
228 | continue | 247 | continue |
229 | fn = bb.runqueue.fn_from_tid(tid) | 248 | (_, _, task, fn) = bb.runqueue.split_tid_mcfn(tid) |
230 | t = self.lockedhashfn[fn].split(" ")[1].split(":")[5] | 249 | t = self.lockedhashfn[fn].split(" ")[1].split(":")[5] |
231 | t = 't-' + t.replace('_', '-') | 250 | t = 't-' + t.replace('_', '-') |
232 | if t not in types: | 251 | if t not in types: |
233 | types[t] = [] | 252 | types[t] = [] |
234 | types[t].append(tid) | 253 | types[t].append(tid) |
235 | 254 | ||
255 | taskhash = self.taskhash[tid] | ||
256 | unihash = self.get_unihash(tid) | ||
257 | if taskhash != unihash: | ||
258 | unihashmap[tid] = " " + self.lockedpnmap[fn] + ":" + task + ":" + taskhash + ":" + unihash | ||
259 | |||
236 | with open(sigfile, "w") as f: | 260 | with open(sigfile, "w") as f: |
237 | l = sorted(types) | 261 | l = sorted(types) |
238 | for t in l: | 262 | for t in l: |
@@ -245,7 +269,12 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
245 | continue | 269 | continue |
246 | f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n") | 270 | f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.get_unihash(tid) + " \\\n") |
247 | f.write(' "\n') | 271 | f.write(' "\n') |
248 | f.write('SIGGEN_LOCKEDSIGS_TYPES:%s = "%s"' % (self.machine, " ".join(l))) | 272 | f.write('SIGGEN_LOCKEDSIGS_TYPES:%s = "%s"\n' % (self.machine, " ".join(l))) |
273 | f.write('SIGGEN_UNIHASHMAP += "\\\n') | ||
274 | sortedtid = sorted(unihashmap, key=lambda tid: self.lockedpnmap[bb.runqueue.fn_from_tid(tid)]) | ||
275 | for tid in sortedtid: | ||
276 | f.write(unihashmap[tid] + " \\\n") | ||
277 | f.write(' "\n') | ||
249 | 278 | ||
250 | def dump_siglist(self, sigfile, path_prefix_strip=None): | 279 | def dump_siglist(self, sigfile, path_prefix_strip=None): |
251 | def strip_fn(fn): | 280 | def strip_fn(fn): |
@@ -327,7 +356,6 @@ class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.sigge | |||
327 | self.method = data.getVar('SSTATE_HASHEQUIV_METHOD') | 356 | self.method = data.getVar('SSTATE_HASHEQUIV_METHOD') |
328 | if not self.method: | 357 | if not self.method: |
329 | bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set") | 358 | bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set") |
330 | self.max_parallel = int(data.getVar('BB_HASHSERVE_MAX_PARALLEL') or 1) | ||
331 | self.username = data.getVar("BB_HASHSERVE_USERNAME") | 359 | self.username = data.getVar("BB_HASHSERVE_USERNAME") |
332 | self.password = data.getVar("BB_HASHSERVE_PASSWORD") | 360 | self.password = data.getVar("BB_HASHSERVE_PASSWORD") |
333 | if not self.username or not self.password: | 361 | if not self.username or not self.password: |
diff --git a/meta/lib/oeqa/core/tests/common.py b/meta/lib/oeqa/core/tests/common.py index 88cc758ad3..bcc4fde632 100644 --- a/meta/lib/oeqa/core/tests/common.py +++ b/meta/lib/oeqa/core/tests/common.py | |||
@@ -9,7 +9,6 @@ import os | |||
9 | 9 | ||
10 | import unittest | 10 | import unittest |
11 | import logging | 11 | import logging |
12 | import os | ||
13 | 12 | ||
14 | logger = logging.getLogger("oeqa") | 13 | logger = logging.getLogger("oeqa") |
15 | logger.setLevel(logging.INFO) | 14 | logger.setLevel(logging.INFO) |
diff --git a/meta/lib/oeqa/manual/crops.json b/meta/lib/oeqa/manual/crops.json deleted file mode 100644 index 5cfa653843..0000000000 --- a/meta/lib/oeqa/manual/crops.json +++ /dev/null | |||
@@ -1,294 +0,0 @@ | |||
1 | [ | ||
2 | { | ||
3 | "test": { | ||
4 | "@alias": "crops-default.crops-default.sdkext_eSDK_devtool_build_make", | ||
5 | "author": [ | ||
6 | { | ||
7 | "email": "francisco.j.pedraza.gonzalez@intel.com", | ||
8 | "name": "francisco.j.pedraza.gonzalez@intel.com" | ||
9 | } | ||
10 | ], | ||
11 | "execution": { | ||
12 | "1": { | ||
13 | "action": "IMPORTANT NOTE: The firsts 5 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n", | ||
14 | "expected_results": "" | ||
15 | }, | ||
16 | "2": { | ||
17 | "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n", | ||
18 | "expected_results": "" | ||
19 | }, | ||
20 | "3": { | ||
21 | "action": "Create the following tree of files <crops-esdk-workdir-workspace>/sdkext/files/myapp <crops-esdk-workdir-workspace>/sdkext/files/myapp_cmake \n\n\n", | ||
22 | "expected_results": "" | ||
23 | }, | ||
24 | "4": { | ||
25 | "action": " Create the following files withing the myapp directory myapp.c and the Makefile. Write the following inside of each file: \n---------------------------------------- \nMakefile should contain \n\nall: myapp \n\nmyapp: myapp.o \n\t$(CC) $(LDFLAGS) $< -o $@ \n\nmyapp.o: myapp.c \n\t$(CC) $(CFLAGS) -c $< -o $@ \n\nclean: \n\trm -rf myapp.o myapp \n\n----------------------------- \nmyapp.c shold contain \n\n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n \n\treturn 0; \n} \n------------------------------------ \n\n", | ||
26 | "expected_results": "be sure that the indentations on the makefile are tabs not spaces. \n\n" | ||
27 | }, | ||
28 | "5": { | ||
29 | "action": " Create the following files within the myapp_cmake directory CMakeLists.txt and myapp.c. Write the following inside each file: \n\n------------------------------------ \nCMakeLists.txt should contain: \n\ncmake_minimum_required (VERSION 2.6) \nproject (myapp) \n# The version number. \nset (myapp_VERSION_MAJOR 1) \nset (myapp_VERSION_MINOR 0) \n\n# add the executable \nadd_executable (myapp myapp.c) \n\ninstall(TARGETS myapp \nRUNTIME DESTINATION bin) \n\n------------------------------------------ \nmyapp.c should contain: \n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n\n\treturn 0; \n} \n------------------------------------------------- \n\n", | ||
30 | "expected_results": "Be sure that the indentations on CMakeLists.txt is tabs not spaces." | ||
31 | }, | ||
32 | "6": { | ||
33 | "action": " source environment-setup-i586-poky-linux \n\n", | ||
34 | "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n" | ||
35 | }, | ||
36 | "7": { | ||
37 | "action": " run command which devtool \n\n", | ||
38 | "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n " | ||
39 | }, | ||
40 | "8": { | ||
41 | "action": "devtool add myapp <directory>(this is myapp dir) \n\n\n", | ||
42 | "expected_results": "The directory you should input is the myapp directory. This should automatically create the recipe myapp.bb under <crops-esdk-workdir-workspace>/recipes/myapp/myapp.bb" | ||
43 | }, | ||
44 | "9": { | ||
45 | "action": " devtool build myapp \n\n", | ||
46 | "expected_results": "This should compile an image" | ||
47 | }, | ||
48 | "10": { | ||
49 | "action": " devtool reset myapp ", | ||
50 | "expected_results": "This cleans sysroot of the myapp recipe, but it leaves the source tree intact. meaning it does not erase." | ||
51 | } | ||
52 | }, | ||
53 | "summary": "sdkext_eSDK_devtool_build_make" | ||
54 | } | ||
55 | }, | ||
56 | { | ||
57 | "test": { | ||
58 | "@alias": "crops-default.crops-default.sdkext_devtool_build_esdk_package", | ||
59 | "author": [ | ||
60 | { | ||
61 | "email": "francisco.j.pedraza.gonzalez@intel.com", | ||
62 | "name": "francisco.j.pedraza.gonzalez@intel.com" | ||
63 | } | ||
64 | ], | ||
65 | "execution": { | ||
66 | "1": { | ||
67 | "action": "IMPORTANT NOTE: The firsts 5 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n", | ||
68 | "expected_results": "" | ||
69 | }, | ||
70 | "2": { | ||
71 | "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n", | ||
72 | "expected_results": "" | ||
73 | }, | ||
74 | "3": { | ||
75 | "action": " Create the following tree of files <crops-esdk-workdir-workspace>/sdkext/files/myapp/ \n <crops-esdk-workdir-workspace>/sdkext/files/myapp_cmake \n\n", | ||
76 | "expected_results": "" | ||
77 | }, | ||
78 | "4": { | ||
79 | "action": " Create the following files withing the myapp directory myapp.c and the Makefile. Write the following inside of each file: \n---------------------------------------- \nMakefile should contain \n\nall: myapp \n\nmyapp: myapp.o \n\t$(CC) $(LDFLAGS) $< -o $@ \n\nmyapp.o: myapp.c \n\t$(CC) $(CFLAGS) -c $< -o $@ \n\nclean: \n\trm -rf myapp.o myapp \n\n----------------------------- \nmyapp.c shold contain \n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n \n\treturn 0; \n} \n------------------------------------ \n\n", | ||
80 | "expected_results": "be sure that the indentations on the makefile are tabs not spaces. \n\n" | ||
81 | }, | ||
82 | "5": { | ||
83 | "action": " Create the following files within the myapp_cmake directory CMakeLists.txt and myapp.c. Write the following inside each file: \n\n------------------------------------ \nCMakeLists.txt should contain: \n\ncmake_minimum_required (VERSION 2.6) \nproject (myapp) \n# The version number. \nset (myapp_VERSION_MAJOR 1) \nset (myapp_VERSION_MINOR 0) \n\n# add the executable \nadd_executable (myapp myapp.c) \n\ninstall(TARGETS myapp \nRUNTIME DESTINATION bin) \n\n------------------------------------------ \nmyapp.c should contain: \n\n#include<stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n\n\treturn 0; \n} \n------------------------------------------------- \n\n", | ||
84 | "expected_results": "Be sure that the indentations on CMakeLists.txt is tabs not spaces. \n\n" | ||
85 | }, | ||
86 | "6": { | ||
87 | "action": " source environment-setup-i586-poky-linux \n\n", | ||
88 | "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n" | ||
89 | }, | ||
90 | "7": { | ||
91 | "action": " run command which devtool \n\n", | ||
92 | "expected_results": " this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n" | ||
93 | }, | ||
94 | "8": { | ||
95 | "action": " devtool add myapp <directory> (this is myapp dir) \n\n", | ||
96 | "expected_results": " The directory you should input is the myapp directory. This should automatically create the recipe myapp.bb under <crops-esdk-workdir-workspace>/recipes/myapp/myapp.bb \n\n" | ||
97 | }, | ||
98 | "9": { | ||
99 | "action": " devtool package myapp \n\n", | ||
100 | "expected_results": " you should expect a package creation of myapp and it should be under the /tmp/deploy/ \n\n" | ||
101 | }, | ||
102 | "10": { | ||
103 | "action": " devtool reset myapp ", | ||
104 | "expected_results": "This cleans sysroot of the myapp recipe, but it leaves the source tree intact. meaning it does not erase.\n</package_format>" | ||
105 | } | ||
106 | }, | ||
107 | "summary": "sdkext_devtool_build_esdk_package" | ||
108 | } | ||
109 | }, | ||
110 | { | ||
111 | "test": { | ||
112 | "@alias": "crops-default.crops-default.sdkext_devtool_build_cmake", | ||
113 | "author": [ | ||
114 | { | ||
115 | "email": "francisco.j.pedraza.gonzalez@intel.com", | ||
116 | "name": "francisco.j.pedraza.gonzalez@intel.com" | ||
117 | } | ||
118 | ], | ||
119 | "execution": { | ||
120 | "1": { | ||
121 | "action": "IMPORTANT NOTE: The firsts 5 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n", | ||
122 | "expected_results": "" | ||
123 | }, | ||
124 | "2": { | ||
125 | "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n", | ||
126 | "expected_results": "" | ||
127 | }, | ||
128 | "3": { | ||
129 | "action": " Create the following tree of files <crops-esdk-workdir-workspace>/sdkext/files/myapp \n <crops-esdk-workdir-workspace>/sdkext/files/myapp_cmake \n\n", | ||
130 | "expected_results": "" | ||
131 | }, | ||
132 | "4": { | ||
133 | "action": " Create the following files withing the myapp directory myapp.c and the Makefile. Write the following inside of each file: \n---------------------------------------- \nMakefile should contain \n\nall: myapp \n\nmyapp: myapp.o \n\t$(CC) $(LDFLAGS) $< -o $@ \n\nmyapp.o: myapp.c \n\t$(CC) $(CFLAGS) -c $< -o $@ \n\nclean: \n\trm -rf myapp.o myapp \n\n----------------------------- \nmyapp.c shold contain \n\n#include <stdio.h> \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n \n\treturn 0; \n} \n------------------------------------ \n\n", | ||
134 | "expected_results": "be sure that the indentations on the makefile are tabs not spaces. \n\n" | ||
135 | }, | ||
136 | "5": { | ||
137 | "action": " Create the following files within the myapp_cmake directory CMakeLists.txt and myapp.c. Write the following inside each file: \n\n------------------------------------ \nCMakeLists.txt should contain: \n\ncmake_minimum_required (VERSION 2.6) \nproject (myapp) \n# The version number. \nset (myapp_VERSION_MAJOR 1) \nset (myapp_VERSION_MINOR 0) \n\n# add the executable \nadd_executable (myapp myapp.c) \n\ninstall(TARGETS myapp \nRUNTIME DESTINATION bin) \n\n------------------------------------------ \nmyapp.c should contain: \n\n#include \n\nint \nmain(int argc, char *argv[]) \n{ \n\tprintf(\"Hello world\\n\"); \n\n\treturn 0; \n} \n------------------------------------------------- \n\n", | ||
138 | "expected_results": "Be sure that the indentations on CMakeLists.txt is tabs not spaces. \n\n" | ||
139 | }, | ||
140 | "6": { | ||
141 | "action": " source environment-setup-i586-poky-linux \n\n", | ||
142 | "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n" | ||
143 | }, | ||
144 | "7": { | ||
145 | "action": " run command which devtool \n\n", | ||
146 | "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n" | ||
147 | }, | ||
148 | "8": { | ||
149 | "action": " devtool add myapp <directory> (this is myapp_cmake dir) \n\n", | ||
150 | "expected_results": "The directory you should input is the myapp_cmake directory. This should automatically create the recipe myapp.bb under <crops-esdk-workdir-workspace>/recipes/myapp/myapp.bb \n\n" | ||
151 | }, | ||
152 | "9": { | ||
153 | "action": " devtool build myapp \n\n", | ||
154 | "expected_results": "This should compile an image \n\n" | ||
155 | }, | ||
156 | "10": { | ||
157 | "action": " devtool reset myapp ", | ||
158 | "expected_results": "This cleans sysroot of the myapp recipe, but it leaves the source tree intact. meaning it does not erase. " | ||
159 | } | ||
160 | }, | ||
161 | "summary": "sdkext_devtool_build_cmake" | ||
162 | } | ||
163 | }, | ||
164 | { | ||
165 | "test": { | ||
166 | "@alias": "crops-default.crops-default.sdkext_extend_autotools_recipe_creation", | ||
167 | "author": [ | ||
168 | { | ||
169 | "email": "francisco.j.pedraza.gonzalez@intel.com", | ||
170 | "name": "francisco.j.pedraza.gonzalez@intel.com" | ||
171 | } | ||
172 | ], | ||
173 | "execution": { | ||
174 | "1": { | ||
175 | "action": "IMPORTANT NOTE: The firsts 2 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n\n", | ||
176 | "expected_results": "" | ||
177 | }, | ||
178 | "2": { | ||
179 | "action": "Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n", | ||
180 | "expected_results": "" | ||
181 | }, | ||
182 | "3": { | ||
183 | "action": " source environment-setup-i586-poky-linux \n\n", | ||
184 | "expected_results": " This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n" | ||
185 | }, | ||
186 | "4": { | ||
187 | "action": "run command which devtool \n\n", | ||
188 | "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n" | ||
189 | }, | ||
190 | "5": { | ||
191 | "action": "devtool sdk-install -s libxml2 \n\n", | ||
192 | "expected_results": "this should install libxml2 \n\n" | ||
193 | }, | ||
194 | "6": { | ||
195 | "action": "devtool add librdfa https://github.com/rdfa/librdfa \n\n", | ||
196 | "expected_results": "This should automatically create the recipe librdfa.bb under /recipes/librdfa/librdfa.bb \n\n" | ||
197 | }, | ||
198 | "7": { | ||
199 | "action": "devtool build librdfa \n\n", | ||
200 | "expected_results": "This should compile \n\n" | ||
201 | }, | ||
202 | "8": { | ||
203 | "action": "devtool reset librdfa ", | ||
204 | "expected_results": "This cleans sysroot of the librdfa recipe, but it leaves the source tree intact. meaning it does not erase." | ||
205 | } | ||
206 | }, | ||
207 | "summary": "sdkext_extend_autotools_recipe_creation" | ||
208 | } | ||
209 | }, | ||
210 | { | ||
211 | "test": { | ||
212 | "@alias": "crops-default.crops-default.sdkext_devtool_kernelmodule", | ||
213 | "author": [ | ||
214 | { | ||
215 | "email": "francisco.j.pedraza.gonzalez@intel.com", | ||
216 | "name": "francisco.j.pedraza.gonzalez@intel.com" | ||
217 | } | ||
218 | ], | ||
219 | "execution": { | ||
220 | "1": { | ||
221 | "action": "IMPORTANT NOTE: The firsts 2 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\n", | ||
222 | "expected_results": "" | ||
223 | }, | ||
224 | "2": { | ||
225 | "action": " Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n", | ||
226 | "expected_results": "" | ||
227 | }, | ||
228 | "3": { | ||
229 | "action": "source environment-setup-i586-poky-linux \n\n", | ||
230 | "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n \n" | ||
231 | }, | ||
232 | "4": { | ||
233 | "action": "run command which devtool \n\n", | ||
234 | "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n" | ||
235 | }, | ||
236 | "5": { | ||
237 | "action": "devtool add kernel-module-hello-world https://git.yoctoproject.org/git/kernel-module-hello-world \n\n", | ||
238 | "expected_results": "This should automatically create the recipe kernel-module-hello-world.bb under <crops-esdk-workdir-workspace>/recipes/kernel-module-hello-world/kernel-module-hello-world.bb " | ||
239 | }, | ||
240 | "6": { | ||
241 | "action": "devtool build kernel-module-hello-world \n\n", | ||
242 | "expected_results": "This should compile an image \n\n" | ||
243 | }, | ||
244 | "7": { | ||
245 | "action": "devtool reset kernel-module-hello-world ", | ||
246 | "expected_results": "This cleans sysroot of the kernel-module-hello-world recipe, but it leaves the source tree intact. meaning it does not erase." | ||
247 | } | ||
248 | }, | ||
249 | "summary": "sdkext_devtool_kernelmodule" | ||
250 | } | ||
251 | }, | ||
252 | { | ||
253 | "test": { | ||
254 | "@alias": "crops-default.crops-default.sdkext_recipes_for_nodejs", | ||
255 | "author": [ | ||
256 | { | ||
257 | "email": "francisco.j.pedraza.gonzalez@intel.com", | ||
258 | "name": "francisco.j.pedraza.gonzalez@intel.com" | ||
259 | } | ||
260 | ], | ||
261 | "execution": { | ||
262 | "1": { | ||
263 | "action": "IMPORTANT NOTE: The firsts 2 steps refer to configuration of the environment to run the rest of the steps. These only apply for CROPS-eSDK. \n\n\nlets say variable npm = npm://registry.npmjs.org;name=winston;version=2.2.0 \n\n", | ||
264 | "expected_results": "" | ||
265 | }, | ||
266 | "2": { | ||
267 | "action": "Initiate your Crops-esdk environment as it says in wiki https://github.com/crops/docker-win-mac-docs/wiki \n\n", | ||
268 | "expected_results": "" | ||
269 | }, | ||
270 | "3": { | ||
271 | "action": "source environment-setup-i586-poky-linux \n\n", | ||
272 | "expected_results": "This should output a message that says SDK environment now set up; additionally you may now run devtool to perform development tasks etc etc ... \n\n" | ||
273 | }, | ||
274 | "4": { | ||
275 | "action": "run command which devtool \n\n", | ||
276 | "expected_results": "this should output the directory of the devtool script and it should be within the sdk workdir you are working in. \n\n" | ||
277 | }, | ||
278 | "5": { | ||
279 | "action": " 4a) git clone git://git.openembedded.org/meta-openembedded in layers/build directory \n \n4b) Add meta-openembedded/meta-oe in bblayer.conf as mentioned below: ${SDKBASEMETAPATH}/layers/build/meta-openembedded/meta-oe \\ \n\n4c) devtool add \"npm://registry.npmjs.org;name=npm;version=2.2.0\" \n\n", | ||
280 | "expected_results": " This should automatically create the recipe npm.bb under /recipes/npm/npm.bb \n\n" | ||
281 | }, | ||
282 | "6": { | ||
283 | "action": "devtool build npm \n\n", | ||
284 | "expected_results": "This should compile an image \n\n" | ||
285 | }, | ||
286 | "7": { | ||
287 | "action": " devtool reset npm", | ||
288 | "expected_results": "This cleans sysroot of the npm recipe, but it leaves the source tree intact. meaning it does not erase." | ||
289 | } | ||
290 | }, | ||
291 | "summary": "sdkext_recipes_for_nodejs" | ||
292 | } | ||
293 | } | ||
294 | ] | ||
diff --git a/meta/lib/oeqa/manual/eclipse-plugin.json b/meta/lib/oeqa/manual/eclipse-plugin.json deleted file mode 100644 index 6c110d0656..0000000000 --- a/meta/lib/oeqa/manual/eclipse-plugin.json +++ /dev/null | |||
@@ -1,322 +0,0 @@ | |||
1 | [ | ||
2 | { | ||
3 | "test": { | ||
4 | "@alias": "eclipse-plugin.eclipse-plugin.support_SSH_connection_to_Target", | ||
5 | "author": [ | ||
6 | { | ||
7 | "email": "ee.peng.yeoh@intel.com", | ||
8 | "name": "ee.peng.yeoh@intel.com" | ||
9 | } | ||
10 | ], | ||
11 | "execution": { | ||
12 | "1": { | ||
13 | "action": "In Eclipse, swich to Remote System Explorer to create a connention baseed on SSH, input the remote target IP address as the Host name, make sure disable the proxy in Window->Preferences->General->Network Connection, set Direct as Active Provider field. ", | ||
14 | "expected_results": "the connection based on SSH could be set up." | ||
15 | }, | ||
16 | "2": { | ||
17 | "action": "Configure connection from Eclipse: Run->Run Configurations->C/C++ Remote Application\\ ->New Connection->General->SSH Only ", | ||
18 | "expected_results": "" | ||
19 | }, | ||
20 | "3": { | ||
21 | "action": "Then right click to connect, input the user ID and password. ", | ||
22 | "expected_results": "" | ||
23 | }, | ||
24 | "4": { | ||
25 | "action": "expand the connection, it will show the Sftp Files etc. \nNOTE. Might need to change dropbear to openssh and add the packagegroup-core-eclipse-debug recipe", | ||
26 | "expected_results": "" | ||
27 | } | ||
28 | }, | ||
29 | "summary": "support_SSH_connection_to_Target" | ||
30 | } | ||
31 | }, | ||
32 | { | ||
33 | "test": { | ||
34 | "@alias": "eclipse-plugin.eclipse-plugin.Launch_QEMU_from_Eclipse", | ||
35 | "author": [ | ||
36 | { | ||
37 | "email": "ee.peng.yeoh@intel.com", | ||
38 | "name": "ee.peng.yeoh@intel.com" | ||
39 | } | ||
40 | ], | ||
41 | "execution": { | ||
42 | "1": { | ||
43 | "action": "Set the Yocto ADT's toolchain root location, sysroot location and kernel, in the menu Window -> Preferences -> Yocto ADT. \n \n", | ||
44 | "expected_results": "" | ||
45 | }, | ||
46 | "2": { | ||
47 | "action": "wget https://downloads.yoctoproject.org/releases/yocto/yocto-$VERSION/machines/qemu/qemux86/ (ex:core-image-sato-sdk-qemux86-date-rootfs-tar-bz2) \nsource /opt/poky/version/environment-setup-i585-poky-linux \n\nExtract qemu with runqemu-extract-sdk /home/user/file(ex.core-image-sato-sdk-qemux86.bz2) \n/home/user/qemux86-sato-sdk \n\n", | ||
48 | "expected_results": " Qemu can be lauched normally." | ||
49 | }, | ||
50 | "3": { | ||
51 | "action": "(a)Point to the Toolchain: \n \nIf you are using a stand-alone pre-built toolchain, you should be pointing to the /opt/poky/{test-version} directory as Toolchain Root Location. This is the default location for toolchains installed by the ADT Installer or by hand. If ADT is installed in other location, use that location as Toolchain location.\nIf you are using a system-derived toolchain, the path you provide for the Toolchain Root Location field is the Yocto Project's build directory. \n \n E.g:/home/user/yocto/poky/build \n", | ||
52 | "expected_results": "" | ||
53 | }, | ||
54 | "4": { | ||
55 | "action": "(b)Specify the Sysroot Location: \nSysroot Location is the location where the root filesystem for the target hardware is created on the development system by the ADT Installer (SYSROOT in step 2 of the case ADT installer Installation). \n \n Local : e.g: /home/user/qemux86-sato-sdk \nUsing ADT : e.g :/home/user/test-yocto/qemux86 \n\n", | ||
56 | "expected_results": "" | ||
57 | }, | ||
58 | "5": { | ||
59 | "action": "(c)Select the Target Architecture: \n \nThe target architecture is the type of hardware you are going to use or emulate. Use the pull-down Target Architecture menu to make your selection. \n \n\n", | ||
60 | "expected_results": "" | ||
61 | }, | ||
62 | "6": { | ||
63 | "action": "(d) QEMU: \nSelect this option if you will be using the QEMU emulator. Specify the Kernel matching the QEMU architecture you are using. \n wget https://downloads.yoctoproject.org/releases/yocto/yocto-$VERSION/machines/qemu/qemux86/bzImage-qemux86.bin \n e.g: /home/$USER/yocto/adt-installer/download_image/bzImage-qemux86.bin \n\n", | ||
64 | "expected_results": "" | ||
65 | }, | ||
66 | "7": { | ||
67 | "action": "(e) select OK to save the settings. \n\n\n1: In the Eclipse toolbar, expose the Run -> External Tools menu. Your image should appear as a selectable menu item. \n2: Select your image in the navigation pane to launch the emulator in a new window. \n3: If needed, enter your host root password in the shell window at the prompt. This sets up a Tap 0 connection needed for running in user-space NFS mode. \n", | ||
68 | "expected_results": "" | ||
69 | } | ||
70 | }, | ||
71 | "summary": "Launch_QEMU_from_Eclipse" | ||
72 | } | ||
73 | }, | ||
74 | { | ||
75 | "test": { | ||
76 | "@alias": "eclipse-plugin.eclipse-plugin.Relocatable_SDK_-_C_-_Build_Hello_World_ANSI_C_Autotools_Project", | ||
77 | "author": [ | ||
78 | { | ||
79 | "email": "ee.peng.yeoh@intel.com", | ||
80 | "name": "ee.peng.yeoh@intel.com" | ||
81 | } | ||
82 | ], | ||
83 | "execution": { | ||
84 | "1": { | ||
85 | "action": "Launch a QEMU of target environment.(Reference to case \"ADT - Launch qemu by eclipse\") ", | ||
86 | "expected_results": "" | ||
87 | }, | ||
88 | "2": { | ||
89 | "action": "Select File -> New -> Project.", | ||
90 | "expected_results": "" | ||
91 | }, | ||
92 | "3": { | ||
93 | "action": "Double click C/C++.", | ||
94 | "expected_results": "" | ||
95 | }, | ||
96 | "4": { | ||
97 | "action": "Click C or C++ Project to create the project.", | ||
98 | "expected_results": "" | ||
99 | }, | ||
100 | "5": { | ||
101 | "action": "Expand Yocto ADT Project.", | ||
102 | "expected_results": "" | ||
103 | }, | ||
104 | "6": { | ||
105 | "action": "Select Hello World ANSI C Autotools Project.", | ||
106 | "expected_results": "" | ||
107 | }, | ||
108 | "7": { | ||
109 | "action": "Put a name in the Project name. Do not use hyphens as part of the name. \n \n", | ||
110 | "expected_results": "" | ||
111 | }, | ||
112 | "8": { | ||
113 | "action": "Click Next.", | ||
114 | "expected_results": "" | ||
115 | }, | ||
116 | "9": { | ||
117 | "action": "Add information in the Author and Copyright notice fields. \n1", | ||
118 | "expected_results": "" | ||
119 | }, | ||
120 | "10": { | ||
121 | "action": "Click Finish. \n1", | ||
122 | "expected_results": "" | ||
123 | }, | ||
124 | "11": { | ||
125 | "action": "If the \"open perspective\" prompt appears, click \"Yes\" so that you open the C/C++ perspective. \n1", | ||
126 | "expected_results": "" | ||
127 | }, | ||
128 | "12": { | ||
129 | "action": "In the Project Explorer window, right click the project -> Reconfigure project. \n1", | ||
130 | "expected_results": "" | ||
131 | }, | ||
132 | "13": { | ||
133 | "action": "In the Project Explorer window, right click the project -> Build project. \n1", | ||
134 | "expected_results": "Under the Project files, a new folder appears called Binaries. This indicates that the compilation have been successful and the project binary have been created. \n" | ||
135 | }, | ||
136 | "14": { | ||
137 | "action": "Right click it again and Run as -> Run Configurations. \n\t\t\tUnder Run Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \n\t\t\tin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application. e.g.: /home/root/myapplication \n\t\t\tIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button. \n1", | ||
138 | "expected_results": "step 14 to step 16 -> Build succeed and the console outputs Hello world, you can also check the output on target." | ||
139 | }, | ||
140 | "15": { | ||
141 | "action": "After all settings are done, select the Run button on the bottom right corner \n\n1", | ||
142 | "expected_results": "" | ||
143 | }, | ||
144 | "16": { | ||
145 | "action": "Repeat the steps 14-15, but instead of using Run Configurations use Debug Configurations: \nRight click it again and Debug as -> Debug Configurations \nUnder Debug Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \nin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application.\ne.g.: /home/root/myapplication \nIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button \n1", | ||
146 | "expected_results": "" | ||
147 | }, | ||
148 | "17": { | ||
149 | "action": "After all settings are done, select the Debug button on the bottom right corner", | ||
150 | "expected_results": "" | ||
151 | } | ||
152 | }, | ||
153 | "summary": "Relocatable_SDK_-_C_-_Build_Hello_World_ANSI_C_Autotools_Project" | ||
154 | } | ||
155 | }, | ||
156 | { | ||
157 | "test": { | ||
158 | "@alias": "eclipse-plugin.eclipse-plugin.Relocatable_SDK_-_C++_-_Build_Hello_World_C++_Autotools_project", | ||
159 | "author": [ | ||
160 | { | ||
161 | "email": "ee.peng.yeoh@intel.com", | ||
162 | "name": "ee.peng.yeoh@intel.com" | ||
163 | } | ||
164 | ], | ||
165 | "execution": { | ||
166 | "1": { | ||
167 | "action": "Launch a QEMU of target environment.(Reference to case \"ADT - Launch qemu by eclipse\") ", | ||
168 | "expected_results": "" | ||
169 | }, | ||
170 | "2": { | ||
171 | "action": "Select File -> New -> Project. ", | ||
172 | "expected_results": "" | ||
173 | }, | ||
174 | "3": { | ||
175 | "action": "Double click C/C++. ", | ||
176 | "expected_results": "" | ||
177 | }, | ||
178 | "4": { | ||
179 | "action": "Click C or C++ Project to create the project. ", | ||
180 | "expected_results": "" | ||
181 | }, | ||
182 | "5": { | ||
183 | "action": "Expand Yocto ADT Project. ", | ||
184 | "expected_results": "" | ||
185 | }, | ||
186 | "6": { | ||
187 | "action": "Select Hello World ANSI C++ Autotools Project. ", | ||
188 | "expected_results": "" | ||
189 | }, | ||
190 | "7": { | ||
191 | "action": "Put a name in the Project name. Do not use hyphens as part of the name. \n \n", | ||
192 | "expected_results": "" | ||
193 | }, | ||
194 | "8": { | ||
195 | "action": "Click Next.", | ||
196 | "expected_results": "" | ||
197 | }, | ||
198 | "9": { | ||
199 | "action": "Add information in the Author and Copyright notice fields.", | ||
200 | "expected_results": "" | ||
201 | }, | ||
202 | "10": { | ||
203 | "action": "Click Finish. \n1", | ||
204 | "expected_results": "" | ||
205 | }, | ||
206 | "11": { | ||
207 | "action": "If the \"open perspective\" prompt appears, click \"Yes\" so that you open the C/C++ perspective. \n1", | ||
208 | "expected_results": "" | ||
209 | }, | ||
210 | "12": { | ||
211 | "action": "In the Project Explorer window, right click the project -> Reconfigure project. \n1", | ||
212 | "expected_results": "" | ||
213 | }, | ||
214 | "13": { | ||
215 | "action": "In the Project Explorer window, right click the project -> Build project. \n\n1", | ||
216 | "expected_results": "under the Project files, a new folder appears called Binaries. This indicates that the compilation have been successful and the project binary have been created. \n" | ||
217 | }, | ||
218 | "14": { | ||
219 | "action": "Right click it again and Run as -> Run Configurations. \n\t\t\tUnder Run Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \n\t\t\tin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application. e.g.: /home/root/myapplication \n\t\t\tIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button. \n1", | ||
220 | "expected_results": "step 14 to step 16 -> Build succeed and the console outputs Hello world, you can also check the output on target." | ||
221 | }, | ||
222 | "15": { | ||
223 | "action": "After all settings are done, select the Run button on the bottom right corner \n\n1", | ||
224 | "expected_results": "" | ||
225 | }, | ||
226 | "16": { | ||
227 | "action": "Repeat the steps 14-15, but instead of using Run Configurations use Debug Configurations: \n\t\tRight click it again and Debug as -> Debug Configurations \n\t\tUnder Debug Configurations expand \"C/C++ Remote Application\". A configuration for the current project should appear. Clicking it will display the configuration settings. \n\t\tin \"C/C++ Application\" field input Remote Absolute File path for C/C++ Application. \n\t\te.g.: /home/root/myapplication \n\t\tIn \"Connection\" drop-down list make sure a TCF connection is set up for your target. If not, create a new one by clicking the New button \n1", | ||
228 | "expected_results": "" | ||
229 | }, | ||
230 | "17": { | ||
231 | "action": "After all settings are done, select the Debug button on the bottom right corner", | ||
232 | "expected_results": "" | ||
233 | } | ||
234 | }, | ||
235 | "summary": "Relocatable_SDK_-_C++_-_Build_Hello_World_C++_Autotools_project" | ||
236 | } | ||
237 | }, | ||
238 | { | ||
239 | "test": { | ||
240 | "@alias": "eclipse-plugin.eclipse-plugin.Build_Eclipse_Plugin_from_source", | ||
241 | "author": [ | ||
242 | { | ||
243 | "email": "laurentiu.serban@intel.com", | ||
244 | "name": "laurentiu.serban@intel.com" | ||
245 | } | ||
246 | ], | ||
247 | "execution": { | ||
248 | "1": { | ||
249 | "action": "Clone eclipse-poky source. \n \n - git clone git://git.yoctoproject.org/eclipse-poky \n\n", | ||
250 | "expected_results": "Eclipse plugin is successfully installed \n\nDocumentation is there. For example if you have release yocto-2.0.1 you will found on https://downloads.yoctoproject.org/releases/yocto/yocto-2.0.1/eclipse-plugin/mars/ archive with documentation like org.yocto.doc-development-$date.zip \n \n" | ||
251 | }, | ||
252 | "2": { | ||
253 | "action": "Checkout correct tag. \n\n - git checkout <eclipse-version>/<yocto-version> \n\n", | ||
254 | "expected_results": "After plugin is build you must have 4 archive in foder scripts from eclipse-poky: \n - org.yocto.bc - mars-master-$date.zip \n - org.yocto.doc - mars-master-$date.zip --> documentation \n - org.yocto.sdk - mars-master-$date.zip \n - org.yocto.sdk - mars-master-$date.-archive.zip --> plugin " | ||
255 | }, | ||
256 | "3": { | ||
257 | "action": "Move to scripts/ folder. \n\n", | ||
258 | "expected_results": "" | ||
259 | }, | ||
260 | "4": { | ||
261 | "action": "Run ./setup.sh \n\n", | ||
262 | "expected_results": "" | ||
263 | }, | ||
264 | "5": { | ||
265 | "action": "When the script finishes, it prompts a command to issue to build the plugin. It should look similar to the following: \n\n$ ECLIPSE_HOME=/eclipse-poky/scripts/eclipse ./build.sh /&1 | tee -a build.log \n\nHere, the three arguments to the build script are tag name, branch for documentation and release name. \n\n", | ||
266 | "expected_results": "" | ||
267 | }, | ||
268 | "6": { | ||
269 | "action": "On an eclipse without the Yocto Plugin, select \"Install New Software\" from Help pull-down menu \n\n", | ||
270 | "expected_results": "" | ||
271 | }, | ||
272 | "7": { | ||
273 | "action": "Select Add and from the dialog choose Archive... Look for the *archive.zip file that was built previously with the build.sh script. Click OK. \n\n", | ||
274 | "expected_results": "" | ||
275 | }, | ||
276 | "8": { | ||
277 | "action": "Select all components and proceed with Installation of plugin. Restarting eclipse might be required.\n", | ||
278 | "expected_results": "" | ||
279 | } | ||
280 | }, | ||
281 | "summary": "Build_Eclipse_Plugin_from_source" | ||
282 | } | ||
283 | }, | ||
284 | { | ||
285 | "test": { | ||
286 | "@alias": "eclipse-plugin.eclipse-plugin.Eclipse_Poky_installation_and_setup", | ||
287 | "author": [ | ||
288 | { | ||
289 | "email": "ee.peng.yeoh@intel.com", | ||
290 | "name": "ee.peng.yeoh@intel.com" | ||
291 | } | ||
292 | ], | ||
293 | "execution": { | ||
294 | "1": { | ||
295 | "action": "Install SDK \n\ta)Download https://autobuilder.yocto.io/pub/releases//toolchain/x86_64/poky-glibc-x86_64-core-\timage-sato-i586-toolchain-.sh \n\tb)Run the SDK installer and accept the default installation directory ", | ||
296 | "expected_results": "" | ||
297 | }, | ||
298 | "2": { | ||
299 | "action": "Install \"Eclipse IDE for C/C++ Developers\" Oxygen release (4.7.0) \n\ta) Go to https://www.eclipse.org/downloads/packages/all, click \"Oxygen R\" \n\tb) Click to download the build for your OS \n\tc) Click \"Download\" button to download from a mirror \n\td) Run \"tar xf\" to extract the downloaded archive ", | ||
300 | "expected_result": "" | ||
301 | }, | ||
302 | "3": { | ||
303 | "action": "Install \"Eclipse IDE for C/C++ Developers\" Oxygen release (4.7.0) (Continue) \n\te) Run \"eclipse/eclipse\" to start Eclipse \n\tf) Optional step for host machine within Intel network: In Eclipse workbench window, go to \"Window\" menu -> \"Preferences...\". \n\tg) In \"Preferences\" dialog, go to \"General\" -> \"Network Connections\", set \"Active Provider\" to \"Manual\". In \"Proxy \tentries\" table, select HTTP and click \"Edit\" and enter host \"proxy-chain.intel.com\" port 911, click OK. Repeat for HTTPS with port 912 \nClick OK to close \"Preferences\" dialog. \n\th) Go to \"File\" menu -> \"Restart\" to restart Eclipse for proxy settings to take effect. ", | ||
304 | "expected_result": "" | ||
305 | }, | ||
306 | "4": { | ||
307 | "action": "Install Eclipse Poky plugins \n\ta) Download https://autobuilder.yocto.io/pub/releases/<yocto-version>/eclipse-plugin/<eclipse-version>/org.yocto.sdk-development-<date>-archive.zip \n\tb) In Eclipse workbench window, go to \"Help\" menu -> \"Install New Software...\" \n\tc) In \"Install\" dialog, click \"Add...\" button \n\td) In \"Add Repository\" dialog, enter \"Eclipse Poky\" for (repository) Name, click \"Archive...\" ", | ||
308 | "expected_results": "" | ||
309 | }, | ||
310 | "5": { | ||
311 | "action": "Install Eclipse Poky plugins (continue) \n\te) In \"Repository archive\" browse dialog, select the downloaded Eclipse Poky repository archive \n\tf) Back in \"Add Repository\" dialog, click \"OK\" \n\tg) Back in \"Install\" dialog, make sure \"Work with:\" is set to \"Eclipse Poky\" repository, tick \"Yocto Project \tDocumentation Plug-in\" and \"Yocto Project SDK Plug-in\", click \"Next >\" and verify plugins/features name/version, \tclick \"Next >\" and accept license agreement, click \"Finish\" \n\th) If \"Security Warning\" dialog appears, click \"OK\" to install unsigned content. \n\ti) In \"Software Updates\" dialog, click \"Yes\" to restart Eclipse to complete Eclipse Poky plugins installation. ", | ||
312 | "expected_results": "" | ||
313 | }, | ||
314 | "6": { | ||
315 | "action": "Setup Eclipse Poky to use SDK \n\ta) In Eclipse workbench window, go to \"Window\" menu -> \"Preferences\". \n\tb) In \"Preferences\" window, go to \"Yocto Project SDK\", in \"Cross Compiler Options\" frame, select \"Standalone pre-\tbuilt toolchain\". ", | ||
316 | "expected_results": "Eclipse Poky plugins installed and running successfully, e.g. observe that \"Yocto Project Tools\" menu is available on Eclipse workbench window." | ||
317 | } | ||
318 | }, | ||
319 | "summary": "Eclipse_Poky_installation_and_setup" | ||
320 | } | ||
321 | } | ||
322 | ] | ||
diff --git a/meta/lib/oeqa/runtime/cases/ltp.py b/meta/lib/oeqa/runtime/cases/ltp.py index f588a93200..e81360670c 100644 --- a/meta/lib/oeqa/runtime/cases/ltp.py +++ b/meta/lib/oeqa/runtime/cases/ltp.py | |||
@@ -57,7 +57,7 @@ class LtpTestBase(OERuntimeTestCase): | |||
57 | 57 | ||
58 | class LtpTest(LtpTestBase): | 58 | class LtpTest(LtpTestBase): |
59 | 59 | ||
60 | ltp_groups = ["math", "syscalls", "dio", "io", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "filecaps", "cap_bounds", "fcntl-locktests", "commands", "net.ipv6_lib", "input","fs_perms_simple", "cve", "crypto", "ima", "net.nfs", "net_stress.ipsec_icmp", "net.ipv6", "numa", "uevent", "ltp-aiodio.part1", "ltp-aiodio.part2", "ltp-aiodio.part3", "ltp-aiodio.part4"] | 60 | ltp_groups = ["math", "syscalls", "dio", "mm", "ipc", "sched", "nptl", "pty", "containers", "controllers", "fcntl-locktests", "commands", "net.ipv6_lib", "input","fs_perms_simple", "cve", "crypto", "ima", "net.nfs", "net_stress.ipsec_icmp", "net.ipv6", "numa", "uevent", "ltp-aiodio.part1", "ltp-aiodio.part2", "ltp-aiodio.part3", "ltp-aiodio.part4"] |
61 | 61 | ||
62 | ltp_fs = ["fs", "fs_bind"] | 62 | ltp_fs = ["fs", "fs_bind"] |
63 | # skip kernel cpuhotplug | 63 | # skip kernel cpuhotplug |
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py index 5481e1d840..80fdae240a 100644 --- a/meta/lib/oeqa/runtime/cases/systemd.py +++ b/meta/lib/oeqa/runtime/cases/systemd.py | |||
@@ -145,7 +145,8 @@ class SystemdServiceTests(SystemdTest): | |||
145 | Verify that call-stacks generated by systemd-coredump contain symbolicated call-stacks, | 145 | Verify that call-stacks generated by systemd-coredump contain symbolicated call-stacks, |
146 | extracted from the minidebuginfo metadata (.gnu_debugdata elf section). | 146 | extracted from the minidebuginfo metadata (.gnu_debugdata elf section). |
147 | """ | 147 | """ |
148 | t_thread = threading.Thread(target=self.target.run, args=("ulimit -c unlimited && sleep 1000",)) | 148 | # use "env sleep" instead of "sleep" to avoid calling the shell builtin function |
149 | t_thread = threading.Thread(target=self.target.run, args=("ulimit -c unlimited && env sleep 1000",)) | ||
149 | t_thread.start() | 150 | t_thread.start() |
150 | time.sleep(1) | 151 | time.sleep(1) |
151 | 152 | ||
@@ -156,7 +157,8 @@ class SystemdServiceTests(SystemdTest): | |||
156 | 157 | ||
157 | (status, output) = self.target.run('coredumpctl info') | 158 | (status, output) = self.target.run('coredumpctl info') |
158 | self.assertEqual(status, 0, msg='MiniDebugInfo Test failed: %s' % output) | 159 | self.assertEqual(status, 0, msg='MiniDebugInfo Test failed: %s' % output) |
159 | self.assertEqual('sleep_for_duration (busybox.nosuid' in output, True, msg='Call stack is missing minidebuginfo symbols (functions shown as "n/a"): %s' % output) | 160 | self.assertEqual('sleep_for_duration (busybox.nosuid' in output or 'xnanosleep (sleep.coreutils' in output, |
161 | True, msg='Call stack is missing minidebuginfo symbols (functions shown as "n/a"): %s' % output) | ||
160 | 162 | ||
161 | class SystemdJournalTests(SystemdTest): | 163 | class SystemdJournalTests(SystemdTest): |
162 | 164 | ||
diff --git a/meta/lib/oeqa/sdk/cases/buildcpio.py b/meta/lib/oeqa/sdk/cases/autotools.py index 51003b19cd..848e9392ec 100644 --- a/meta/lib/oeqa/sdk/cases/buildcpio.py +++ b/meta/lib/oeqa/sdk/cases/autotools.py | |||
@@ -7,13 +7,12 @@ | |||
7 | import os | 7 | import os |
8 | import tempfile | 8 | import tempfile |
9 | import subprocess | 9 | import subprocess |
10 | import unittest | ||
11 | 10 | ||
12 | from oeqa.sdk.case import OESDKTestCase | 11 | from oeqa.sdk.case import OESDKTestCase |
13 | from oeqa.utils.subprocesstweak import errors_have_output | 12 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | errors_have_output() | 13 | errors_have_output() |
15 | 14 | ||
16 | class BuildCpioTest(OESDKTestCase): | 15 | class AutotoolsTest(OESDKTestCase): |
17 | """ | 16 | """ |
18 | Check that autotools will cross-compile correctly. | 17 | Check that autotools will cross-compile correctly. |
19 | """ | 18 | """ |
diff --git a/meta/lib/oeqa/sdk/cases/assimp.py b/meta/lib/oeqa/sdk/cases/cmake.py index e986838aea..db7d826a38 100644 --- a/meta/lib/oeqa/sdk/cases/assimp.py +++ b/meta/lib/oeqa/sdk/cases/cmake.py | |||
@@ -13,7 +13,7 @@ from oeqa.sdk.case import OESDKTestCase | |||
13 | from oeqa.utils.subprocesstweak import errors_have_output | 13 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | errors_have_output() | 14 | errors_have_output() |
15 | 15 | ||
16 | class BuildAssimp(OESDKTestCase): | 16 | class CMakeTest(OESDKTestCase): |
17 | """ | 17 | """ |
18 | Test case to build a project using cmake. | 18 | Test case to build a project using cmake. |
19 | """ | 19 | """ |
@@ -21,14 +21,14 @@ class BuildAssimp(OESDKTestCase): | |||
21 | def setUp(self): | 21 | def setUp(self): |
22 | if not (self.tc.hasHostPackage("nativesdk-cmake") or | 22 | if not (self.tc.hasHostPackage("nativesdk-cmake") or |
23 | self.tc.hasHostPackage("cmake-native")): | 23 | self.tc.hasHostPackage("cmake-native")): |
24 | raise unittest.SkipTest("Needs cmake") | 24 | raise unittest.SkipTest("CMakeTest: needs cmake") |
25 | 25 | ||
26 | def test_assimp(self): | 26 | def test_assimp(self): |
27 | with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir: | 27 | with tempfile.TemporaryDirectory(prefix="assimp", dir=self.tc.sdk_dir) as testdir: |
28 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v5.3.1.tar.gz") | 28 | tarball = self.fetch(testdir, self.td["DL_DIR"], "https://github.com/assimp/assimp/archive/v5.4.1.tar.gz") |
29 | 29 | ||
30 | dirs = {} | 30 | dirs = {} |
31 | dirs["source"] = os.path.join(testdir, "assimp-5.3.1") | 31 | dirs["source"] = os.path.join(testdir, "assimp-5.4.1") |
32 | dirs["build"] = os.path.join(testdir, "build") | 32 | dirs["build"] = os.path.join(testdir, "build") |
33 | dirs["install"] = os.path.join(testdir, "install") | 33 | dirs["install"] = os.path.join(testdir, "install") |
34 | 34 | ||
@@ -39,7 +39,7 @@ class BuildAssimp(OESDKTestCase): | |||
39 | self._run("sed -i '/# ifdef _FILE_OFFSET_BITS/I,+2 d' {source}/contrib/zlib/gzguts.h".format(**dirs)) | 39 | self._run("sed -i '/# ifdef _FILE_OFFSET_BITS/I,+2 d' {source}/contrib/zlib/gzguts.h".format(**dirs)) |
40 | os.makedirs(dirs["build"]) | 40 | os.makedirs(dirs["build"]) |
41 | 41 | ||
42 | self._run("cd {build} && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**dirs)) | 42 | self._run("cd {build} && cmake -DASSIMP_WARNINGS_AS_ERRORS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DASSIMP_BUILD_ZLIB=ON {source}".format(**dirs)) |
43 | self._run("cmake --build {build} -- -j".format(**dirs)) | 43 | self._run("cmake --build {build} -- -j".format(**dirs)) |
44 | self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**dirs)) | 44 | self._run("cmake --build {build} --target install -- DESTDIR={install}".format(**dirs)) |
45 | self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libassimp.so.5.3.0")) | 45 | self.check_elf(os.path.join(dirs["install"], "usr", "local", "lib", "libassimp.so.5.4.1")) |
diff --git a/meta/lib/oeqa/sdk/cases/buildgalculator.py b/meta/lib/oeqa/sdk/cases/gtk3.py index 178f07472d..c329c4bb86 100644 --- a/meta/lib/oeqa/sdk/cases/buildgalculator.py +++ b/meta/lib/oeqa/sdk/cases/gtk3.py | |||
@@ -13,7 +13,7 @@ from oeqa.sdk.case import OESDKTestCase | |||
13 | from oeqa.utils.subprocesstweak import errors_have_output | 13 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | errors_have_output() | 14 | errors_have_output() |
15 | 15 | ||
16 | class GalculatorTest(OESDKTestCase): | 16 | class GTK3Test(OESDKTestCase): |
17 | """ | 17 | """ |
18 | Test that autotools and GTK+ 3 compiles correctly. | 18 | Test that autotools and GTK+ 3 compiles correctly. |
19 | """ | 19 | """ |
diff --git a/meta/lib/oeqa/sdk/cases/buildlzip.py b/meta/lib/oeqa/sdk/cases/makefile.py index b4b7d85b88..2ff54ce25f 100644 --- a/meta/lib/oeqa/sdk/cases/buildlzip.py +++ b/meta/lib/oeqa/sdk/cases/makefile.py | |||
@@ -4,12 +4,12 @@ | |||
4 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
5 | # | 5 | # |
6 | 6 | ||
7 | import os, tempfile, subprocess, unittest | 7 | import os, tempfile, subprocess |
8 | from oeqa.sdk.case import OESDKTestCase | 8 | from oeqa.sdk.case import OESDKTestCase |
9 | from oeqa.utils.subprocesstweak import errors_have_output | 9 | from oeqa.utils.subprocesstweak import errors_have_output |
10 | errors_have_output() | 10 | errors_have_output() |
11 | 11 | ||
12 | class BuildLzipTest(OESDKTestCase): | 12 | class MakefileTest(OESDKTestCase): |
13 | """ | 13 | """ |
14 | Test that "plain" compilation works, using just $CC $CFLAGS etc. | 14 | Test that "plain" compilation works, using just $CC $CFLAGS etc. |
15 | """ | 15 | """ |
diff --git a/meta/lib/oeqa/sdk/cases/maturin.py b/meta/lib/oeqa/sdk/cases/maturin.py index ea10f568b2..20f6b553d0 100644 --- a/meta/lib/oeqa/sdk/cases/maturin.py +++ b/meta/lib/oeqa/sdk/cases/maturin.py | |||
@@ -8,7 +8,6 @@ import os | |||
8 | import shutil | 8 | import shutil |
9 | import unittest | 9 | import unittest |
10 | 10 | ||
11 | from oeqa.core.utils.path import remove_safe | ||
12 | from oeqa.sdk.case import OESDKTestCase | 11 | from oeqa.sdk.case import OESDKTestCase |
13 | from oeqa.utils.subprocesstweak import errors_have_output | 12 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | 13 | ||
diff --git a/meta/lib/oeqa/sdk/cases/buildepoxy.py b/meta/lib/oeqa/sdk/cases/meson.py index 147ee3e0ee..be53df204a 100644 --- a/meta/lib/oeqa/sdk/cases/buildepoxy.py +++ b/meta/lib/oeqa/sdk/cases/meson.py | |||
@@ -13,14 +13,14 @@ from oeqa.sdk.case import OESDKTestCase | |||
13 | from oeqa.utils.subprocesstweak import errors_have_output | 13 | from oeqa.utils.subprocesstweak import errors_have_output |
14 | errors_have_output() | 14 | errors_have_output() |
15 | 15 | ||
16 | class EpoxyTest(OESDKTestCase): | 16 | class MesonTest(OESDKTestCase): |
17 | """ | 17 | """ |
18 | Test that Meson builds correctly. | 18 | Test that Meson builds correctly. |
19 | """ | 19 | """ |
20 | def setUp(self): | 20 | def setUp(self): |
21 | if not (self.tc.hasHostPackage("nativesdk-meson") or | 21 | if not (self.tc.hasHostPackage("nativesdk-meson") or |
22 | self.tc.hasHostPackage("meson-native")): | 22 | self.tc.hasHostPackage("meson-native")): |
23 | raise unittest.SkipTest("EpoxyTest class: SDK doesn't contain Meson") | 23 | raise unittest.SkipTest("MesonTest: needs meson") |
24 | 24 | ||
25 | def test_epoxy(self): | 25 | def test_epoxy(self): |
26 | with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir: | 26 | with tempfile.TemporaryDirectory(prefix="epoxy", dir=self.tc.sdk_dir) as testdir: |
diff --git a/meta/lib/oeqa/sdk/cases/python.py b/meta/lib/oeqa/sdk/cases/python.py index 5ea992b9f3..51284949f5 100644 --- a/meta/lib/oeqa/sdk/cases/python.py +++ b/meta/lib/oeqa/sdk/cases/python.py | |||
@@ -4,7 +4,7 @@ | |||
4 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
5 | # | 5 | # |
6 | 6 | ||
7 | import subprocess, unittest | 7 | import unittest |
8 | from oeqa.sdk.case import OESDKTestCase | 8 | from oeqa.sdk.case import OESDKTestCase |
9 | 9 | ||
10 | from oeqa.utils.subprocesstweak import errors_have_output | 10 | from oeqa.utils.subprocesstweak import errors_have_output |
diff --git a/meta/lib/oeqa/sdk/cases/rust.py b/meta/lib/oeqa/sdk/cases/rust.py index f5d437bb19..a54245851b 100644 --- a/meta/lib/oeqa/sdk/cases/rust.py +++ b/meta/lib/oeqa/sdk/cases/rust.py | |||
@@ -8,7 +8,6 @@ import os | |||
8 | import shutil | 8 | import shutil |
9 | import unittest | 9 | import unittest |
10 | 10 | ||
11 | from oeqa.core.utils.path import remove_safe | ||
12 | from oeqa.sdk.case import OESDKTestCase | 11 | from oeqa.sdk.case import OESDKTestCase |
13 | 12 | ||
14 | from oeqa.utils.subprocesstweak import errors_have_output | 13 | from oeqa.utils.subprocesstweak import errors_have_output |
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py index 5ffb732556..d0746e68eb 100644 --- a/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/meta/lib/oeqa/sdkext/cases/devtool.py | |||
@@ -69,10 +69,9 @@ class DevtoolTest(OESDKExtTestCase): | |||
69 | self._test_devtool_build(self.myapp_cmake_dst) | 69 | self._test_devtool_build(self.myapp_cmake_dst) |
70 | 70 | ||
71 | def test_extend_autotools_recipe_creation(self): | 71 | def test_extend_autotools_recipe_creation(self): |
72 | req = 'https://github.com/rdfa/librdfa' | 72 | recipe = "test-dbus-wait" |
73 | recipe = "librdfa" | 73 | self._run('devtool sdk-install dbus') |
74 | self._run('devtool sdk-install libxml2') | 74 | self._run('devtool add %s https://git.yoctoproject.org/git/dbus-wait' % (recipe) ) |
75 | self._run('devtool add %s %s' % (recipe, req) ) | ||
76 | try: | 75 | try: |
77 | self._run('devtool build %s' % recipe) | 76 | self._run('devtool build %s' % recipe) |
78 | finally: | 77 | finally: |
diff --git a/meta/lib/oeqa/selftest/cases/debuginfod.py b/meta/lib/oeqa/selftest/cases/debuginfod.py index 505b4be837..46c0cd87bb 100644 --- a/meta/lib/oeqa/selftest/cases/debuginfod.py +++ b/meta/lib/oeqa/selftest/cases/debuginfod.py | |||
@@ -62,7 +62,7 @@ class Debuginfod(OESelftestTestCase): | |||
62 | 62 | ||
63 | raise TimeoutError("Cannot connect debuginfod, still %d scan jobs running" % latest) | 63 | raise TimeoutError("Cannot connect debuginfod, still %d scan jobs running" % latest) |
64 | 64 | ||
65 | def start_debuginfod(self): | 65 | def start_debuginfod(self, feed_dir): |
66 | # We assume that the caller has already bitbake'd elfutils-native:do_addto_recipe_sysroot | 66 | # We assume that the caller has already bitbake'd elfutils-native:do_addto_recipe_sysroot |
67 | 67 | ||
68 | # Save some useful paths for later | 68 | # Save some useful paths for later |
@@ -82,7 +82,7 @@ class Debuginfod(OESelftestTestCase): | |||
82 | # Disable rescanning, this is a one-shot test | 82 | # Disable rescanning, this is a one-shot test |
83 | "--rescan-time=0", | 83 | "--rescan-time=0", |
84 | "--groom-time=0", | 84 | "--groom-time=0", |
85 | get_bb_var("DEPLOY_DIR"), | 85 | feed_dir, |
86 | ] | 86 | ] |
87 | 87 | ||
88 | format = get_bb_var("PACKAGE_CLASSES").split()[0] | 88 | format = get_bb_var("PACKAGE_CLASSES").split()[0] |
@@ -114,11 +114,12 @@ class Debuginfod(OESelftestTestCase): | |||
114 | self.write_config(""" | 114 | self.write_config(""" |
115 | TMPDIR = "${TOPDIR}/tmp-debuginfod" | 115 | TMPDIR = "${TOPDIR}/tmp-debuginfod" |
116 | DISTRO_FEATURES:append = " debuginfod" | 116 | DISTRO_FEATURES:append = " debuginfod" |
117 | INHERIT += "localpkgfeed" | ||
117 | """) | 118 | """) |
118 | bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package") | 119 | bitbake("elfutils-native:do_addto_recipe_sysroot xz xz:do_package xz:do_localpkgfeed") |
119 | 120 | ||
120 | try: | 121 | try: |
121 | self.start_debuginfod() | 122 | self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz")) |
122 | 123 | ||
123 | env = os.environ.copy() | 124 | env = os.environ.copy() |
124 | env["DEBUGINFOD_URLS"] = "http://localhost:%d/" % self.port | 125 | env["DEBUGINFOD_URLS"] = "http://localhost:%d/" % self.port |
@@ -141,12 +142,13 @@ DISTRO_FEATURES:append = " debuginfod" | |||
141 | self.write_config(""" | 142 | self.write_config(""" |
142 | TMPDIR = "${TOPDIR}/tmp-debuginfod" | 143 | TMPDIR = "${TOPDIR}/tmp-debuginfod" |
143 | DISTRO_FEATURES:append = " debuginfod" | 144 | DISTRO_FEATURES:append = " debuginfod" |
145 | INHERIT += "localpkgfeed" | ||
144 | CORE_IMAGE_EXTRA_INSTALL += "elfutils xz" | 146 | CORE_IMAGE_EXTRA_INSTALL += "elfutils xz" |
145 | """) | 147 | """) |
146 | bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot") | 148 | bitbake("core-image-minimal elfutils-native:do_addto_recipe_sysroot xz:do_localpkgfeed") |
147 | 149 | ||
148 | try: | 150 | try: |
149 | self.start_debuginfod() | 151 | self.start_debuginfod(get_bb_var("LOCALPKGFEED_DIR", "xz")) |
150 | 152 | ||
151 | with runqemu("core-image-minimal", runqemuparams="nographic") as qemu: | 153 | with runqemu("core-image-minimal", runqemuparams="nographic") as qemu: |
152 | cmd = "DEBUGINFOD_URLS=http://%s:%d/ debuginfod-find debuginfo /usr/bin/xz" % (qemu.server_ip, self.port) | 154 | cmd = "DEBUGINFOD_URLS=http://%s:%d/ debuginfod-find debuginfo /usr/bin/xz" % (qemu.server_ip, self.port) |
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index c8f9534e41..1cafb922ea 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py | |||
@@ -753,6 +753,25 @@ class DevtoolModifyTests(DevtoolBase): | |||
753 | result = runCmd('devtool status') | 753 | result = runCmd('devtool status') |
754 | self.assertNotIn('mdadm', result.output) | 754 | self.assertNotIn('mdadm', result.output) |
755 | 755 | ||
756 | def test_devtool_modify_go(self): | ||
757 | import oe.path | ||
758 | from tempfile import TemporaryDirectory | ||
759 | with TemporaryDirectory(prefix='devtoolqa') as tempdir: | ||
760 | self.track_for_cleanup(self.workspacedir) | ||
761 | self.add_command_to_tearDown('bitbake -c clean go-helloworld') | ||
762 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | ||
763 | result = runCmd('devtool modify go-helloworld -x %s' % tempdir) | ||
764 | self.assertExists( | ||
765 | oe.path.join(tempdir, 'src', 'golang.org', 'x', 'example', 'go.mod'), | ||
766 | 'Extracted source could not be found' | ||
767 | ) | ||
768 | self.assertExists( | ||
769 | oe.path.join(self.workspacedir, 'conf', 'layer.conf'), | ||
770 | 'Workspace directory not created' | ||
771 | ) | ||
772 | matches = glob.glob(oe.path.join(self.workspacedir, 'appends', 'go-helloworld_*.bbappend')) | ||
773 | self.assertTrue(matches, 'bbappend not created %s' % result.output) | ||
774 | |||
756 | def test_devtool_buildclean(self): | 775 | def test_devtool_buildclean(self): |
757 | def assertFile(path, *paths): | 776 | def assertFile(path, *paths): |
758 | f = os.path.join(path, *paths) | 777 | f = os.path.join(path, *paths) |
@@ -879,13 +898,8 @@ class DevtoolModifyTests(DevtoolBase): | |||
879 | self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe) | 898 | self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe) |
880 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') | 899 | self.add_command_to_tearDown('bitbake-layers remove-layer */workspace') |
881 | result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir)) | 900 | result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir)) |
882 | srcfile = os.path.join(tempdir, 'oe-local-files/share/dot.bashrc') | 901 | srcfile = os.path.join(tempdir, 'share/dot.bashrc') |
883 | srclink = os.path.join(tempdir, 'share/dot.bashrc') | ||
884 | self.assertExists(srcfile, 'Extracted source could not be found') | 902 | self.assertExists(srcfile, 'Extracted source could not be found') |
885 | if os.path.islink(srclink) and os.path.exists(srclink) and os.path.samefile(srcfile, srclink): | ||
886 | correct_symlink = True | ||
887 | self.assertTrue(correct_symlink, 'Source symlink to oe-local-files is broken') | ||
888 | |||
889 | matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % testrecipe)) | 903 | matches = glob.glob(os.path.join(self.workspacedir, 'appends', '%s_*.bbappend' % testrecipe)) |
890 | self.assertTrue(matches, 'bbappend not created') | 904 | self.assertTrue(matches, 'bbappend not created') |
891 | # Test devtool status | 905 | # Test devtool status |
@@ -956,9 +970,9 @@ class DevtoolModifyTests(DevtoolBase): | |||
956 | # others git:// in SRC_URI | 970 | # others git:// in SRC_URI |
957 | # cointains a patch | 971 | # cointains a patch |
958 | testrecipe = 'hello-rs' | 972 | testrecipe = 'hello-rs' |
959 | bb_vars = get_bb_vars(['SRC_URI', 'FILE', 'WORKDIR', 'CARGO_HOME'], testrecipe) | 973 | bb_vars = get_bb_vars(['SRC_URI', 'FILE', 'UNPACKDIR', 'CARGO_HOME'], testrecipe) |
960 | recipefile = bb_vars['FILE'] | 974 | recipefile = bb_vars['FILE'] |
961 | workdir = bb_vars['WORKDIR'] | 975 | unpackdir = bb_vars['UNPACKDIR'] |
962 | cargo_home = bb_vars['CARGO_HOME'] | 976 | cargo_home = bb_vars['CARGO_HOME'] |
963 | src_uri = bb_vars['SRC_URI'].split() | 977 | src_uri = bb_vars['SRC_URI'].split() |
964 | self.assertTrue(src_uri[0].startswith('git://'), | 978 | self.assertTrue(src_uri[0].startswith('git://'), |
@@ -1029,7 +1043,7 @@ class DevtoolModifyTests(DevtoolBase): | |||
1029 | self.assertEqual(parms['type'], 'git-dependency', 'git dependencies uri should have "type=git-dependency"') | 1043 | self.assertEqual(parms['type'], 'git-dependency', 'git dependencies uri should have "type=git-dependency"') |
1030 | raw_url = raw_url.replace("git://", '%s://' % parms['protocol']) | 1044 | raw_url = raw_url.replace("git://", '%s://' % parms['protocol']) |
1031 | patch_line = '[patch."%s"]' % raw_url | 1045 | patch_line = '[patch."%s"]' % raw_url |
1032 | path_patched = os.path.join(workdir, parms['destsuffix']) | 1046 | path_patched = os.path.join(unpackdir, parms['destsuffix']) |
1033 | path_override_line = '%s = { path = "%s" }' % (parms['name'], path_patched) | 1047 | path_override_line = '%s = { path = "%s" }' % (parms['name'], path_patched) |
1034 | # Would have been better to use tomllib to read this file :/ | 1048 | # Would have been better to use tomllib to read this file :/ |
1035 | self.assertIn(patch_line, cargo_config_contents) | 1049 | self.assertIn(patch_line, cargo_config_contents) |
@@ -1278,7 +1292,7 @@ class DevtoolUpdateTests(DevtoolBase): | |||
1278 | with open(bbappendfile, 'r') as f: | 1292 | with open(bbappendfile, 'r') as f: |
1279 | self.assertEqual(expectedlines, f.readlines()) | 1293 | self.assertEqual(expectedlines, f.readlines()) |
1280 | # Drop new commit and check patch gets deleted | 1294 | # Drop new commit and check patch gets deleted |
1281 | result = runCmd('git reset HEAD^', cwd=tempsrcdir) | 1295 | result = runCmd('git reset HEAD^ --hard', cwd=tempsrcdir) |
1282 | result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir)) | 1296 | result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir)) |
1283 | self.assertNotExists(patchfile, 'Patch file not deleted') | 1297 | self.assertNotExists(patchfile, 'Patch file not deleted') |
1284 | expectedlines2 = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n', | 1298 | expectedlines2 = ['FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n', |
@@ -1287,6 +1301,7 @@ class DevtoolUpdateTests(DevtoolBase): | |||
1287 | self.assertEqual(expectedlines2, f.readlines()) | 1301 | self.assertEqual(expectedlines2, f.readlines()) |
1288 | # Put commit back and check we can run it if layer isn't in bblayers.conf | 1302 | # Put commit back and check we can run it if layer isn't in bblayers.conf |
1289 | os.remove(bbappendfile) | 1303 | os.remove(bbappendfile) |
1304 | result = runCmd("sed 's!\\(#define VERSION\\W*\"[^\"]*\\)\"!\\1-custom\"!' -i ReadMe.c", cwd=tempsrcdir) | ||
1290 | result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir) | 1305 | result = runCmd('git commit -a -m "Add our custom version"', cwd=tempsrcdir) |
1291 | result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir) | 1306 | result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir) |
1292 | result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir)) | 1307 | result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir)) |
@@ -1361,7 +1376,7 @@ class DevtoolUpdateTests(DevtoolBase): | |||
1361 | with open(bbappendfile, 'r') as f: | 1376 | with open(bbappendfile, 'r') as f: |
1362 | self.assertEqual(expectedlines, set(f.readlines())) | 1377 | self.assertEqual(expectedlines, set(f.readlines())) |
1363 | # Drop new commit and check SRCREV changes | 1378 | # Drop new commit and check SRCREV changes |
1364 | result = runCmd('git reset HEAD^', cwd=tempsrcdir) | 1379 | result = runCmd('git reset HEAD^ --hard', cwd=tempsrcdir) |
1365 | result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir)) | 1380 | result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir)) |
1366 | self.assertNotExists(os.path.join(appenddir, testrecipe), 'Patch directory should not be created') | 1381 | self.assertNotExists(os.path.join(appenddir, testrecipe), 'Patch directory should not be created') |
1367 | result = runCmd('git rev-parse HEAD', cwd=tempsrcdir) | 1382 | result = runCmd('git rev-parse HEAD', cwd=tempsrcdir) |
@@ -1373,6 +1388,7 @@ class DevtoolUpdateTests(DevtoolBase): | |||
1373 | self.assertEqual(expectedlines, set(f.readlines())) | 1388 | self.assertEqual(expectedlines, set(f.readlines())) |
1374 | # Put commit back and check we can run it if layer isn't in bblayers.conf | 1389 | # Put commit back and check we can run it if layer isn't in bblayers.conf |
1375 | os.remove(bbappendfile) | 1390 | os.remove(bbappendfile) |
1391 | result = runCmd('echo "# Additional line" >> Makefile.am', cwd=tempsrcdir) | ||
1376 | result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempsrcdir) | 1392 | result = runCmd('git commit -a -m "Change the Makefile"', cwd=tempsrcdir) |
1377 | result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir) | 1393 | result = runCmd('bitbake-layers remove-layer %s' % templayerdir, cwd=self.builddir) |
1378 | result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir)) | 1394 | result = runCmd('devtool update-recipe -m srcrev %s -a %s' % (testrecipe, templayerdir)) |
@@ -1404,11 +1420,12 @@ class DevtoolUpdateTests(DevtoolBase): | |||
1404 | # Try building just to ensure we haven't broken that | 1420 | # Try building just to ensure we haven't broken that |
1405 | bitbake("%s" % testrecipe) | 1421 | bitbake("%s" % testrecipe) |
1406 | # Edit / commit local source | 1422 | # Edit / commit local source |
1407 | runCmd('echo "/* Foobar */" >> oe-local-files/makedevs.c', cwd=tempdir) | 1423 | runCmd('echo "/* Foobar */" >> makedevs.c', cwd=tempdir) |
1408 | runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir) | 1424 | runCmd('echo "Foo" > new-local', cwd=tempdir) |
1409 | runCmd('echo "Bar" > new-file', cwd=tempdir) | 1425 | runCmd('echo "Bar" > new-file', cwd=tempdir) |
1410 | runCmd('git add new-file', cwd=tempdir) | 1426 | runCmd('git add new-file', cwd=tempdir) |
1411 | runCmd('git commit -m "Add new file"', cwd=tempdir) | 1427 | runCmd('git commit -m "Add new file"', cwd=tempdir) |
1428 | runCmd('git add new-local', cwd=tempdir) | ||
1412 | runCmd('devtool update-recipe %s' % testrecipe) | 1429 | runCmd('devtool update-recipe %s' % testrecipe) |
1413 | expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)), | 1430 | expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)), |
1414 | (' M', '.*/makedevs/makedevs.c$'), | 1431 | (' M', '.*/makedevs/makedevs.c$'), |
@@ -1434,8 +1451,8 @@ class DevtoolUpdateTests(DevtoolBase): | |||
1434 | self.assertExists(local_file, 'File makedevs.c not created') | 1451 | self.assertExists(local_file, 'File makedevs.c not created') |
1435 | self.assertExists(patchfile, 'File new_local not created') | 1452 | self.assertExists(patchfile, 'File new_local not created') |
1436 | 1453 | ||
1437 | def test_devtool_update_recipe_local_files_2(self): | 1454 | def _test_devtool_update_recipe_local_files_2(self): |
1438 | """Check local source files support when oe-local-files is in Git""" | 1455 | """Check local source files support when editing local files in Git""" |
1439 | testrecipe = 'devtool-test-local' | 1456 | testrecipe = 'devtool-test-local' |
1440 | recipefile = get_bb_var('FILE', testrecipe) | 1457 | recipefile = get_bb_var('FILE', testrecipe) |
1441 | recipedir = os.path.dirname(recipefile) | 1458 | recipedir = os.path.dirname(recipefile) |
@@ -1450,17 +1467,13 @@ class DevtoolUpdateTests(DevtoolBase): | |||
1450 | result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir)) | 1467 | result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir)) |
1451 | # Check git repo | 1468 | # Check git repo |
1452 | self._check_src_repo(tempdir) | 1469 | self._check_src_repo(tempdir) |
1453 | # Add oe-local-files to Git | ||
1454 | runCmd('rm oe-local-files/.gitignore', cwd=tempdir) | ||
1455 | runCmd('git add oe-local-files', cwd=tempdir) | ||
1456 | runCmd('git commit -m "Add local sources"', cwd=tempdir) | ||
1457 | # Edit / commit local sources | 1470 | # Edit / commit local sources |
1458 | runCmd('echo "# Foobar" >> oe-local-files/file1', cwd=tempdir) | 1471 | runCmd('echo "# Foobar" >> file1', cwd=tempdir) |
1459 | runCmd('git commit -am "Edit existing file"', cwd=tempdir) | 1472 | runCmd('git commit -am "Edit existing file"', cwd=tempdir) |
1460 | runCmd('git rm oe-local-files/file2', cwd=tempdir) | 1473 | runCmd('git rm file2', cwd=tempdir) |
1461 | runCmd('git commit -m"Remove file"', cwd=tempdir) | 1474 | runCmd('git commit -m"Remove file"', cwd=tempdir) |
1462 | runCmd('echo "Foo" > oe-local-files/new-local', cwd=tempdir) | 1475 | runCmd('echo "Foo" > new-local', cwd=tempdir) |
1463 | runCmd('git add oe-local-files/new-local', cwd=tempdir) | 1476 | runCmd('git add new-local', cwd=tempdir) |
1464 | runCmd('git commit -m "Add new local file"', cwd=tempdir) | 1477 | runCmd('git commit -m "Add new local file"', cwd=tempdir) |
1465 | runCmd('echo "Gar" > new-file', cwd=tempdir) | 1478 | runCmd('echo "Gar" > new-file', cwd=tempdir) |
1466 | runCmd('git add new-file', cwd=tempdir) | 1479 | runCmd('git add new-file', cwd=tempdir) |
@@ -1469,7 +1482,7 @@ class DevtoolUpdateTests(DevtoolBase): | |||
1469 | os.path.dirname(recipefile)) | 1482 | os.path.dirname(recipefile)) |
1470 | # Checkout unmodified file to working copy -> devtool should still pick | 1483 | # Checkout unmodified file to working copy -> devtool should still pick |
1471 | # the modified version from HEAD | 1484 | # the modified version from HEAD |
1472 | runCmd('git checkout HEAD^ -- oe-local-files/file1', cwd=tempdir) | 1485 | runCmd('git checkout HEAD^ -- file1', cwd=tempdir) |
1473 | runCmd('devtool update-recipe %s' % testrecipe) | 1486 | runCmd('devtool update-recipe %s' % testrecipe) |
1474 | expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)), | 1487 | expected_status = [(' M', '.*/%s$' % os.path.basename(recipefile)), |
1475 | (' M', '.*/file1$'), | 1488 | (' M', '.*/file1$'), |
@@ -1544,7 +1557,7 @@ class DevtoolUpdateTests(DevtoolBase): | |||
1544 | # (don't bother with cleaning the recipe on teardown, we won't be building it) | 1557 | # (don't bother with cleaning the recipe on teardown, we won't be building it) |
1545 | result = runCmd('devtool modify %s' % testrecipe) | 1558 | result = runCmd('devtool modify %s' % testrecipe) |
1546 | # Modify one file | 1559 | # Modify one file |
1547 | runCmd('echo "Another line" >> file2', cwd=os.path.join(self.workspacedir, 'sources', testrecipe, 'oe-local-files')) | 1560 | runCmd('echo "Another line" >> file2', cwd=os.path.join(self.workspacedir, 'sources', testrecipe)) |
1548 | self.add_command_to_tearDown('cd %s; rm %s/*; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile))) | 1561 | self.add_command_to_tearDown('cd %s; rm %s/*; git checkout %s %s' % (os.path.dirname(recipefile), testrecipe, testrecipe, os.path.basename(recipefile))) |
1549 | result = runCmd('devtool update-recipe %s' % testrecipe) | 1562 | result = runCmd('devtool update-recipe %s' % testrecipe) |
1550 | expected_status = [(' M', '.*/%s/file2$' % testrecipe)] | 1563 | expected_status = [(' M', '.*/%s/file2$' % testrecipe)] |
@@ -1773,6 +1786,8 @@ class DevtoolExtractTests(DevtoolBase): | |||
1773 | # Definitions | 1786 | # Definitions |
1774 | testrecipe = 'mdadm' | 1787 | testrecipe = 'mdadm' |
1775 | testfile = '/sbin/mdadm' | 1788 | testfile = '/sbin/mdadm' |
1789 | if "usrmerge" in get_bb_var('DISTRO_FEATURES'): | ||
1790 | testfile = '/usr/sbin/mdadm' | ||
1776 | testimage = 'oe-selftest-image' | 1791 | testimage = 'oe-selftest-image' |
1777 | testcommand = '/sbin/mdadm --help' | 1792 | testcommand = '/sbin/mdadm --help' |
1778 | # Build an image to run | 1793 | # Build an image to run |
diff --git a/meta/lib/oeqa/selftest/cases/layerappend.py b/meta/lib/oeqa/selftest/cases/layerappend.py index 379ed589ad..64b17117cc 100644 --- a/meta/lib/oeqa/selftest/cases/layerappend.py +++ b/meta/lib/oeqa/selftest/cases/layerappend.py | |||
@@ -37,7 +37,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | |||
37 | SRC_URI:append = " file://appendtest.txt" | 37 | SRC_URI:append = " file://appendtest.txt" |
38 | 38 | ||
39 | sysroot_stage_all:append() { | 39 | sysroot_stage_all:append() { |
40 | install -m 644 ${WORKDIR}/appendtest.txt ${SYSROOT_DESTDIR}/ | 40 | install -m 644 ${UNPACKDIR}/appendtest.txt ${SYSROOT_DESTDIR}/ |
41 | } | 41 | } |
42 | 42 | ||
43 | """ | 43 | """ |
diff --git a/meta/lib/oeqa/selftest/cases/minidebuginfo.py b/meta/lib/oeqa/selftest/cases/minidebuginfo.py index 2919f07939..a8923460f9 100644 --- a/meta/lib/oeqa/selftest/cases/minidebuginfo.py +++ b/meta/lib/oeqa/selftest/cases/minidebuginfo.py | |||
@@ -8,6 +8,7 @@ import subprocess | |||
8 | import tempfile | 8 | import tempfile |
9 | import shutil | 9 | import shutil |
10 | 10 | ||
11 | from oeqa.core.decorator import OETestTag | ||
11 | from oeqa.selftest.case import OESelftestTestCase | 12 | from oeqa.selftest.case import OESelftestTestCase |
12 | from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runCmd | 13 | from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars, runCmd |
13 | 14 | ||
@@ -42,3 +43,18 @@ IMAGE_FSTYPES = "tar.bz2" | |||
42 | native_sysroot = native_sysroot, target_sys = target_sys) | 43 | native_sysroot = native_sysroot, target_sys = target_sys) |
43 | self.assertIn(".gnu_debugdata", r.output) | 44 | self.assertIn(".gnu_debugdata", r.output) |
44 | 45 | ||
46 | @OETestTag("runqemu") | ||
47 | def test_minidebuginfo_qemu(self): | ||
48 | """ | ||
49 | Test minidebuginfo inside a qemu. | ||
50 | This runs test_systemd_coredump_minidebuginfo and other minidebuginfo runtime tests which may be added in the future. | ||
51 | """ | ||
52 | |||
53 | self.write_config(""" | ||
54 | DISTRO_FEATURES:append = " minidebuginfo" | ||
55 | INIT_MANAGER = "systemd" | ||
56 | IMAGE_CLASSES += "testimage" | ||
57 | TEST_SUITES = "ping ssh systemd" | ||
58 | """) | ||
59 | bitbake('core-image-minimal') | ||
60 | bitbake('-c testimage core-image-minimal') | ||
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py b/meta/lib/oeqa/selftest/cases/oescripts.py index f69efccfee..fcfe54af74 100644 --- a/meta/lib/oeqa/selftest/cases/oescripts.py +++ b/meta/lib/oeqa/selftest/cases/oescripts.py | |||
@@ -175,7 +175,7 @@ class OEListPackageconfigTests(OESelftestTestCase): | |||
175 | def test_packageconfig_flags_option_all(self): | 175 | def test_packageconfig_flags_option_all(self): |
176 | results = runCmd('%s/contrib/list-packageconfig-flags.py -a' % self.scripts_dir) | 176 | results = runCmd('%s/contrib/list-packageconfig-flags.py -a' % self.scripts_dir) |
177 | expected_endlines = [] | 177 | expected_endlines = [] |
178 | expected_endlines.append("pinentry-1.2.1") | 178 | expected_endlines.append("pinentry-1.3.0") |
179 | expected_endlines.append("PACKAGECONFIG ncurses") | 179 | expected_endlines.append("PACKAGECONFIG ncurses") |
180 | expected_endlines.append("PACKAGECONFIG[qt] --enable-pinentry-qt, --disable-pinentry-qt, qtbase-native qtbase") | 180 | expected_endlines.append("PACKAGECONFIG[qt] --enable-pinentry-qt, --disable-pinentry-qt, qtbase-native qtbase") |
181 | expected_endlines.append("PACKAGECONFIG[gtk2] --enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0") | 181 | expected_endlines.append("PACKAGECONFIG[gtk2] --enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0") |
diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index aebea42502..42202b7831 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py | |||
@@ -120,9 +120,15 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
120 | self._try_recipetool_appendfile_fail('/dev/console', self.testfile, ['ERROR: /dev/console cannot be handled by this tool']) | 120 | self._try_recipetool_appendfile_fail('/dev/console', self.testfile, ['ERROR: /dev/console cannot be handled by this tool']) |
121 | 121 | ||
122 | def test_recipetool_appendfile_alternatives(self): | 122 | def test_recipetool_appendfile_alternatives(self): |
123 | lspath = '/bin/ls' | ||
124 | dirname = "base_bindir" | ||
125 | if "usrmerge" in get_bb_var('DISTRO_FEATURES'): | ||
126 | lspath = '/usr/bin/ls' | ||
127 | dirname = "bindir" | ||
128 | |||
123 | # Now try with a file we know should be an alternative | 129 | # Now try with a file we know should be an alternative |
124 | # (this is very much a fake example, but one we know is reliably an alternative) | 130 | # (this is very much a fake example, but one we know is reliably an alternative) |
125 | self._try_recipetool_appendfile_fail('/bin/ls', self.testfile, ['ERROR: File /bin/ls is an alternative possibly provided by the following recipes:', 'coreutils', 'busybox']) | 131 | self._try_recipetool_appendfile_fail(lspath, self.testfile, ['ERROR: File %s is an alternative possibly provided by the following recipes:' % lspath, 'coreutils', 'busybox']) |
126 | # Need a test file - should be executable | 132 | # Need a test file - should be executable |
127 | testfile2 = os.path.join(self.corebase, 'oe-init-build-env') | 133 | testfile2 = os.path.join(self.corebase, 'oe-init-build-env') |
128 | testfile2name = os.path.basename(testfile2) | 134 | testfile2name = os.path.basename(testfile2) |
@@ -131,12 +137,12 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
131 | 'SRC_URI += "file://%s"\n' % testfile2name, | 137 | 'SRC_URI += "file://%s"\n' % testfile2name, |
132 | '\n', | 138 | '\n', |
133 | 'do_install:append() {\n', | 139 | 'do_install:append() {\n', |
134 | ' install -d ${D}${base_bindir}\n', | 140 | ' install -d ${D}${%s}\n' % dirname, |
135 | ' install -m 0755 ${WORKDIR}/%s ${D}${base_bindir}/ls\n' % testfile2name, | 141 | ' install -m 0755 ${UNPACKDIR}/%s ${D}${%s}/ls\n' % (testfile2name, dirname), |
136 | '}\n'] | 142 | '}\n'] |
137 | self._try_recipetool_appendfile('coreutils', '/bin/ls', testfile2, '-r coreutils', expectedlines, [testfile2name]) | 143 | self._try_recipetool_appendfile('coreutils', lspath, testfile2, '-r coreutils', expectedlines, [testfile2name]) |
138 | # Now try bbappending the same file again, contents should not change | 144 | # Now try bbappending the same file again, contents should not change |
139 | bbappendfile, _ = self._try_recipetool_appendfile('coreutils', '/bin/ls', self.testfile, '-r coreutils', expectedlines, [testfile2name]) | 145 | bbappendfile, _ = self._try_recipetool_appendfile('coreutils', lspath, self.testfile, '-r coreutils', expectedlines, [testfile2name]) |
140 | # But file should have | 146 | # But file should have |
141 | copiedfile = os.path.join(os.path.dirname(bbappendfile), 'coreutils', testfile2name) | 147 | copiedfile = os.path.join(os.path.dirname(bbappendfile), 'coreutils', testfile2name) |
142 | result = runCmd('diff -q %s %s' % (testfile2, copiedfile), ignore_status=True) | 148 | result = runCmd('diff -q %s %s' % (testfile2, copiedfile), ignore_status=True) |
@@ -158,7 +164,7 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
158 | '\n', | 164 | '\n', |
159 | 'do_install:append() {\n', | 165 | 'do_install:append() {\n', |
160 | ' install -d ${D}${datadir}\n', | 166 | ' install -d ${D}${datadir}\n', |
161 | ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n', | 167 | ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/something\n', |
162 | '}\n'] | 168 | '}\n'] |
163 | self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase', expectedlines, ['testfile']) | 169 | self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase', expectedlines, ['testfile']) |
164 | # Try adding another file, this time where the source file is executable | 170 | # Try adding another file, this time where the source file is executable |
@@ -173,8 +179,8 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
173 | '\n', | 179 | '\n', |
174 | 'do_install:append() {\n', | 180 | 'do_install:append() {\n', |
175 | ' install -d ${D}${datadir}\n', | 181 | ' install -d ${D}${datadir}\n', |
176 | ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n', | 182 | ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/something\n', |
177 | ' install -m 0755 ${WORKDIR}/%s ${D}${datadir}/scriptname\n' % testfile2name, | 183 | ' install -m 0755 ${UNPACKDIR}/%s ${D}${datadir}/scriptname\n' % testfile2name, |
178 | '}\n'] | 184 | '}\n'] |
179 | self._try_recipetool_appendfile('netbase', '/usr/share/scriptname', testfile2, '-r netbase', expectedlines, ['testfile', testfile2name]) | 185 | self._try_recipetool_appendfile('netbase', '/usr/share/scriptname', testfile2, '-r netbase', expectedlines, ['testfile', testfile2name]) |
180 | 186 | ||
@@ -186,7 +192,7 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
186 | '\n', | 192 | '\n', |
187 | 'do_install:append() {\n', | 193 | 'do_install:append() {\n', |
188 | ' install -d ${D}${bindir}\n', | 194 | ' install -d ${D}${bindir}\n', |
189 | ' install -m 0755 ${WORKDIR}/testfile ${D}${bindir}/selftest-recipetool-testbin\n', | 195 | ' install -m 0755 ${UNPACKDIR}/testfile ${D}${bindir}/selftest-recipetool-testbin\n', |
190 | '}\n'] | 196 | '}\n'] |
191 | _, output = self._try_recipetool_appendfile('netbase', '/usr/bin/selftest-recipetool-testbin', self.testfile, '-r netbase', expectedlines, ['testfile']) | 197 | _, output = self._try_recipetool_appendfile('netbase', '/usr/bin/selftest-recipetool-testbin', self.testfile, '-r netbase', expectedlines, ['testfile']) |
192 | self.assertNotIn('WARNING: ', output) | 198 | self.assertNotIn('WARNING: ', output) |
@@ -201,7 +207,7 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
201 | '\n', | 207 | '\n', |
202 | 'do_install:append:mymachine() {\n', | 208 | 'do_install:append:mymachine() {\n', |
203 | ' install -d ${D}${datadir}\n', | 209 | ' install -d ${D}${datadir}\n', |
204 | ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/something\n', | 210 | ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/something\n', |
205 | '}\n'] | 211 | '}\n'] |
206 | _, output = self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase -m mymachine', expectedlines, ['mymachine/testfile']) | 212 | _, output = self._try_recipetool_appendfile('netbase', '/usr/share/something', self.testfile, '-r netbase -m mymachine', expectedlines, ['mymachine/testfile']) |
207 | self.assertNotIn('WARNING: ', output) | 213 | self.assertNotIn('WARNING: ', output) |
@@ -235,7 +241,7 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
235 | '\n', | 241 | '\n', |
236 | 'do_install:append() {\n', | 242 | 'do_install:append() {\n', |
237 | ' install -d ${D}${datadir}\n', | 243 | ' install -d ${D}${datadir}\n', |
238 | ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-subdir\n', | 244 | ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/selftest-replaceme-subdir\n', |
239 | '}\n'] | 245 | '}\n'] |
240 | _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-subdir', self.testfile, '', expectedlines, ['testfile']) | 246 | _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-subdir', self.testfile, '', expectedlines, ['testfile']) |
241 | self.assertNotIn('WARNING: ', output) | 247 | self.assertNotIn('WARNING: ', output) |
@@ -262,7 +268,7 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
262 | '\n', | 268 | '\n', |
263 | 'do_install:append() {\n', | 269 | 'do_install:append() {\n', |
264 | ' install -d ${D}${sysconfdir}\n', | 270 | ' install -d ${D}${sysconfdir}\n', |
265 | ' install -m 0644 ${WORKDIR}/testfile ${D}${sysconfdir}/selftest-replaceme-patched\n', | 271 | ' install -m 0644 ${UNPACKDIR}/testfile ${D}${sysconfdir}/selftest-replaceme-patched\n', |
266 | '}\n'] | 272 | '}\n'] |
267 | _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/etc/selftest-replaceme-patched', self.testfile, '', expectedlines, ['testfile']) | 273 | _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/etc/selftest-replaceme-patched', self.testfile, '', expectedlines, ['testfile']) |
268 | for line in output.splitlines(): | 274 | for line in output.splitlines(): |
@@ -280,7 +286,7 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
280 | '\n', | 286 | '\n', |
281 | 'do_install:append() {\n', | 287 | 'do_install:append() {\n', |
282 | ' install -d ${D}${datadir}\n', | 288 | ' install -d ${D}${datadir}\n', |
283 | ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-scripted\n', | 289 | ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/selftest-replaceme-scripted\n', |
284 | '}\n'] | 290 | '}\n'] |
285 | _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-scripted', self.testfile, '', expectedlines, ['testfile']) | 291 | _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-scripted', self.testfile, '', expectedlines, ['testfile']) |
286 | self.assertNotIn('WARNING: ', output) | 292 | self.assertNotIn('WARNING: ', output) |
@@ -303,7 +309,7 @@ class RecipetoolAppendTests(RecipetoolBase): | |||
303 | '\n', | 309 | '\n', |
304 | 'do_install:append() {\n', | 310 | 'do_install:append() {\n', |
305 | ' install -d ${D}${datadir}\n', | 311 | ' install -d ${D}${datadir}\n', |
306 | ' install -m 0644 ${WORKDIR}/testfile ${D}${datadir}/selftest-replaceme-postinst\n', | 312 | ' install -m 0644 ${UNPACKDIR}/testfile ${D}${datadir}/selftest-replaceme-postinst\n', |
307 | '}\n'] | 313 | '}\n'] |
308 | _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-postinst', self.testfile, '-r selftest-recipetool-appendfile', expectedlines, ['testfile']) | 314 | _, output = self._try_recipetool_appendfile('selftest-recipetool-appendfile', '/usr/share/selftest-replaceme-postinst', self.testfile, '-r selftest-recipetool-appendfile', expectedlines, ['testfile']) |
309 | 315 | ||
diff --git a/meta/lib/oeqa/selftest/cases/recipeutils.py b/meta/lib/oeqa/selftest/cases/recipeutils.py index 2cb4445f81..9949737172 100644 --- a/meta/lib/oeqa/selftest/cases/recipeutils.py +++ b/meta/lib/oeqa/selftest/cases/recipeutils.py | |||
@@ -72,7 +72,7 @@ class RecipeUtilsTests(OESelftestTestCase): | |||
72 | expected_patch = """ | 72 | expected_patch = """ |
73 | --- a/recipes-test/recipeutils/recipeutils-test_1.2.bb | 73 | --- a/recipes-test/recipeutils/recipeutils-test_1.2.bb |
74 | +++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb | 74 | +++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb |
75 | @@ -8,6 +8,4 @@ | 75 | @@ -11,6 +11,4 @@ |
76 | 76 | ||
77 | BBCLASSEXTEND = "native nativesdk" | 77 | BBCLASSEXTEND = "native nativesdk" |
78 | 78 | ||
@@ -97,7 +97,7 @@ class RecipeUtilsTests(OESelftestTestCase): | |||
97 | expected_patch = """ | 97 | expected_patch = """ |
98 | --- a/recipes-test/recipeutils/recipeutils-test_1.2.bb | 98 | --- a/recipes-test/recipeutils/recipeutils-test_1.2.bb |
99 | +++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb | 99 | +++ b/recipes-test/recipeutils/recipeutils-test_1.2.bb |
100 | @@ -8,6 +8,3 @@ | 100 | @@ -11,6 +11,3 @@ |
101 | 101 | ||
102 | BBCLASSEXTEND = "native nativesdk" | 102 | BBCLASSEXTEND = "native nativesdk" |
103 | 103 | ||
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index 80e830136f..97a9c3da90 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py | |||
@@ -16,6 +16,8 @@ import os | |||
16 | import datetime | 16 | import datetime |
17 | 17 | ||
18 | exclude_packages = [ | 18 | exclude_packages = [ |
19 | 'rust-rustdoc', | ||
20 | 'rust-dbg' | ||
19 | ] | 21 | ] |
20 | 22 | ||
21 | def is_excluded(package): | 23 | def is_excluded(package): |
diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 12000aac16..13aa5f16c9 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py | |||
@@ -273,7 +273,7 @@ TEST_RUNQEMUPARAMS += " slirp" | |||
273 | import subprocess, os | 273 | import subprocess, os |
274 | 274 | ||
275 | distro = oe.lsb.distro_identifier() | 275 | distro = oe.lsb.distro_identifier() |
276 | if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'ubuntu-16.04', 'ubuntu-18.04'] or | 276 | if distro and (distro in ['debian-9', 'debian-10', 'centos-7', 'centos-8', 'centos-9', 'ubuntu-16.04', 'ubuntu-18.04'] or |
277 | distro.startswith('almalinux') or distro.startswith('rocky')): | 277 | distro.startswith('almalinux') or distro.startswith('rocky')): |
278 | self.skipTest('virgl headless cannot be tested with %s' %(distro)) | 278 | self.skipTest('virgl headless cannot be tested with %s' %(distro)) |
279 | 279 | ||
diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py index ad14189c6d..4ccbe9867b 100644 --- a/meta/lib/oeqa/selftest/cases/rust.py +++ b/meta/lib/oeqa/selftest/cases/rust.py | |||
@@ -210,9 +210,8 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase): | |||
210 | tmpdir = get_bb_var("TMPDIR", "rust") | 210 | tmpdir = get_bb_var("TMPDIR", "rust") |
211 | 211 | ||
212 | # Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools. | 212 | # Set path for target-poky-linux-gcc, RUST_TARGET_PATH and hosttools. |
213 | cmd = " export PATH=%s/recipe-sysroot-native/usr/bin:$PATH;" % rustlibpath | 213 | cmd = "export TARGET_VENDOR=\"-poky\";" |
214 | cmd = cmd + " export TARGET_VENDOR=\"-poky\";" | 214 | cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/python3-native:%s/recipe-sysroot-native/usr/bin:%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, rustlibpath, rustlibpath, tcpath, tmpdir) |
215 | cmd = cmd + " export PATH=%s/recipe-sysroot-native/usr/bin/%s:%s/hosttools:$PATH;" % (rustlibpath, tcpath, tmpdir) | ||
216 | cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath | 215 | cmd = cmd + " export RUST_TARGET_PATH=%s/rust-targets;" % rustlibpath |
217 | # Trigger testing. | 216 | # Trigger testing. |
218 | cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip | 217 | cmd = cmd + " export TEST_DEVICE_ADDR=\"%s:12345\";" % qemu.ip |
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 86d6cd7464..94ad6e38b6 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py | |||
@@ -917,15 +917,25 @@ INHERIT += "base-do-configure-modified" | |||
917 | """, | 917 | """, |
918 | expected_sametmp_output, expected_difftmp_output) | 918 | expected_sametmp_output, expected_difftmp_output) |
919 | 919 | ||
920 | @OETestTag("yocto-mirrors") | 920 | class SStateCheckObjectPresence(SStateBase): |
921 | class SStateMirrors(SStateBase): | 921 | def check_bb_output(self, output, targets, exceptions, check_cdn): |
922 | def check_bb_output(self, output, exceptions, check_cdn): | ||
923 | def is_exception(object, exceptions): | 922 | def is_exception(object, exceptions): |
924 | for e in exceptions: | 923 | for e in exceptions: |
925 | if re.search(e, object): | 924 | if re.search(e, object): |
926 | return True | 925 | return True |
927 | return False | 926 | return False |
928 | 927 | ||
928 | # sstate is checked for existence of these, but they never get written out to begin with | ||
929 | exceptions += ["{}.*image_qa".format(t) for t in targets.split()] | ||
930 | exceptions += ["{}.*deploy_source_date_epoch".format(t) for t in targets.split()] | ||
931 | exceptions += ["{}.*image_complete".format(t) for t in targets.split()] | ||
932 | exceptions += ["linux-yocto.*shared_workdir"] | ||
933 | # these get influnced by IMAGE_FSTYPES tweaks in yocto-autobuilder-helper's config.json (on x86-64) | ||
934 | # additionally, they depend on noexec (thus, absent stamps) package, install, etc. image tasks, | ||
935 | # which makes tracing other changes difficult | ||
936 | exceptions += ["{}.*create_spdx".format(t) for t in targets.split()] | ||
937 | exceptions += ["{}.*create_runtime_spdx".format(t) for t in targets.split()] | ||
938 | |||
929 | output_l = output.splitlines() | 939 | output_l = output.splitlines() |
930 | for l in output_l: | 940 | for l in output_l: |
931 | if l.startswith("Sstate summary"): | 941 | if l.startswith("Sstate summary"): |
@@ -960,18 +970,9 @@ class SStateMirrors(SStateBase): | |||
960 | self.assertEqual(len(failed_urls), missing_objects, "Amount of reported missing objects does not match failed URLs: {}\nFailed URLs:\n{}\nFetcher diagnostics:\n{}".format(missing_objects, "\n".join(failed_urls), "\n".join(failed_urls_extrainfo))) | 970 | self.assertEqual(len(failed_urls), missing_objects, "Amount of reported missing objects does not match failed URLs: {}\nFailed URLs:\n{}\nFetcher diagnostics:\n{}".format(missing_objects, "\n".join(failed_urls), "\n".join(failed_urls_extrainfo))) |
961 | self.assertEqual(len(failed_urls), 0, "Missing objects in the cache:\n{}\nFetcher diagnostics:\n{}".format("\n".join(failed_urls), "\n".join(failed_urls_extrainfo))) | 971 | self.assertEqual(len(failed_urls), 0, "Missing objects in the cache:\n{}\nFetcher diagnostics:\n{}".format("\n".join(failed_urls), "\n".join(failed_urls_extrainfo))) |
962 | 972 | ||
973 | @OETestTag("yocto-mirrors") | ||
974 | class SStateMirrors(SStateCheckObjectPresence): | ||
963 | def run_test(self, machine, targets, exceptions, check_cdn = True, ignore_errors = False): | 975 | def run_test(self, machine, targets, exceptions, check_cdn = True, ignore_errors = False): |
964 | # sstate is checked for existence of these, but they never get written out to begin with | ||
965 | exceptions += ["{}.*image_qa".format(t) for t in targets.split()] | ||
966 | exceptions += ["{}.*deploy_source_date_epoch".format(t) for t in targets.split()] | ||
967 | exceptions += ["{}.*image_complete".format(t) for t in targets.split()] | ||
968 | exceptions += ["linux-yocto.*shared_workdir"] | ||
969 | # these get influnced by IMAGE_FSTYPES tweaks in yocto-autobuilder-helper's config.json (on x86-64) | ||
970 | # additionally, they depend on noexec (thus, absent stamps) package, install, etc. image tasks, | ||
971 | # which makes tracing other changes difficult | ||
972 | exceptions += ["{}.*create_spdx".format(t) for t in targets.split()] | ||
973 | exceptions += ["{}.*create_runtime_spdx".format(t) for t in targets.split()] | ||
974 | |||
975 | if check_cdn: | 976 | if check_cdn: |
976 | self.config_sstate(True) | 977 | self.config_sstate(True) |
977 | self.append_config(""" | 978 | self.append_config(""" |
@@ -987,7 +988,7 @@ MACHINE = "{}" | |||
987 | bitbake("-S none {}".format(targets)) | 988 | bitbake("-S none {}".format(targets)) |
988 | if ignore_errors: | 989 | if ignore_errors: |
989 | return | 990 | return |
990 | self.check_bb_output(result.output, exceptions, check_cdn) | 991 | self.check_bb_output(result.output, targets, exceptions, check_cdn) |
991 | 992 | ||
992 | def test_cdn_mirror_qemux86_64(self): | 993 | def test_cdn_mirror_qemux86_64(self): |
993 | exceptions = [] | 994 | exceptions = [] |
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 575e380017..bf2f49d0c0 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -314,7 +314,23 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec= | |||
314 | @contextlib.contextmanager | 314 | @contextlib.contextmanager |
315 | def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True): | 315 | def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True): |
316 | """ | 316 | """ |
317 | launch_cmd means directly run the command, don't need set rootfs or env vars. | 317 | Starts a context manager for a 'oeqa.targetcontrol.QemuTarget' resource. |
318 | The underlying Qemu will be booted into a shell when the generator yields | ||
319 | and stopped when the 'with' block exits. | ||
320 | |||
321 | Usage: | ||
322 | |||
323 | with runqemu('core-image-minimal') as qemu: | ||
324 | qemu.run_serial('cat /proc/cpuinfo') | ||
325 | |||
326 | Args: | ||
327 | pn (str): (image) recipe to run on | ||
328 | ssh (boolean): whether or not to enable SSH (network access) | ||
329 | runqemuparams (str): space-separated list of params to pass to 'runqemu' script (like 'nographics', 'ovmf', etc.) | ||
330 | image_fstype (str): IMAGE_FSTYPE to use | ||
331 | launch_cmd (str): directly run this command and bypass automatic runqemu parameter generation | ||
332 | overrides (dict): dict of "'<bitbake-variable>': value" pairs that allows overriding bitbake variables | ||
333 | discard_writes (boolean): enables qemu -snapshot feature to prevent modifying original image | ||
318 | """ | 334 | """ |
319 | 335 | ||
320 | import bb.tinfoil | 336 | import bb.tinfoil |
diff --git a/meta/lib/patchtest/repo.py b/meta/lib/patchtest/repo.py index d3788f466d..5f361ac500 100644 --- a/meta/lib/patchtest/repo.py +++ b/meta/lib/patchtest/repo.py | |||
@@ -11,6 +11,7 @@ | |||
11 | import os | 11 | import os |
12 | import utils | 12 | import utils |
13 | import logging | 13 | import logging |
14 | import git | ||
14 | from patch import PatchTestPatch | 15 | from patch import PatchTestPatch |
15 | 16 | ||
16 | logger = logging.getLogger('patchtest') | 17 | logger = logging.getLogger('patchtest') |
@@ -21,15 +22,17 @@ class PatchTestRepo(object): | |||
21 | # prefixes used for temporal branches/stashes | 22 | # prefixes used for temporal branches/stashes |
22 | prefix = 'patchtest' | 23 | prefix = 'patchtest' |
23 | 24 | ||
25 | |||
24 | def __init__(self, patch, repodir, commit=None, branch=None): | 26 | def __init__(self, patch, repodir, commit=None, branch=None): |
25 | self._repodir = repodir | 27 | self._repodir = repodir |
28 | self._repo = git.Repo.init(repodir) | ||
26 | self._patch = PatchTestPatch(patch) | 29 | self._patch = PatchTestPatch(patch) |
27 | self._current_branch = self._get_current_branch() | 30 | self._current_branch = self._repo.active_branch.name |
28 | 31 | ||
29 | # targeted branch defined on the patch may be invalid, so make sure there | 32 | # targeted branch defined on the patch may be invalid, so make sure there |
30 | # is a corresponding remote branch | 33 | # is a corresponding remote branch |
31 | valid_patch_branch = None | 34 | valid_patch_branch = None |
32 | if self._patch.branch in self.upstream_branches(): | 35 | if self._patch.branch in self._repo.branches: |
33 | valid_patch_branch = self._patch.branch | 36 | valid_patch_branch = self._patch.branch |
34 | 37 | ||
35 | # Target Branch | 38 | # Target Branch |
@@ -52,22 +55,19 @@ class PatchTestRepo(object): | |||
52 | 55 | ||
53 | self._workingbranch = "%s_%s" % (PatchTestRepo.prefix, os.getpid()) | 56 | self._workingbranch = "%s_%s" % (PatchTestRepo.prefix, os.getpid()) |
54 | 57 | ||
55 | # create working branch | 58 | # create working branch. Use the '-B' flag so that we just |
56 | self._exec({'cmd': ['git', 'checkout', '-b', self._workingbranch, self._commit]}) | 59 | # check out the existing one if it's there |
60 | self._repo.git.execute(['git', 'checkout', '-B', self._workingbranch, self._commit]) | ||
57 | 61 | ||
58 | self._patchmerged = False | 62 | self._patchmerged = False |
59 | 63 | ||
60 | # Check if patch can be merged using git-am | 64 | # Check if patch can be merged using git-am |
61 | self._patchcanbemerged = True | 65 | self._patchcanbemerged = True |
62 | try: | 66 | try: |
63 | self._exec({'cmd': ['git', 'am', '--keep-cr'], 'input': self._patch.contents}) | 67 | # Make sure to get the absolute path of the file |
64 | except utils.CmdException as ce: | 68 | self._repo.git.execute(['git', 'apply', '--check', os.path.abspath(self._patch.path)], with_exceptions=True) |
65 | self._exec({'cmd': ['git', 'am', '--abort']}) | 69 | except git.exc.GitCommandError as ce: |
66 | self._patchcanbemerged = False | 70 | self._patchcanbemerged = False |
67 | finally: | ||
68 | # if patch was applied, remove it | ||
69 | if self._patchcanbemerged: | ||
70 | self._exec({'cmd':['git', 'reset', '--hard', self._commit]}) | ||
71 | 71 | ||
72 | # for debugging purposes, print all repo parameters | 72 | # for debugging purposes, print all repo parameters |
73 | logger.debug("Parameters") | 73 | logger.debug("Parameters") |
@@ -97,78 +97,24 @@ class PatchTestRepo(object): | |||
97 | def canbemerged(self): | 97 | def canbemerged(self): |
98 | return self._patchcanbemerged | 98 | return self._patchcanbemerged |
99 | 99 | ||
100 | def _exec(self, cmds): | ||
101 | _cmds = [] | ||
102 | if isinstance(cmds, dict): | ||
103 | _cmds.append(cmds) | ||
104 | elif isinstance(cmds, list): | ||
105 | _cmds = cmds | ||
106 | else: | ||
107 | raise utils.CmdException({'cmd':str(cmds)}) | ||
108 | |||
109 | results = [] | ||
110 | cmdfailure = False | ||
111 | try: | ||
112 | results = utils.exec_cmds(_cmds, self._repodir) | ||
113 | except utils.CmdException as ce: | ||
114 | cmdfailure = True | ||
115 | raise ce | ||
116 | finally: | ||
117 | if cmdfailure: | ||
118 | for cmd in _cmds: | ||
119 | logger.debug("CMD: %s" % ' '.join(cmd['cmd'])) | ||
120 | else: | ||
121 | for result in results: | ||
122 | cmd, rc, stdout, stderr = ' '.join(result['cmd']), result['returncode'], result['stdout'], result['stderr'] | ||
123 | logger.debug("CMD: %s RCODE: %s STDOUT: %s STDERR: %s" % (cmd, rc, stdout, stderr)) | ||
124 | |||
125 | return results | ||
126 | |||
127 | def _get_current_branch(self, commit='HEAD'): | ||
128 | cmd = {'cmd':['git', 'rev-parse', '--abbrev-ref', commit]} | ||
129 | cb = self._exec(cmd)[0]['stdout'] | ||
130 | if cb == commit: | ||
131 | logger.warning('You may be detached so patchtest will checkout to master after execution') | ||
132 | cb = 'master' | ||
133 | return cb | ||
134 | |||
135 | def _get_commitid(self, commit): | 100 | def _get_commitid(self, commit): |
136 | 101 | ||
137 | if not commit: | 102 | if not commit: |
138 | return None | 103 | return None |
139 | 104 | ||
140 | try: | 105 | try: |
141 | cmd = {'cmd':['git', 'rev-parse', '--short', commit]} | 106 | return self._repo.rev_parse(commit).hexsha |
142 | return self._exec(cmd)[0]['stdout'] | 107 | except Exception as e: |
143 | except utils.CmdException as ce: | 108 | print(f"Couldn't find commit {commit} in repo") |
144 | # try getting the commit under any remotes | ||
145 | cmd = {'cmd':['git', 'remote']} | ||
146 | remotes = self._exec(cmd)[0]['stdout'] | ||
147 | for remote in remotes.splitlines(): | ||
148 | cmd = {'cmd':['git', 'rev-parse', '--short', '%s/%s' % (remote, commit)]} | ||
149 | try: | ||
150 | return self._exec(cmd)[0]['stdout'] | ||
151 | except utils.CmdException: | ||
152 | pass | ||
153 | 109 | ||
154 | return None | 110 | return None |
155 | 111 | ||
156 | def upstream_branches(self): | ||
157 | cmd = {'cmd':['git', 'branch', '--remotes']} | ||
158 | remote_branches = self._exec(cmd)[0]['stdout'] | ||
159 | |||
160 | # just get the names, without the remote name | ||
161 | branches = set(branch.split('/')[-1] for branch in remote_branches.splitlines()) | ||
162 | return branches | ||
163 | |||
164 | def merge(self): | 112 | def merge(self): |
165 | if self._patchcanbemerged: | 113 | if self._patchcanbemerged: |
166 | self._exec({'cmd': ['git', 'am', '--keep-cr'], | 114 | self._repo.git.execute(['git', 'am', '--keep-cr', os.path.abspath(self._patch.path)]) |
167 | 'input': self._patch.contents, | ||
168 | 'updateenv': {'PTRESOURCE':self._patch.path}}) | ||
169 | self._patchmerged = True | 115 | self._patchmerged = True |
170 | 116 | ||
171 | def clean(self): | 117 | def clean(self): |
172 | self._exec({'cmd':['git', 'checkout', '%s' % self._current_branch]}) | 118 | self._repo.git.execute(['git', 'checkout', self._current_branch]) |
173 | self._exec({'cmd':['git', 'branch', '-D', self._workingbranch]}) | 119 | self._repo.git.execute(['git', 'branch', '-D', self._workingbranch]) |
174 | self._patchmerged = False | 120 | self._patchmerged = False |
diff --git a/meta/lib/patchtest/requirements.txt b/meta/lib/patchtest/requirements.txt index ba55ff905e..4247b91f09 100644 --- a/meta/lib/patchtest/requirements.txt +++ b/meta/lib/patchtest/requirements.txt | |||
@@ -1,5 +1,6 @@ | |||
1 | boto3 | 1 | boto3 |
2 | git-pw>=2.5.0 | 2 | git-pw>=2.5.0 |
3 | GitPython | ||
3 | jinja2 | 4 | jinja2 |
4 | pylint | 5 | pylint |
5 | pyparsing>=3.0.9 | 6 | pyparsing>=3.0.9 |
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail index 0c40cdc1b6..30c1bc4624 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.fail | |||
@@ -1,32 +1,43 @@ | |||
1 | From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001 | 1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 |
2 | From: First Last <first.last@example.com> | 2 | From: First Last <first.last@example.com> |
3 | Date: Tue, 29 Aug 2023 13:32:24 -0400 | 3 | Date: Fri, 31 May 2024 11:03:47 -0400 |
4 | Subject: [PATCH] selftest-hello: add a summary | 4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra |
5 | 5 | ||
6 | This patch should fail the selftests because the author address is from the | 6 | This should fail the test_author_valid test. |
7 | invalid "example.com". | ||
8 | 7 | ||
9 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
10 | --- | 9 | --- |
11 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | 10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ |
12 | 1 file changed, 2 insertions(+), 1 deletion(-) | 11 | 1 file changed, 21 insertions(+) |
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
13 | 13 | ||
14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
15 | index 547587bef4..491f0a3df7 100644 | 15 | new file mode 100644 |
16 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 16 | index 00000000000..f3dec1b220c |
17 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 17 | --- /dev/null |
18 | @@ -1,3 +1,4 @@ | 18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
19 | +SUMMARY = "A cool sample" | 19 | @@ -0,0 +1,21 @@ |
20 | DESCRIPTION = "Simple helloworld application -- selftest variant" | 20 | +SUMMARY = "This is an example summary" |
21 | SECTION = "examples" | 21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" |
22 | LICENSE = "MIT" | 22 | +SECTION = "examples" |
23 | @@ -16,4 +17,4 @@ do_install() { | 23 | +LICENSE = "MIT" |
24 | install -m 0755 helloworld ${D}${bindir} | 24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
25 | } | 25 | + |
26 | 26 | +SRC_URI = "file://helloworld.c" | |
27 | -BBCLASSEXTEND = "native nativesdk" | 27 | + |
28 | \ No newline at end of file | 28 | +S = "${WORKDIR}/sources" |
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
29 | +BBCLASSEXTEND = "native nativesdk" | 40 | +BBCLASSEXTEND = "native nativesdk" |
30 | -- | 41 | -- |
31 | 2.41.0 | 42 | 2.45.1 |
32 | 43 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass index cbb8ef2cef..6e82b08bc6 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.1.pass | |||
@@ -1,31 +1,43 @@ | |||
1 | From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001 | 1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 |
2 | From: First Last <first.last@address.com> | 2 | From: First Last <first.last@address.com> |
3 | Date: Tue, 29 Aug 2023 13:32:24 -0400 | 3 | Date: Fri, 31 May 2024 11:03:47 -0400 |
4 | Subject: [PATCH] selftest-hello: add a summary | 4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra |
5 | 5 | ||
6 | This patch should pass the selftests because the author address is in a valid format. | 6 | This should pass the test_author_valid test. |
7 | 7 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
10 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | 10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ |
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | 11 | 1 file changed, 21 insertions(+) |
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
12 | 13 | ||
13 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
14 | index 547587bef4..491f0a3df7 100644 | 15 | new file mode 100644 |
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 16 | index 00000000000..f3dec1b220c |
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 17 | --- /dev/null |
17 | @@ -1,3 +1,4 @@ | 18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
18 | +SUMMARY = "A cool sample" | 19 | @@ -0,0 +1,21 @@ |
19 | DESCRIPTION = "Simple helloworld application -- selftest variant" | 20 | +SUMMARY = "This is an example summary" |
20 | SECTION = "examples" | 21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" |
21 | LICENSE = "MIT" | 22 | +SECTION = "examples" |
22 | @@ -16,4 +17,4 @@ do_install() { | 23 | +LICENSE = "MIT" |
23 | install -m 0755 helloworld ${D}${bindir} | 24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
24 | } | 25 | + |
25 | 26 | +SRC_URI = "file://helloworld.c" | |
26 | -BBCLASSEXTEND = "native nativesdk" | 27 | + |
27 | \ No newline at end of file | 28 | +S = "${WORKDIR}/sources" |
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
28 | +BBCLASSEXTEND = "native nativesdk" | 40 | +BBCLASSEXTEND = "native nativesdk" |
29 | -- | 41 | -- |
30 | 2.41.0 | 42 | 2.45.1 |
31 | 43 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail index 3e2b81bca1..745a8f45d9 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.fail | |||
@@ -1,31 +1,43 @@ | |||
1 | From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001 | 1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 |
2 | From: Upgrade Helper <auh@auh.yoctoproject.org> | 2 | From: Upgrade Helper <auh@auh.yoctoproject.org> |
3 | Date: Tue, 29 Aug 2023 13:32:24 -0400 | 3 | Date: Fri, 31 May 2024 11:03:47 -0400 |
4 | Subject: [PATCH] selftest-hello: add a summary | 4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra |
5 | 5 | ||
6 | This patch should fail the selftests because AUH is an invalid sender. | 6 | This should fail the test_author_valid test. |
7 | 7 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
10 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | 10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ |
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | 11 | 1 file changed, 21 insertions(+) |
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
12 | 13 | ||
13 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
14 | index 547587bef4..491f0a3df7 100644 | 15 | new file mode 100644 |
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 16 | index 00000000000..f3dec1b220c |
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 17 | --- /dev/null |
17 | @@ -1,3 +1,4 @@ | 18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
18 | +SUMMARY = "A cool sample" | 19 | @@ -0,0 +1,21 @@ |
19 | DESCRIPTION = "Simple helloworld application -- selftest variant" | 20 | +SUMMARY = "This is an example summary" |
20 | SECTION = "examples" | 21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" |
21 | LICENSE = "MIT" | 22 | +SECTION = "examples" |
22 | @@ -16,4 +17,4 @@ do_install() { | 23 | +LICENSE = "MIT" |
23 | install -m 0755 helloworld ${D}${bindir} | 24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
24 | } | 25 | + |
25 | 26 | +SRC_URI = "file://helloworld.c" | |
26 | -BBCLASSEXTEND = "native nativesdk" | 27 | + |
27 | \ No newline at end of file | 28 | +S = "${WORKDIR}/sources" |
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
28 | +BBCLASSEXTEND = "native nativesdk" | 40 | +BBCLASSEXTEND = "native nativesdk" |
29 | -- | 41 | -- |
30 | 2.41.0 | 42 | 2.45.1 |
31 | 43 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass index f84e1265a7..56cb77fa69 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_author_valid.2.pass | |||
@@ -1,31 +1,43 @@ | |||
1 | From 1fbb446d1849b1208012cbdae5d85d228cdbe4a6 Mon Sep 17 00:00:00 2001 | 1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 |
2 | From: First Last <averylongemailaddressthatishardtoread.from@address.com> | 2 | From: First Last <averylongemailaddressthatishardtoread.from@address.com> |
3 | Date: Tue, 29 Aug 2023 13:32:24 -0400 | 3 | Date: Fri, 31 May 2024 11:03:47 -0400 |
4 | Subject: [PATCH] selftest-hello: add a summary | 4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra |
5 | 5 | ||
6 | This patch should pass the selftests because the author address is in a valid format. | 6 | This should pass the test_author_valid test. |
7 | 7 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
10 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | 10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ |
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | 11 | 1 file changed, 21 insertions(+) |
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb | ||
12 | 13 | ||
13 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
14 | index 547587bef4..491f0a3df7 100644 | 15 | new file mode 100644 |
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 16 | index 00000000000..f3dec1b220c |
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 17 | --- /dev/null |
17 | @@ -1,3 +1,4 @@ | 18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
18 | +SUMMARY = "A cool sample" | 19 | @@ -0,0 +1,21 @@ |
19 | DESCRIPTION = "Simple helloworld application -- selftest variant" | 20 | +SUMMARY = "This is an example summary" |
20 | SECTION = "examples" | 21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" |
21 | LICENSE = "MIT" | 22 | +SECTION = "examples" |
22 | @@ -16,4 +17,4 @@ do_install() { | 23 | +LICENSE = "MIT" |
23 | install -m 0755 helloworld ${D}${bindir} | 24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
24 | } | 25 | + |
25 | 26 | +SRC_URI = "file://helloworld.c" | |
26 | -BBCLASSEXTEND = "native nativesdk" | 27 | + |
27 | \ No newline at end of file | 28 | +S = "${WORKDIR}/sources" |
29 | +UNPACKDIR = "${S}" | ||
30 | + | ||
31 | +do_compile() { | ||
32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
33 | +} | ||
34 | + | ||
35 | +do_install() { | ||
36 | + install -d ${D}${bindir} | ||
37 | + install -m 0755 helloworld ${D}${bindir} | ||
38 | +} | ||
39 | + | ||
28 | +BBCLASSEXTEND = "native nativesdk" | 40 | +BBCLASSEXTEND = "native nativesdk" |
29 | -- | 41 | -- |
30 | 2.41.0 | 42 | 2.45.1 |
31 | 43 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail index 80f409e952..6facb8c756 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.fail | |||
@@ -1,25 +1,67 @@ | |||
1 | From fdfd605e565d874502522c4b70b786c8c5aa0bad Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: name@somedomain.com <email@address.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Fri, 17 Feb 2017 16:29:21 -0600 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] README: adds 'foo' to the header | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This test patch adds 'foo' to the header | 6 | This should fail the test_bugzilla_entry_format test. |
7 | 7 | ||
8 | [YOCTO 1234] | 8 | [YOCTO 1234] |
9 | CVE: CVE-1234-56789 | ||
9 | 10 | ||
10 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 11 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
11 | --- | 12 | --- |
12 | README | 1 + | 13 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
13 | 1 file changed, 1 insertion(+) | 14 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
15 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
16 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
14 | 17 | ||
15 | diff --git a/README b/README | 18 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | index 521916cd4f..cdf29dcea3 100644 | 19 | new file mode 100644 |
17 | --- a/README | 20 | index 00000000000..8a4f9329303 |
18 | +++ b/README | 21 | --- /dev/null |
19 | @@ -1,3 +1,4 @@ | 22 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | +**** FOO **** | 23 | @@ -0,0 +1,26 @@ |
21 | OpenEmbedded-Core | 24 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | ================= | 25 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
26 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
27 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
28 | + | ||
29 | +CVE: CVE-1234-56789 | ||
30 | +Upstream-Status: Backport(http://example.com/example) | ||
31 | + | ||
32 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
33 | +--- | ||
34 | + strlen.c | 1 + | ||
35 | + 1 file changed, 1 insertion(+) | ||
36 | + | ||
37 | +diff --git a/strlen.c b/strlen.c | ||
38 | +index 1788f38..83d7918 100644 | ||
39 | +--- a/strlen.c | ||
40 | ++++ b/strlen.c | ||
41 | + | ||
42 | +int main() { | ||
43 | + | ||
44 | + printf("%d\n", str_len(string1)); | ||
45 | + printf("%d\n", str_len(string2)); | ||
46 | + printf("CVE FIXED!!!\n"); | ||
47 | + | ||
48 | + return 0; | ||
49 | +} | ||
50 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | index 2dc352d479e..d937759f157 100644 | ||
52 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
54 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
55 | LICENSE = "MIT" | ||
56 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
57 | |||
58 | -SRC_URI = "file://helloworld.c" | ||
59 | +SRC_URI = "file://helloworld.c \ | ||
60 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
61 | + " | ||
62 | |||
63 | S = "${WORKDIR}/sources" | ||
64 | UNPACKDIR = "${S}" | ||
65 | -- | ||
66 | 2.45.1 | ||
23 | 67 | ||
24 | -- | ||
25 | 2.11.0 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass index 2648b03364..2f35458b4f 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_bugzilla_entry_format.pass | |||
@@ -1,25 +1,67 @@ | |||
1 | From fdfd605e565d874502522c4b70b786c8c5aa0bad Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: name@somedomain.com <email@address.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Fri, 17 Feb 2017 16:29:21 -0600 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] README: adds 'foo' to the header | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This test patch adds 'foo' to the header | 6 | This should pass the test_bugzilla_entry_format test. |
7 | 7 | ||
8 | [YOCTO #1234] | 8 | [YOCTO #1234] |
9 | CVE: CVE-1234-56789 | ||
9 | 10 | ||
10 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 11 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
11 | --- | 12 | --- |
12 | README | 1 + | 13 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
13 | 1 file changed, 1 insertion(+) | 14 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
15 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
16 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
14 | 17 | ||
15 | diff --git a/README b/README | 18 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | index 521916cd4f..cdf29dcea3 100644 | 19 | new file mode 100644 |
17 | --- a/README | 20 | index 00000000000..8a4f9329303 |
18 | +++ b/README | 21 | --- /dev/null |
19 | @@ -1,3 +1,4 @@ | 22 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | +**** FOO **** | 23 | @@ -0,0 +1,26 @@ |
21 | OpenEmbedded-Core | 24 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | ================= | 25 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
26 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
27 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
28 | + | ||
29 | +CVE: CVE-1234-56789 | ||
30 | +Upstream-Status: Backport(http://example.com/example) | ||
31 | + | ||
32 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
33 | +--- | ||
34 | + strlen.c | 1 + | ||
35 | + 1 file changed, 1 insertion(+) | ||
36 | + | ||
37 | +diff --git a/strlen.c b/strlen.c | ||
38 | +index 1788f38..83d7918 100644 | ||
39 | +--- a/strlen.c | ||
40 | ++++ b/strlen.c | ||
41 | + | ||
42 | +int main() { | ||
43 | + | ||
44 | + printf("%d\n", str_len(string1)); | ||
45 | + printf("%d\n", str_len(string2)); | ||
46 | + printf("CVE FIXED!!!\n"); | ||
47 | + | ||
48 | + return 0; | ||
49 | +} | ||
50 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
51 | index 2dc352d479e..d937759f157 100644 | ||
52 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
54 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
55 | LICENSE = "MIT" | ||
56 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
57 | |||
58 | -SRC_URI = "file://helloworld.c" | ||
59 | +SRC_URI = "file://helloworld.c \ | ||
60 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
61 | + " | ||
62 | |||
63 | S = "${WORKDIR}/sources" | ||
64 | UNPACKDIR = "${S}" | ||
65 | -- | ||
66 | 2.45.1 | ||
23 | 67 | ||
24 | -- | ||
25 | 2.11.0 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail index 93ca0f9119..6f4e61c0da 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.fail | |||
@@ -1,22 +1,62 @@ | |||
1 | From 0a52a62c9430c05d22cb7f46380488f2280b69bb Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Fri, 1 Sep 2023 08:56:14 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] README.OE-Core.md: add foo | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 6 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
7 | --- | 7 | --- |
8 | README.OE-Core.md | 1 + | 8 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
9 | 1 file changed, 1 insertion(+) | 9 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
10 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
11 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
10 | 12 | ||
11 | diff --git a/README.OE-Core.md b/README.OE-Core.md | 13 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
12 | index 2f2127fb03..48464252c8 100644 | 14 | new file mode 100644 |
13 | --- a/README.OE-Core.md | 15 | index 00000000000..8a4f9329303 |
14 | +++ b/README.OE-Core.md | 16 | --- /dev/null |
15 | @@ -1,3 +1,4 @@ | 17 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | +** FOO ** | 18 | @@ -0,0 +1,26 @@ |
17 | OpenEmbedded-Core | 19 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
18 | ================= | 20 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
21 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
22 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
23 | + | ||
24 | +CVE: CVE-1234-56789 | ||
25 | +Upstream-Status: Backport(http://example.com/example) | ||
26 | + | ||
27 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
28 | +--- | ||
29 | + strlen.c | 1 + | ||
30 | + 1 file changed, 1 insertion(+) | ||
31 | + | ||
32 | +diff --git a/strlen.c b/strlen.c | ||
33 | +index 1788f38..83d7918 100644 | ||
34 | +--- a/strlen.c | ||
35 | ++++ b/strlen.c | ||
36 | + | ||
37 | +int main() { | ||
38 | + | ||
39 | + printf("%d\n", str_len(string1)); | ||
40 | + printf("%d\n", str_len(string2)); | ||
41 | + printf("CVE FIXED!!!\n"); | ||
42 | + | ||
43 | + return 0; | ||
44 | +} | ||
45 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
46 | index 2dc352d479e..d937759f157 100644 | ||
47 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
48 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
49 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
50 | LICENSE = "MIT" | ||
51 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
19 | 52 | ||
53 | -SRC_URI = "file://helloworld.c" | ||
54 | +SRC_URI = "file://helloworld.c \ | ||
55 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
56 | + " | ||
57 | |||
58 | S = "${WORKDIR}/sources" | ||
59 | UNPACKDIR = "${S}" | ||
20 | -- | 60 | -- |
21 | 2.41.0 | 61 | 2.45.1 |
22 | 62 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass index 5e3dcbd58b..3fbc23fd00 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_commit_message_presence.pass | |||
@@ -1,24 +1,66 @@ | |||
1 | From 0a52a62c9430c05d22cb7f46380488f2280b69bb Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Fri, 1 Sep 2023 08:56:14 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] README.OE-Core.md: add foo | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This is a commit message | 6 | This should pass the test_commit_message_presence test. |
7 | |||
8 | CVE: CVE-1234-56789 | ||
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | README.OE-Core.md | 1 + | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | 1 file changed, 1 insertion(+) | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
12 | 16 | ||
13 | diff --git a/README.OE-Core.md b/README.OE-Core.md | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | index 2f2127fb03..48464252c8 100644 | 18 | new file mode 100644 |
15 | --- a/README.OE-Core.md | 19 | index 00000000000..8a4f9329303 |
16 | +++ b/README.OE-Core.md | 20 | --- /dev/null |
17 | @@ -1,3 +1,4 @@ | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
18 | +** FOO ** | 22 | @@ -0,0 +1,26 @@ |
19 | OpenEmbedded-Core | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
20 | ================= | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
21 | 61 | ||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
22 | -- | 64 | -- |
23 | 2.41.0 | 65 | 2.45.1 |
24 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail deleted file mode 100644 index 9cc4aab38a..0000000000 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.1.fail +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 | ||
4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 | ||
5 | |||
6 | This test should fail the mbox formatting test and the merge on head | ||
7 | test. | ||
8 | |||
9 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
10 | --- | ||
11 | .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++- | ||
12 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
13 | rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%) | ||
14 | |||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
16 | similarity index 88% | ||
17 | rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
18 | rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
19 | index 547587bef4..acc388ec2c 100644 | ||
20 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
22 | @@ -1,3 +1,4 @@ | ||
23 | %+SUMMARY = "Hello!" | ||
24 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
25 | SECTION = "examples" | ||
26 | LICENSE = "MIT" | ||
27 | @@ -16,4 +17,4 @@ do_install() { | ||
28 | install -m 0755 helloworld ${D}${bindir} | ||
29 | } | ||
30 | |||
31 | -BBCLASSEXTEND = "native nativesdk" | ||
32 | \ No newline at end of file | ||
33 | +BBCLASSEXTEND = "native nativesdk" | ||
34 | -- | ||
35 | 2.41.0 | ||
36 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail deleted file mode 100644 index eca1c60085..0000000000 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.2.fail +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 | ||
4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 | ||
5 | |||
6 | This test should fail the merge-on-head and mbox formatting tests. | ||
7 | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
9 | --- | ||
10 | .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%) | ||
13 | |||
14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
15 | similarity index 88% | ||
16 | rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
17 | rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
18 | index 547587bef4..acc388ec2c 100644 | ||
19 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
20 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | ||
21 | @@ -1,3 +1,4 @@ | ||
22 | %+SUMMARY = "Hello!" | ||
23 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
24 | SECTION = "examples" | ||
25 | LICENSE = "MIT" | ||
26 | @@ -16,4 +17,4 @@ do_install() { | ||
27 | install -m 0755 helloworld ${D}${bindir} | ||
28 | } | ||
29 | |||
30 | -BBCLASSEXTEND = "native nativesdk" | ||
31 | \ No newline at end of file | ||
32 | +BBCLASSEXTEND = "native nativesdk" | ||
33 | -- | ||
34 | 2.41.0 | ||
35 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail new file mode 100644 index 0000000000..0dda6802d1 --- /dev/null +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.fail | |||
@@ -0,0 +1,66 @@ | |||
1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
3 | Date: Fri, 31 May 2024 09:54:50 -0400 | ||
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | ||
5 | |||
6 | This should fail the test_mbox_format test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
9 | |||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | ||
12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ | ||
13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- | ||
14 | 2 files changed, 29 insertions(+), 1 deletion(-) | ||
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
16 | |||
17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
18 | new file mode 100644 | ||
19 | index 00000000000..8a4f9329303 | ||
20 | --- /dev/null | ||
21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | ||
54 | LICENSE = "MIT" | ||
55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
56 | |||
57 | -SRC_URI = "file://helloworld.c" | ||
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | %+ file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
61 | |||
62 | S = "${WORKDIR}/sources" | ||
63 | UNPACKDIR = "${S}" | ||
64 | -- | ||
65 | 2.45.1 | ||
66 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass index 33940adffc..f06ae11d04 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_mbox_format.pass | |||
@@ -1,33 +1,66 @@ | |||
1 | From d12db4cfa913b0e7a4b5bd858d3019acc53ce426 Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | |||
6 | This should pass the test_mbox_format test. | ||
7 | |||
8 | CVE: CVE-1234-56789 | ||
5 | 9 | ||
6 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
7 | --- | 11 | --- |
8 | .../{selftest-hello_1.0.bb => selftest-hello_1.1.bb} | 3 ++- | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
9 | 1 file changed, 2 insertions(+), 1 deletion(-) | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
10 | rename meta-selftest/recipes-test/selftest-hello/{selftest-hello_1.0.bb => selftest-hello_1.1.bb} (88%) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | ||
11 | 16 | ||
12 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
13 | similarity index 88% | 18 | new file mode 100644 |
14 | rename from meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 19 | index 00000000000..8a4f9329303 |
15 | rename to meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | 20 | --- /dev/null |
16 | index 547587bef4..acc388ec2c 100644 | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
22 | @@ -0,0 +1,26 @@ | ||
23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | ||
24 | +From: Trevor Gamblin <tgamblin@baylibre.com> | ||
25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | ||
26 | +Subject: [PATCH] Fix CVE-NOT-REAL | ||
27 | + | ||
28 | +CVE: CVE-1234-56789 | ||
29 | +Upstream-Status: Backport(http://example.com/example) | ||
30 | + | ||
31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
32 | +--- | ||
33 | + strlen.c | 1 + | ||
34 | + 1 file changed, 1 insertion(+) | ||
35 | + | ||
36 | +diff --git a/strlen.c b/strlen.c | ||
37 | +index 1788f38..83d7918 100644 | ||
38 | +--- a/strlen.c | ||
39 | ++++ b/strlen.c | ||
40 | + | ||
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | ||
50 | index 2dc352d479e..d937759f157 100644 | ||
17 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.1.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
19 | @@ -1,3 +1,4 @@ | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
20 | +SUMMARY = "Hello!" | ||
21 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | SECTION = "examples" | ||
23 | LICENSE = "MIT" | 54 | LICENSE = "MIT" |
24 | @@ -16,4 +17,4 @@ do_install() { | 55 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
25 | install -m 0755 helloworld ${D}${bindir} | 56 | |
26 | } | 57 | -SRC_URI = "file://helloworld.c" |
58 | +SRC_URI = "file://helloworld.c \ | ||
59 | + file://0001-Fix-CVE-1234-56789.patch \ | ||
60 | + " | ||
27 | 61 | ||
28 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
29 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
30 | +BBCLASSEXTEND = "native nativesdk" | ||
31 | -- | 64 | -- |
32 | 2.41.0 | 65 | 2.45.1 |
33 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip index 2a72457878..072ccc28c0 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_series_merge_on_head.1.skip | |||
@@ -3,7 +3,7 @@ From: Trevor Gamblin <tgamblin@baylibre.com> | |||
3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 | 3 | Date: Wed, 30 Aug 2023 12:15:00 -0400 |
4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 | 4 | Subject: [PATCH] selftest-hello: upgrade 1.0 -> 1.1 |
5 | 5 | ||
6 | This file should pass the test_series_merge_on_head test. | 6 | This file should skip the test_series_merge_on_head test. |
7 | 7 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail index cdbbc61b61..c5e4df2549 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.fail | |||
@@ -1,23 +1,25 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello% fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello% fix CVE-1234-56789 |
5 | 5 | ||
6 | This should fail the test_shortlog_format test. | ||
7 | |||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..9219b8db62 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,27 @@ | 22 | @@ -0,0 +1,26 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62 | |||
35 | +index 1788f38..83d7918 100644 | 37 | +index 1788f38..83d7918 100644 |
36 | +--- a/strlen.c | 38 | +--- a/strlen.c |
37 | ++++ b/strlen.c | 39 | ++++ b/strlen.c |
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | 40 | + |
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
50 | index 547587bef4..76975a6729 100644 | 50 | index 2dc352d479e..d937759f157 100644 |
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644 | |||
56 | 56 | ||
57 | -SRC_URI = "file://helloworld.c" | 57 | -SRC_URI = "file://helloworld.c" |
58 | +SRC_URI = "file://helloworld.c \ | 58 | +SRC_URI = "file://helloworld.c \ |
59 | + file://CVE-1234-56789.patch \ | 59 | + file://0001-Fix-CVE-1234-56789.patch \ |
60 | + " | 60 | + " |
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | 61 | ||
68 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
69 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | 64 | -- |
72 | 2.41.0 | 65 | 2.45.1 |
73 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass index ef6017037c..4948e26afc 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_format.pass | |||
@@ -1,23 +1,25 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This should pass the test_shortlog_format test. | ||
7 | |||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..9219b8db62 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,27 @@ | 22 | @@ -0,0 +1,26 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62 | |||
35 | +index 1788f38..83d7918 100644 | 37 | +index 1788f38..83d7918 100644 |
36 | +--- a/strlen.c | 38 | +--- a/strlen.c |
37 | ++++ b/strlen.c | 39 | ++++ b/strlen.c |
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | 40 | + |
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
50 | index 547587bef4..76975a6729 100644 | 50 | index 2dc352d479e..d937759f157 100644 |
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644 | |||
56 | 56 | ||
57 | -SRC_URI = "file://helloworld.c" | 57 | -SRC_URI = "file://helloworld.c" |
58 | +SRC_URI = "file://helloworld.c \ | 58 | +SRC_URI = "file://helloworld.c \ |
59 | + file://CVE-1234-56789.patch \ | 59 | + file://0001-Fix-CVE-1234-56789.patch \ |
60 | + " | 60 | + " |
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | 61 | ||
68 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
69 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | 64 | -- |
72 | 2.41.0 | 65 | 2.45.1 |
73 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail index 629e78540b..4ed1242821 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.fail | |||
@@ -1,23 +1,25 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: this is a very long commit shortlog with way too many words included in it to pass the test | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 this is a very long commit shortlog with way too many words included in it to pass the test |
5 | |||
6 | This should fail the test_shortlong_length test. | ||
5 | 7 | ||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..9219b8db62 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,27 @@ | 22 | @@ -0,0 +1,26 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62 | |||
35 | +index 1788f38..83d7918 100644 | 37 | +index 1788f38..83d7918 100644 |
36 | +--- a/strlen.c | 38 | +--- a/strlen.c |
37 | ++++ b/strlen.c | 39 | ++++ b/strlen.c |
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | 40 | + |
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
50 | index 547587bef4..76975a6729 100644 | 50 | index 2dc352d479e..d937759f157 100644 |
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -57,17 +57,10 @@ index 547587bef4..76975a6729 100644 | |||
57 | -SRC_URI = "file://helloworld.c" | 57 | -SRC_URI = "file://helloworld.c" |
58 | +SRC_URI = "file://helloworld.c \ | 58 | +SRC_URI = "file://helloworld.c \ |
59 | + file://0001-Fix-CVE-1234-56789.patch \ | 59 | + file://0001-Fix-CVE-1234-56789.patch \ |
60 | + " | 60 | + " |
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | 61 | ||
68 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
69 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | 64 | -- |
72 | 2.41.0 | 65 | 2.45.1 |
73 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass index ef6017037c..ef5066a650 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_shortlog_length.pass | |||
@@ -1,23 +1,25 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This should pass the test_shortlog_length test. | ||
7 | |||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..9219b8db62 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,27 @@ | 22 | @@ -0,0 +1,26 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62 | |||
35 | +index 1788f38..83d7918 100644 | 37 | +index 1788f38..83d7918 100644 |
36 | +--- a/strlen.c | 38 | +--- a/strlen.c |
37 | ++++ b/strlen.c | 39 | ++++ b/strlen.c |
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | 40 | + |
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
50 | index 547587bef4..76975a6729 100644 | 50 | index 2dc352d479e..d937759f157 100644 |
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644 | |||
56 | 56 | ||
57 | -SRC_URI = "file://helloworld.c" | 57 | -SRC_URI = "file://helloworld.c" |
58 | +SRC_URI = "file://helloworld.c \ | 58 | +SRC_URI = "file://helloworld.c \ |
59 | + file://CVE-1234-56789.patch \ | 59 | + file://0001-Fix-CVE-1234-56789.patch \ |
60 | + " | 60 | + " |
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | 61 | ||
68 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
69 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | 64 | -- |
72 | 2.41.0 | 65 | 2.45.1 |
73 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail index 35d92aeed7..4ede7271ee 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.1.fail | |||
@@ -1,22 +1,24 @@ | |||
1 | From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This should fail the test_signed_off_by_presence test. | ||
7 | |||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | --- | 10 | --- |
9 | .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ | 11 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
10 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 12 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
11 | 2 files changed, 31 insertions(+), 2 deletions(-) | 13 | 2 files changed, 29 insertions(+), 1 deletion(-) |
12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 14 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
13 | 15 | ||
14 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 16 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
15 | new file mode 100644 | 17 | new file mode 100644 |
16 | index 0000000000..869cfb6fe5 | 18 | index 00000000000..8a4f9329303 |
17 | --- /dev/null | 19 | --- /dev/null |
18 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 20 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
19 | @@ -0,0 +1,27 @@ | 21 | @@ -0,0 +1,26 @@ |
20 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 22 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
21 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 23 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
22 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 24 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -34,18 +36,17 @@ index 0000000000..869cfb6fe5 | |||
34 | +index 1788f38..83d7918 100644 | 36 | +index 1788f38..83d7918 100644 |
35 | +--- a/strlen.c | 37 | +--- a/strlen.c |
36 | ++++ b/strlen.c | 38 | ++++ b/strlen.c |
37 | +@@ -8,6 +8,7 @@ int main() { | 39 | + |
38 | + | 40 | +int main() { |
39 | + printf("%d\n", str_len(string1)); | 41 | + |
40 | + printf("%d\n", str_len(string2)); | 42 | + printf("%d\n", str_len(string1)); |
41 | ++ printf("CVE FIXED!!!\n"); | 43 | + printf("%d\n", str_len(string2)); |
42 | + | 44 | + printf("CVE FIXED!!!\n"); |
43 | + return 0; | 45 | + |
44 | + } | 46 | + return 0; |
45 | +-- | 47 | +} |
46 | +2.41.0 | ||
47 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 48 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
48 | index 547587bef4..76975a6729 100644 | 49 | index 2dc352d479e..d937759f157 100644 |
49 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
50 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
51 | @@ -3,7 +3,9 @@ SECTION = "examples" | 52 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -54,18 +55,11 @@ index 547587bef4..76975a6729 100644 | |||
54 | 55 | ||
55 | -SRC_URI = "file://helloworld.c" | 56 | -SRC_URI = "file://helloworld.c" |
56 | +SRC_URI = "file://helloworld.c \ | 57 | +SRC_URI = "file://helloworld.c \ |
57 | + file://CVE-1234-56789.patch \ | 58 | + file://0001-Fix-CVE-1234-56789.patch \ |
58 | + " | 59 | + " |
59 | |||
60 | S = "${WORKDIR}" | ||
61 | |||
62 | @@ -16,4 +18,4 @@ do_install() { | ||
63 | install -m 0755 helloworld ${D}${bindir} | ||
64 | } | ||
65 | 60 | ||
66 | -BBCLASSEXTEND = "native nativesdk" | 61 | S = "${WORKDIR}/sources" |
67 | \ No newline at end of file | 62 | UNPACKDIR = "${S}" |
68 | +BBCLASSEXTEND = "native nativesdk" | ||
69 | -- | 63 | -- |
70 | 2.41.0 | 64 | 2.45.1 |
71 | 65 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail index 68f38dee06..f7c3f5145a 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.2.fail | |||
@@ -1,23 +1,25 @@ | |||
1 | From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This should fail the test_signed_off_by_presence test. | ||
7 | |||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | Approved: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Approved-of-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..869cfb6fe5 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,27 @@ | 22 | @@ -0,0 +1,26 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -35,18 +37,17 @@ index 0000000000..869cfb6fe5 | |||
35 | +index 1788f38..83d7918 100644 | 37 | +index 1788f38..83d7918 100644 |
36 | +--- a/strlen.c | 38 | +--- a/strlen.c |
37 | ++++ b/strlen.c | 39 | ++++ b/strlen.c |
38 | +@@ -8,6 +8,7 @@ int main() { | 40 | + |
39 | + | 41 | +int main() { |
40 | + printf("%d\n", str_len(string1)); | 42 | + |
41 | + printf("%d\n", str_len(string2)); | 43 | + printf("%d\n", str_len(string1)); |
42 | ++ printf("CVE FIXED!!!\n"); | 44 | + printf("%d\n", str_len(string2)); |
43 | + | 45 | + printf("CVE FIXED!!!\n"); |
44 | + return 0; | 46 | + |
45 | + } | 47 | + return 0; |
46 | +-- | 48 | +} |
47 | +2.41.0 | ||
48 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
49 | index 547587bef4..76975a6729 100644 | 50 | index 2dc352d479e..d937759f157 100644 |
50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
52 | @@ -3,7 +3,9 @@ SECTION = "examples" | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -55,18 +56,11 @@ index 547587bef4..76975a6729 100644 | |||
55 | 56 | ||
56 | -SRC_URI = "file://helloworld.c" | 57 | -SRC_URI = "file://helloworld.c" |
57 | +SRC_URI = "file://helloworld.c \ | 58 | +SRC_URI = "file://helloworld.c \ |
58 | + file://CVE-1234-56789.patch \ | 59 | + file://0001-Fix-CVE-1234-56789.patch \ |
59 | + " | 60 | + " |
60 | |||
61 | S = "${WORKDIR}" | ||
62 | |||
63 | @@ -16,4 +18,4 @@ do_install() { | ||
64 | install -m 0755 helloworld ${D}${bindir} | ||
65 | } | ||
66 | 61 | ||
67 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
68 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
69 | +BBCLASSEXTEND = "native nativesdk" | ||
70 | -- | 64 | -- |
71 | 2.41.0 | 65 | 2.45.1 |
72 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass index ea34c76f0d..2661c1416f 100644 --- a/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass +++ b/meta/lib/patchtest/selftest/files/TestMbox.test_signed_off_by_presence.pass | |||
@@ -1,23 +1,25 @@ | |||
1 | From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This should pass the test_signed_off_by_presence test. | ||
7 | |||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..869cfb6fe5 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,27 @@ | 22 | @@ -0,0 +1,26 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -35,18 +37,17 @@ index 0000000000..869cfb6fe5 | |||
35 | +index 1788f38..83d7918 100644 | 37 | +index 1788f38..83d7918 100644 |
36 | +--- a/strlen.c | 38 | +--- a/strlen.c |
37 | ++++ b/strlen.c | 39 | ++++ b/strlen.c |
38 | +@@ -8,6 +8,7 @@ int main() { | 40 | + |
39 | + | 41 | +int main() { |
40 | + printf("%d\n", str_len(string1)); | 42 | + |
41 | + printf("%d\n", str_len(string2)); | 43 | + printf("%d\n", str_len(string1)); |
42 | ++ printf("CVE FIXED!!!\n"); | 44 | + printf("%d\n", str_len(string2)); |
43 | + | 45 | + printf("CVE FIXED!!!\n"); |
44 | + return 0; | 46 | + |
45 | + } | 47 | + return 0; |
46 | +-- | 48 | +} |
47 | +2.41.0 | ||
48 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
49 | index 547587bef4..76975a6729 100644 | 50 | index 2dc352d479e..d937759f157 100644 |
50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
52 | @@ -3,7 +3,9 @@ SECTION = "examples" | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -55,18 +56,11 @@ index 547587bef4..76975a6729 100644 | |||
55 | 56 | ||
56 | -SRC_URI = "file://helloworld.c" | 57 | -SRC_URI = "file://helloworld.c" |
57 | +SRC_URI = "file://helloworld.c \ | 58 | +SRC_URI = "file://helloworld.c \ |
58 | + file://CVE-1234-56789.patch \ | 59 | + file://0001-Fix-CVE-1234-56789.patch \ |
59 | + " | 60 | + " |
60 | |||
61 | S = "${WORKDIR}" | ||
62 | |||
63 | @@ -16,4 +18,4 @@ do_install() { | ||
64 | install -m 0755 helloworld ${D}${bindir} | ||
65 | } | ||
66 | 61 | ||
67 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
68 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
69 | +BBCLASSEXTEND = "native nativesdk" | ||
70 | -- | 64 | -- |
71 | 2.41.0 | 65 | 2.45.1 |
72 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail index 3574463ade..dccafcd9bc 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.fail | |||
@@ -1,30 +1,25 @@ | |||
1 | From c4ca86b9cca3643097db0328e2f34dccffbba309 Mon Sep 17 00:00:00 2001 | 1 | From 60450eefbc2c438a37c5e08759d021b18f0df0a3 Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?Simone=20Wei=C3=9F?= <simone.p.weiss@posteo.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Sat, 10 Feb 2024 13:18:44 +0100 | 3 | Date: Fri, 31 May 2024 09:18:17 -0400 |
4 | Subject: [PATCH] selftest-hello: add CVE_CHECK_IGNORE | 4 | Subject: [PATCH] selftest-hello: add CVE_CHECK_IGNORE |
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | 5 | ||
9 | This should fail the test_cve_tag_format selftest. | 6 | This should fail the test_cve_tag_format selftest. |
10 | 7 | ||
11 | Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
12 | --- | 9 | --- |
13 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 3 ++- | 10 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 1 + |
14 | 1 file changed, 2 insertions(+), 1 deletion(-) | 11 | 1 file changed, 1 insertion(+) |
15 | 12 | ||
16 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 13 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
17 | index 547587bef4..3ef9b87c34 100644 | 14 | index 2dc352d479e..cc103de6e2e 100644 |
18 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
20 | @@ -16,4 +16,5 @@ do_install() { | 17 | @@ -17,4 +17,5 @@ do_install() { |
21 | install -m 0755 helloworld ${D}${bindir} | 18 | install -m 0755 helloworld ${D}${bindir} |
22 | } | 19 | } |
23 | 20 | ||
24 | -BBCLASSEXTEND = "native nativesdk" | ||
25 | \ No newline at end of file | ||
26 | +CVE_CHECK_IGNORE = "CVE-2024-12345" | 21 | +CVE_CHECK_IGNORE = "CVE-2024-12345" |
27 | +BBCLASSEXTEND = "native nativesdk" | 22 | BBCLASSEXTEND = "native nativesdk" |
28 | -- | 23 | -- |
29 | 2.39.2 | 24 | 2.45.1 |
30 | 25 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass index 10f942a6eb..93a6cc91fb 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_cve_check_ignore.pass | |||
@@ -1,31 +1,25 @@ | |||
1 | From 7d4d3fee0c7111830ee9b2b049ae3ce265b26030 Mon Sep 17 00:00:00 2001 | 1 | From f91073242268d2b2c1a1a705e7fd585679f78a59 Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?Simone=20Wei=C3=9F?= <simone.p.weiss@posteo.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Sat, 10 Feb 2024 13:23:56 +0100 | 3 | Date: Fri, 31 May 2024 09:18:17 -0400 |
4 | Subject: [PATCH] selftest-hello: add CVE_STATUS | 4 | Subject: [PATCH] selftest-hello: add CVE_STATUS |
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | 5 | ||
9 | This should pass the test_cve_tag_format selftest. | 6 | This should pass the test_cve_tag_format selftest. |
10 | 7 | ||
11 | Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
12 | --- | 9 | --- |
13 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +++- | 10 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 1 + |
14 | 1 file changed, 3 insertions(+), 1 deletion(-) | 11 | 1 file changed, 1 insertion(+) |
15 | 12 | ||
16 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 13 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
17 | index 547587bef4..9908b3b417 100644 | 14 | index 2dc352d479e..88c5c98608f 100644 |
18 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
20 | @@ -16,4 +16,6 @@ do_install() { | 17 | @@ -17,4 +17,5 @@ do_install() { |
21 | install -m 0755 helloworld ${D}${bindir} | 18 | install -m 0755 helloworld ${D}${bindir} |
22 | } | 19 | } |
23 | 20 | ||
24 | -BBCLASSEXTEND = "native nativesdk" | ||
25 | \ No newline at end of file | ||
26 | +CVE_STATUS[CVE-2024-12345] = "not-applicable-platform: Issue only applies on Windows" | 21 | +CVE_STATUS[CVE-2024-12345] = "not-applicable-platform: Issue only applies on Windows" |
27 | + | 22 | BBCLASSEXTEND = "native nativesdk" |
28 | +BBCLASSEXTEND = "native nativesdk" | ||
29 | -- | 23 | -- |
30 | 2.39.2 | 24 | 2.45.1 |
31 | 25 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail index ab6c52c374..61b3784e3c 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.fail | |||
@@ -1,19 +1,17 @@ | |||
1 | From f89919ea86d38404dd621521680a0162367bb965 Mon Sep 17 00:00:00 2001 | 1 | From 974c3a143bc67faaff9abcc0a06a3d5e692fc660 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Wed, 6 Sep 2023 09:09:27 -0400 | 3 | Date: Fri, 31 May 2024 11:51:15 -0400 |
4 | Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM | 4 | Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM |
5 | 5 | ||
6 | This test should fail the | 6 | This should fail the test_lic_files_chksum_modified_not_mentioned test. |
7 | test_metadata_lic_files_chksum.LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned | ||
8 | test. | ||
9 | 7 | ||
10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
11 | --- | 9 | --- |
12 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 ++-- | 10 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 +- |
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
14 | 12 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 13 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
16 | index 547587bef4..65dda40aba 100644 | 14 | index 2dc352d479e..356921db1dd 100644 |
17 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
19 | @@ -1,7 +1,7 @@ | 17 | @@ -1,7 +1,7 @@ |
@@ -25,13 +23,6 @@ index 547587bef4..65dda40aba 100644 | |||
25 | 23 | ||
26 | SRC_URI = "file://helloworld.c" | 24 | SRC_URI = "file://helloworld.c" |
27 | 25 | ||
28 | @@ -16,4 +16,4 @@ do_install() { | ||
29 | install -m 0755 helloworld ${D}${bindir} | ||
30 | } | ||
31 | |||
32 | -BBCLASSEXTEND = "native nativesdk" | ||
33 | \ No newline at end of file | ||
34 | +BBCLASSEXTEND = "native nativesdk" | ||
35 | -- | 26 | -- |
36 | 2.41.0 | 27 | 2.45.1 |
37 | 28 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass index 99d9f144da..b7be1e8e55 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_modified_not_mentioned.pass | |||
@@ -1,21 +1,19 @@ | |||
1 | From f89919ea86d38404dd621521680a0162367bb965 Mon Sep 17 00:00:00 2001 | 1 | From 974c3a143bc67faaff9abcc0a06a3d5e692fc660 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Wed, 6 Sep 2023 09:09:27 -0400 | 3 | Date: Fri, 31 May 2024 11:51:15 -0400 |
4 | Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM | 4 | Subject: [PATCH] selftest-hello: update LIC_FILES_CHKSUM |
5 | 5 | ||
6 | License-Update: Fix checksum | 6 | This should pass the test_lic_files_chksum_modified_not_mentioned test. |
7 | 7 | ||
8 | This test should pass the | 8 | License-Update: Stuff happened! |
9 | test_metadata_lic_files_chksum.LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned | ||
10 | test. | ||
11 | 9 | ||
12 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
13 | --- | 11 | --- |
14 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 ++-- | 12 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 +- |
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
16 | 14 | ||
17 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 15 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
18 | index 547587bef4..65dda40aba 100644 | 16 | index 2dc352d479e..356921db1dd 100644 |
19 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 17 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
20 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
21 | @@ -1,7 +1,7 @@ | 19 | @@ -1,7 +1,7 @@ |
@@ -27,13 +25,6 @@ index 547587bef4..65dda40aba 100644 | |||
27 | 25 | ||
28 | SRC_URI = "file://helloworld.c" | 26 | SRC_URI = "file://helloworld.c" |
29 | 27 | ||
30 | @@ -16,4 +16,4 @@ do_install() { | ||
31 | install -m 0755 helloworld ${D}${bindir} | ||
32 | } | ||
33 | |||
34 | -BBCLASSEXTEND = "native nativesdk" | ||
35 | \ No newline at end of file | ||
36 | +BBCLASSEXTEND = "native nativesdk" | ||
37 | -- | 28 | -- |
38 | 2.41.0 | 29 | 2.45.1 |
39 | 30 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail index e14d644bb2..a7a0b0bacb 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.fail | |||
@@ -1,53 +1,42 @@ | |||
1 | From 66430e7c6fbd5187b66560909a510e136fed91c0 Mon Sep 17 00:00:00 2001 | 1 | From 74bc209a4fbe4da2f57e153ccfff3d2241dada8d Mon Sep 17 00:00:00 2001 |
2 | From: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Thu, 23 Feb 2017 10:34:27 -0600 | 3 | Date: Fri, 31 May 2024 11:03:47 -0400 |
4 | Subject: [PATCH] meta: adding hello-yocto recipe | 4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra |
5 | 5 | ||
6 | This is a sample recipe | 6 | This should fail the test_lic_files_chksum_presence test. |
7 | 7 | ||
8 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
10 | .../hello-world/hello-world/hello_world.c | 5 +++++ | 10 | .../selftest-hello-extra_1.0.bb | 20 +++++++++++++++++++ |
11 | .../hello-world/hello-world_1.0.bb | 18 ++++++++++++++++++ | 11 | 1 file changed, 20 insertions(+) |
12 | 2 files changed, 23 insertions(+) | 12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
13 | create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
14 | create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
15 | 13 | ||
16 | diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | 14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
17 | new file mode 100644 | 15 | new file mode 100644 |
18 | index 0000000000..0d59f57d4c | 16 | index 00000000000..875bcbef859 |
19 | --- /dev/null | 17 | --- /dev/null |
20 | +++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | 18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
21 | @@ -0,0 +1,5 @@ | 19 | @@ -0,0 +1,20 @@ |
22 | +#include <stdio.h> | 20 | +SUMMARY = "This is an example summary" |
23 | + | 21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" |
24 | +int main(){ | 22 | +SECTION = "examples" |
25 | + printf("Hello World\n"); | ||
26 | +} | ||
27 | diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
28 | new file mode 100644 | ||
29 | index 0000000000..3c990c108a | ||
30 | --- /dev/null | ||
31 | +++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
32 | @@ -0,0 +1,18 @@ | ||
33 | +SUMMARY = "This is a sample summary" | ||
34 | +DESCRIPTION = "This is a sample description" | ||
35 | +HOMEPAGE = "https://sample.com/this-is-a-sample" | ||
36 | +LICENSE = "MIT" | 23 | +LICENSE = "MIT" |
37 | + | 24 | + |
38 | +SRC_URI += "file://hello_world.c" | 25 | +SRC_URI = "file://helloworld.c" |
39 | + | 26 | + |
40 | +SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" | 27 | +S = "${WORKDIR}/sources" |
41 | +SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" | 28 | +UNPACKDIR = "${S}" |
42 | + | 29 | + |
43 | +do_compile(){ | 30 | +do_compile() { |
44 | + ${CC} -o hello_world ../hello_world.c | 31 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld |
45 | +} | 32 | +} |
46 | + | 33 | + |
47 | +do_install(){ | 34 | +do_install() { |
48 | + install -d ${D}${bindir} | 35 | + install -d ${D}${bindir} |
49 | + install -m +x hello_world ${D}${bindir}/hello_world | 36 | + install -m 0755 helloworld ${D}${bindir} |
50 | +} | 37 | +} |
38 | + | ||
39 | +BBCLASSEXTEND = "native nativesdk" | ||
51 | -- | 40 | -- |
52 | 2.41.0 | 41 | 2.45.1 |
53 | 42 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass index b8da16dfe5..8ffa97ec56 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_lic_files_chksum_presence.pass | |||
@@ -1,54 +1,43 @@ | |||
1 | From 5144d2ba1aa763312c047dd5f8901368cff79da6 Mon Sep 17 00:00:00 2001 | 1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 |
2 | From: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Thu, 23 Feb 2017 10:34:27 -0600 | 3 | Date: Fri, 31 May 2024 11:03:47 -0400 |
4 | Subject: [PATCH] meta: adding hello-yocto recipe | 4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra |
5 | 5 | ||
6 | This is a sample recipe | 6 | This should pass the test_lic_files_chksum_presence test. |
7 | 7 | ||
8 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
10 | .../hello-world/hello-world/hello_world.c | 5 +++++ | 10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ |
11 | .../hello-world/hello-world_1.0.bb | 19 +++++++++++++++++++ | 11 | 1 file changed, 21 insertions(+) |
12 | 2 files changed, 24 insertions(+) | 12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
13 | create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
14 | create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
15 | 13 | ||
16 | diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | 14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
17 | new file mode 100644 | 15 | new file mode 100644 |
18 | index 0000000000..0d59f57d4c | 16 | index 00000000000..f3dec1b220c |
19 | --- /dev/null | 17 | --- /dev/null |
20 | +++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | 18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
21 | @@ -0,0 +1,5 @@ | 19 | @@ -0,0 +1,21 @@ |
22 | +#include <stdio.h> | 20 | +SUMMARY = "This is an example summary" |
23 | + | 21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" |
24 | +int main(){ | 22 | +SECTION = "examples" |
25 | + printf("Hello World\n"); | ||
26 | +} | ||
27 | diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
28 | new file mode 100644 | ||
29 | index 0000000000..44d888c82a | ||
30 | --- /dev/null | ||
31 | +++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
32 | @@ -0,0 +1,19 @@ | ||
33 | +SUMMARY = "This is a sample summary" | ||
34 | +DESCRIPTION = "This is a sample description" | ||
35 | +HOMEPAGE = "https://sample.com/this-is-a-sample" | ||
36 | +LICENSE = "MIT" | 23 | +LICENSE = "MIT" |
37 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | 24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
38 | + | 25 | + |
39 | +SRC_URI += "file://hello_world.c" | 26 | +SRC_URI = "file://helloworld.c" |
40 | + | 27 | + |
41 | +SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" | 28 | +S = "${WORKDIR}/sources" |
42 | +SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" | 29 | +UNPACKDIR = "${S}" |
43 | + | 30 | + |
44 | +do_compile(){ | 31 | +do_compile() { |
45 | + ${CC} -o hello_world ../hello_world.c | 32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld |
46 | +} | 33 | +} |
47 | + | 34 | + |
48 | +do_install(){ | 35 | +do_install() { |
49 | + install -d ${D}${bindir} | 36 | + install -d ${D}${bindir} |
50 | + install -m +x hello_world ${D}${bindir}/hello_world | 37 | + install -m 0755 helloworld ${D}${bindir} |
51 | +} | 38 | +} |
39 | + | ||
40 | +BBCLASSEXTEND = "native nativesdk" | ||
52 | -- | 41 | -- |
53 | 2.41.0 | 42 | 2.45.1 |
54 | 43 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail index 983b6e0c2b..0a402d0a3e 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.fail | |||
@@ -1,17 +1,17 @@ | |||
1 | From 4ab06b5f81455249cd5e89d2cce9863803b5ecb5 Mon Sep 17 00:00:00 2001 | 1 | From f2f7b6bcb831289bc3ba2343ad7dc5bee6d6e0cd Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Fri, 8 Sep 2023 14:41:00 -0400 | 3 | Date: Fri, 31 May 2024 08:45:41 -0400 |
4 | Subject: [PATCH] selftest-hello: remove helloworld.c | 4 | Subject: [PATCH] selftest-hello: remove helloworld.c |
5 | 5 | ||
6 | This should fail the test_src_uri_left_files selftest. | 6 | This should fail the test_src_uri_left_files selftest. |
7 | 7 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
10 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +--- | 10 | meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 -- |
11 | 1 file changed, 1 insertion(+), 3 deletions(-) | 11 | 1 file changed, 2 deletions(-) |
12 | 12 | ||
13 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 13 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
14 | index 547587bef4..f6817f05bc 100644 | 14 | index 2dc352d479e..e95270adaeb 100644 |
15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 15 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 16 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
17 | @@ -3,8 +3,6 @@ SECTION = "examples" | 17 | @@ -3,8 +3,6 @@ SECTION = "examples" |
@@ -20,16 +20,9 @@ index 547587bef4..f6817f05bc 100644 | |||
20 | 20 | ||
21 | -SRC_URI = "file://helloworld.c" | 21 | -SRC_URI = "file://helloworld.c" |
22 | - | 22 | - |
23 | S = "${WORKDIR}" | 23 | S = "${WORKDIR}/sources" |
24 | UNPACKDIR = "${S}" | ||
24 | 25 | ||
25 | do_compile() { | ||
26 | @@ -16,4 +14,4 @@ do_install() { | ||
27 | install -m 0755 helloworld ${D}${bindir} | ||
28 | } | ||
29 | |||
30 | -BBCLASSEXTEND = "native nativesdk" | ||
31 | \ No newline at end of file | ||
32 | +BBCLASSEXTEND = "native nativesdk" | ||
33 | -- | 26 | -- |
34 | 2.41.0 | 27 | 2.45.1 |
35 | 28 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass index 1f1a77e581..a675c028d0 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_src_uri_left_files.pass | |||
@@ -1,6 +1,6 @@ | |||
1 | From 6c7ac367a873bf827c19b81085c943eace917a99 Mon Sep 17 00:00:00 2001 | 1 | From e79933e2fc68570066eca66f0b599d259b7a1731 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Fri, 8 Sep 2023 14:41:00 -0400 | 3 | Date: Fri, 31 May 2024 08:18:48 -0400 |
4 | Subject: [PATCH] selftest-hello: remove helloworld.c | 4 | Subject: [PATCH] selftest-hello: remove helloworld.c |
5 | 5 | ||
6 | This should pass the test_src_uri_left_files selftest. | 6 | This should pass the test_src_uri_left_files selftest. |
@@ -8,13 +8,13 @@ This should pass the test_src_uri_left_files selftest. | |||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
10 | .../recipes-test/selftest-hello/files/helloworld.c | 8 -------- | 10 | .../recipes-test/selftest-hello/files/helloworld.c | 8 -------- |
11 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 4 +--- | 11 | .../recipes-test/selftest-hello/selftest-hello_1.0.bb | 2 -- |
12 | 2 files changed, 1 insertion(+), 11 deletions(-) | 12 | 2 files changed, 10 deletions(-) |
13 | delete mode 100644 meta-selftest/recipes-test/selftest-hello/files/helloworld.c | 13 | delete mode 100644 meta-selftest/recipes-test/selftest-hello/files/helloworld.c |
14 | 14 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c | 15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c |
16 | deleted file mode 100644 | 16 | deleted file mode 100644 |
17 | index fc7169b7b8..0000000000 | 17 | index fc7169b7b83..00000000000 |
18 | --- a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c | 18 | --- a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c |
19 | +++ /dev/null | 19 | +++ /dev/null |
20 | @@ -1,8 +0,0 @@ | 20 | @@ -1,8 +0,0 @@ |
@@ -27,7 +27,7 @@ index fc7169b7b8..0000000000 | |||
27 | - return 0; | 27 | - return 0; |
28 | -} | 28 | -} |
29 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 29 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
30 | index 547587bef4..f6817f05bc 100644 | 30 | index 2dc352d479e..e95270adaeb 100644 |
31 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 31 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
32 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 32 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
33 | @@ -3,8 +3,6 @@ SECTION = "examples" | 33 | @@ -3,8 +3,6 @@ SECTION = "examples" |
@@ -36,16 +36,9 @@ index 547587bef4..f6817f05bc 100644 | |||
36 | 36 | ||
37 | -SRC_URI = "file://helloworld.c" | 37 | -SRC_URI = "file://helloworld.c" |
38 | - | 38 | - |
39 | S = "${WORKDIR}" | 39 | S = "${WORKDIR}/sources" |
40 | UNPACKDIR = "${S}" | ||
40 | 41 | ||
41 | do_compile() { | ||
42 | @@ -16,4 +14,4 @@ do_install() { | ||
43 | install -m 0755 helloworld ${D}${bindir} | ||
44 | } | ||
45 | |||
46 | -BBCLASSEXTEND = "native nativesdk" | ||
47 | \ No newline at end of file | ||
48 | +BBCLASSEXTEND = "native nativesdk" | ||
49 | -- | 42 | -- |
50 | 2.41.0 | 43 | 2.45.1 |
51 | 44 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail index 2d2b4e683d..1087843619 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.fail | |||
@@ -1,46 +1,42 @@ | |||
1 | From e29da5faa74409be394caa09d9f3b7b60f8592b9 Mon Sep 17 00:00:00 2001 | 1 | From f4b72cc24f5e2a290a8637775c4d41c16d5d83aa Mon Sep 17 00:00:00 2001 |
2 | From: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Thu, 23 Feb 2017 10:34:27 -0600 | 3 | Date: Fri, 31 May 2024 11:03:47 -0400 |
4 | Subject: [PATCH] meta: adding hello-yocto recipe | 4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra |
5 | 5 | ||
6 | This is a sample recipe | 6 | This should fail the test_summary_presence test. |
7 | 7 | ||
8 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
10 | meta/recipes-devtools/hello-world/hello-world/hello_world.c | 5 +++++ | 10 | .../selftest-hello-extra_1.0.bb | 20 +++++++++++++++++++ |
11 | meta/recipes-devtools/hello-world/hello-world_1.0.bb | 12 ++++++++++++ | 11 | 1 file changed, 20 insertions(+) |
12 | 2 files changed, 17 insertions(+) | 12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
13 | create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
14 | create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
15 | 13 | ||
16 | diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | 14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
17 | new file mode 100644 | 15 | new file mode 100644 |
18 | index 0000000000..0d59f57d4c | 16 | index 00000000000..2dc352d479e |
19 | --- /dev/null | 17 | --- /dev/null |
20 | +++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | 18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
21 | @@ -0,0 +1,5 @@ | 19 | @@ -0,0 +1,20 @@ |
22 | +#include <stdio.h> | 20 | +DESCRIPTION = "Simple helloworld application -- selftest variant" |
21 | +SECTION = "examples" | ||
22 | +LICENSE = "MIT" | ||
23 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
23 | + | 24 | + |
24 | +int main(){ | 25 | +SRC_URI = "file://helloworld.c" |
25 | + printf("Hello World\n"); | ||
26 | +} | ||
27 | diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
28 | new file mode 100644 | ||
29 | index 0000000000..c4e1359217 | ||
30 | --- /dev/null | ||
31 | +++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
32 | @@ -0,0 +1,12 @@ | ||
33 | +LICENSE = "CLOSED" | ||
34 | + | 26 | + |
35 | +SRC_URI += "file://hello_world.c" | 27 | +S = "${WORKDIR}/sources" |
28 | +UNPACKDIR = "${S}" | ||
36 | + | 29 | + |
37 | +do_compile(){ | 30 | +do_compile() { |
38 | + ${CC} -o hello_world ../hello_world.c | 31 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld |
39 | +} | 32 | +} |
40 | + | 33 | + |
41 | +do_install(){ | 34 | +do_install() { |
42 | + install -d ${D}${bindir} | 35 | + install -d ${D}${bindir} |
43 | + install -m +x hello_world ${D}${bindir}/hello_world | 36 | + install -m 0755 helloworld ${D}${bindir} |
44 | +} | 37 | +} |
45 | -- | 38 | + |
46 | 2.11.0 | 39 | +BBCLASSEXTEND = "native nativesdk" |
40 | -- | ||
41 | 2.45.1 | ||
42 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass index 55f0309b3f..3d35a8d8fb 100644 --- a/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass +++ b/meta/lib/patchtest/selftest/files/TestMetadata.test_summary_presence.pass | |||
@@ -1,49 +1,43 @@ | |||
1 | From 0cd2fed12ce4b7b071edde12aec4481ad7a6f107 Mon Sep 17 00:00:00 2001 | 1 | From 04eb94a0134ef5eb5b5fd783b303104fbfcd8437 Mon Sep 17 00:00:00 2001 |
2 | From: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Thu, 23 Feb 2017 10:34:27 -0600 | 3 | Date: Fri, 31 May 2024 11:03:47 -0400 |
4 | Subject: [PATCH] meta: adding hello-yocto recipe | 4 | Subject: [PATCH] selftest-hello: add selftest-hello-extra |
5 | 5 | ||
6 | This is a sample recipe | 6 | This should pass the test_summary_presence test. |
7 | 7 | ||
8 | Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com> | 8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 9 | --- |
10 | .../hello-world/hello-world/hello_world.c | 5 +++++ | 10 | .../selftest-hello-extra_1.0.bb | 21 +++++++++++++++++++ |
11 | meta/recipes-devtools/hello-world/hello-world_1.0.bb | 15 +++++++++++++++ | 11 | 1 file changed, 21 insertions(+) |
12 | 2 files changed, 20 insertions(+) | 12 | create mode 100644 meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
13 | create mode 100644 meta/recipes-devtools/hello-world/hello-world/hello_world.c | ||
14 | create mode 100644 meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
15 | 13 | ||
16 | diff --git a/meta/recipes-devtools/hello-world/hello-world/hello_world.c b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | 14 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
17 | new file mode 100644 | 15 | new file mode 100644 |
18 | index 0000000000..0d59f57d4c | 16 | index 00000000000..f3dec1b220c |
19 | --- /dev/null | 17 | --- /dev/null |
20 | +++ b/meta/recipes-devtools/hello-world/hello-world/hello_world.c | 18 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello-extra_1.0.bb |
21 | @@ -0,0 +1,5 @@ | 19 | @@ -0,0 +1,21 @@ |
22 | +#include <stdio.h> | 20 | +SUMMARY = "This is an example summary" |
21 | +DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
22 | +SECTION = "examples" | ||
23 | +LICENSE = "MIT" | ||
24 | +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
23 | + | 25 | + |
24 | +int main(){ | 26 | +SRC_URI = "file://helloworld.c" |
25 | + printf("Hello World\n"); | ||
26 | +} | ||
27 | diff --git a/meta/recipes-devtools/hello-world/hello-world_1.0.bb b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
28 | new file mode 100644 | ||
29 | index 0000000000..c54283eece | ||
30 | --- /dev/null | ||
31 | +++ b/meta/recipes-devtools/hello-world/hello-world_1.0.bb | ||
32 | @@ -0,0 +1,15 @@ | ||
33 | +SUMMARY = "This is a sample summary" | ||
34 | +DESCRIPTION = "This is a sample description" | ||
35 | +HOMEPAGE = "https://sample.com/this-is-a-sample" | ||
36 | +LICENSE = "CLOSED" | ||
37 | + | 27 | + |
38 | +SRC_URI += "file://hello_world.c" | 28 | +S = "${WORKDIR}/sources" |
29 | +UNPACKDIR = "${S}" | ||
39 | + | 30 | + |
40 | +do_compile(){ | 31 | +do_compile() { |
41 | + ${CC} -o hello_world ../hello_world.c | 32 | + ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld |
42 | +} | 33 | +} |
43 | + | 34 | + |
44 | +do_install(){ | 35 | +do_install() { |
45 | + install -d ${D}${bindir} | 36 | + install -d ${D}${bindir} |
46 | + install -m +x hello_world ${D}${bindir}/hello_world | 37 | + install -m 0755 helloworld ${D}${bindir} |
47 | +} | 38 | +} |
48 | -- | 39 | + |
49 | 2.11.0 | 40 | +BBCLASSEXTEND = "native nativesdk" |
41 | -- | ||
42 | 2.45.1 | ||
43 | |||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail index c763a7506e..f64f2a40b0 100644 --- a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.fail | |||
@@ -1,29 +1,31 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | CVE: CVE-BAD-FORMAT | 6 | This should fail the test_cve_tag_format test. |
7 | |||
8 | CVE: CVE-1234-56789 | ||
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..9219b8db62 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,27 @@ | 22 | @@ -0,0 +1,26 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
24 | +Subject: [PATCH] Fix CVE-NOT-REAL | 26 | +Subject: [PATCH] Fix CVE-NOT-REAL |
25 | + | 27 | + |
26 | +CVE: CVE-BAD-FORMAT | 28 | +CVE: CVE-BAD_FORMAT |
27 | +Upstream-Status: Backport(http://example.com/example) | 29 | +Upstream-Status: Backport(http://example.com/example) |
28 | + | 30 | + |
29 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 31 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62 | |||
35 | +index 1788f38..83d7918 100644 | 37 | +index 1788f38..83d7918 100644 |
36 | +--- a/strlen.c | 38 | +--- a/strlen.c |
37 | ++++ b/strlen.c | 39 | ++++ b/strlen.c |
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | 40 | + |
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
50 | index 547587bef4..76975a6729 100644 | 50 | index 2dc352d479e..d937759f157 100644 |
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644 | |||
56 | 56 | ||
57 | -SRC_URI = "file://helloworld.c" | 57 | -SRC_URI = "file://helloworld.c" |
58 | +SRC_URI = "file://helloworld.c \ | 58 | +SRC_URI = "file://helloworld.c \ |
59 | + file://CVE-1234-56789.patch \ | 59 | + file://0001-Fix-CVE-1234-56789.patch \ |
60 | + " | 60 | + " |
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | 61 | ||
68 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
69 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | 64 | -- |
72 | 2.41.0 | 65 | 2.45.1 |
73 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass index ef6017037c..3819487041 100644 --- a/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_cve_tag_format.pass | |||
@@ -1,23 +1,25 @@ | |||
1 | From 35ccee3cee96fb29514475279248078d88907231 Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This should pass the test_cve_tag format test. | ||
7 | |||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../files/0001-Fix-CVE-1234-56789.patch | 27 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..9219b8db62 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,27 @@ | 22 | @@ -0,0 +1,26 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -35,19 +37,17 @@ index 0000000000..9219b8db62 | |||
35 | +index 1788f38..83d7918 100644 | 37 | +index 1788f38..83d7918 100644 |
36 | +--- a/strlen.c | 38 | +--- a/strlen.c |
37 | ++++ b/strlen.c | 39 | ++++ b/strlen.c |
38 | +@@ -8,6 +8,7 @@ int main() { | ||
39 | + | ||
40 | + printf("%d\n", str_len(string1)); | ||
41 | + printf("%d\n", str_len(string2)); | ||
42 | ++ printf("CVE FIXED!!!\n"); | ||
43 | + | ||
44 | + return 0; | ||
45 | + } | ||
46 | +-- | ||
47 | +2.41.0 | ||
48 | + | 40 | + |
41 | +int main() { | ||
42 | + | ||
43 | + printf("%d\n", str_len(string1)); | ||
44 | + printf("%d\n", str_len(string2)); | ||
45 | + printf("CVE FIXED!!!\n"); | ||
46 | + | ||
47 | + return 0; | ||
48 | +} | ||
49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
50 | index 547587bef4..76975a6729 100644 | 50 | index 2dc352d479e..d937759f157 100644 |
51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
53 | @@ -3,7 +3,9 @@ SECTION = "examples" | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -56,18 +56,11 @@ index 547587bef4..76975a6729 100644 | |||
56 | 56 | ||
57 | -SRC_URI = "file://helloworld.c" | 57 | -SRC_URI = "file://helloworld.c" |
58 | +SRC_URI = "file://helloworld.c \ | 58 | +SRC_URI = "file://helloworld.c \ |
59 | + file://CVE-1234-56789.patch \ | 59 | + file://0001-Fix-CVE-1234-56789.patch \ |
60 | + " | 60 | + " |
61 | |||
62 | S = "${WORKDIR}" | ||
63 | |||
64 | @@ -16,4 +18,4 @@ do_install() { | ||
65 | install -m 0755 helloworld ${D}${bindir} | ||
66 | } | ||
67 | 61 | ||
68 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
69 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
70 | +BBCLASSEXTEND = "native nativesdk" | ||
71 | -- | 64 | -- |
72 | 2.41.0 | 65 | 2.45.1 |
73 | 66 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail index ce8bf7b7d1..b2d0fab9e3 100644 --- a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.fail | |||
@@ -1,23 +1,25 @@ | |||
1 | From 5a2d0ac780a0f4c046fb1a3c3463d3e726f191cb Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This should fail the test_signed_off_by_presence test. | ||
7 | |||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../selftest-hello/files/CVE-1234-56789.patch | 26 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 25 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 30 insertions(+), 2 deletions(-) | 14 | 2 files changed, 28 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..92a5b65a53 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,26 @@ | 22 | @@ -0,0 +1,25 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -34,18 +36,17 @@ index 0000000000..92a5b65a53 | |||
34 | +index 1788f38..83d7918 100644 | 36 | +index 1788f38..83d7918 100644 |
35 | +--- a/strlen.c | 37 | +--- a/strlen.c |
36 | ++++ b/strlen.c | 38 | ++++ b/strlen.c |
37 | +@@ -8,6 +8,7 @@ int main() { | 39 | + |
38 | + | 40 | +int main() { |
39 | + printf("%d\n", str_len(string1)); | 41 | + |
40 | + printf("%d\n", str_len(string2)); | 42 | + printf("%d\n", str_len(string1)); |
41 | ++ printf("CVE FIXED!!!\n"); | 43 | + printf("%d\n", str_len(string2)); |
42 | + | 44 | + printf("CVE FIXED!!!\n"); |
43 | + return 0; | 45 | + |
44 | + } | 46 | + return 0; |
45 | +-- | 47 | +} |
46 | +2.41.0 | ||
47 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 48 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
48 | index 547587bef4..76975a6729 100644 | 49 | index 2dc352d479e..d937759f157 100644 |
49 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
50 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
51 | @@ -3,7 +3,9 @@ SECTION = "examples" | 52 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -54,18 +55,11 @@ index 547587bef4..76975a6729 100644 | |||
54 | 55 | ||
55 | -SRC_URI = "file://helloworld.c" | 56 | -SRC_URI = "file://helloworld.c" |
56 | +SRC_URI = "file://helloworld.c \ | 57 | +SRC_URI = "file://helloworld.c \ |
57 | + file://CVE-1234-56789.patch \ | 58 | + file://0001-Fix-CVE-1234-56789.patch \ |
58 | + " | 59 | + " |
59 | |||
60 | S = "${WORKDIR}" | ||
61 | |||
62 | @@ -16,4 +18,4 @@ do_install() { | ||
63 | install -m 0755 helloworld ${D}${bindir} | ||
64 | } | ||
65 | 60 | ||
66 | -BBCLASSEXTEND = "native nativesdk" | 61 | S = "${WORKDIR}/sources" |
67 | \ No newline at end of file | 62 | UNPACKDIR = "${S}" |
68 | +BBCLASSEXTEND = "native nativesdk" | ||
69 | -- | 63 | -- |
70 | 2.41.0 | 64 | 2.45.1 |
71 | 65 | ||
diff --git a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass index ea34c76f0d..2661c1416f 100644 --- a/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass +++ b/meta/lib/patchtest/selftest/files/TestPatch.test_signed_off_by_presence.pass | |||
@@ -1,23 +1,25 @@ | |||
1 | From 14d72f6973270f78455a8628143f2cff90e8f41e Mon Sep 17 00:00:00 2001 | 1 | From c9519f11502d5bb5c143ed43b4c981b6a211bdf9 Mon Sep 17 00:00:00 2001 |
2 | From: Trevor Gamblin <tgamblin@baylibre.com> | 2 | From: Trevor Gamblin <tgamblin@baylibre.com> |
3 | Date: Tue, 29 Aug 2023 14:12:27 -0400 | 3 | Date: Fri, 31 May 2024 09:54:50 -0400 |
4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 | 4 | Subject: [PATCH] selftest-hello: fix CVE-1234-56789 |
5 | 5 | ||
6 | This should pass the test_signed_off_by_presence test. | ||
7 | |||
6 | CVE: CVE-1234-56789 | 8 | CVE: CVE-1234-56789 |
7 | 9 | ||
8 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | 10 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
9 | --- | 11 | --- |
10 | .../selftest-hello/files/CVE-1234-56789.patch | 27 +++++++++++++++++++ | 12 | .../files/0001-Fix-CVE-1234-56789.patch | 26 +++++++++++++++++++ |
11 | .../selftest-hello/selftest-hello_1.0.bb | 6 +++-- | 13 | .../selftest-hello/selftest-hello_1.0.bb | 4 ++- |
12 | 2 files changed, 31 insertions(+), 2 deletions(-) | 14 | 2 files changed, 29 insertions(+), 1 deletion(-) |
13 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 15 | create mode 100644 meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
14 | 16 | ||
15 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 17 | diff --git a/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
16 | new file mode 100644 | 18 | new file mode 100644 |
17 | index 0000000000..869cfb6fe5 | 19 | index 00000000000..8a4f9329303 |
18 | --- /dev/null | 20 | --- /dev/null |
19 | +++ b/meta-selftest/recipes-test/selftest-hello/files/CVE-1234-56789.patch | 21 | +++ b/meta-selftest/recipes-test/selftest-hello/files/0001-Fix-CVE-1234-56789.patch |
20 | @@ -0,0 +1,27 @@ | 22 | @@ -0,0 +1,26 @@ |
21 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 | 23 | +From b26a31186e6ee2eb1f506d5f2f9394d327a0df2f Mon Sep 17 00:00:00 2001 |
22 | +From: Trevor Gamblin <tgamblin@baylibre.com> | 24 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
23 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 | 25 | +Date: Tue, 29 Aug 2023 14:08:20 -0400 |
@@ -35,18 +37,17 @@ index 0000000000..869cfb6fe5 | |||
35 | +index 1788f38..83d7918 100644 | 37 | +index 1788f38..83d7918 100644 |
36 | +--- a/strlen.c | 38 | +--- a/strlen.c |
37 | ++++ b/strlen.c | 39 | ++++ b/strlen.c |
38 | +@@ -8,6 +8,7 @@ int main() { | 40 | + |
39 | + | 41 | +int main() { |
40 | + printf("%d\n", str_len(string1)); | 42 | + |
41 | + printf("%d\n", str_len(string2)); | 43 | + printf("%d\n", str_len(string1)); |
42 | ++ printf("CVE FIXED!!!\n"); | 44 | + printf("%d\n", str_len(string2)); |
43 | + | 45 | + printf("CVE FIXED!!!\n"); |
44 | + return 0; | 46 | + |
45 | + } | 47 | + return 0; |
46 | +-- | 48 | +} |
47 | +2.41.0 | ||
48 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 49 | diff --git a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
49 | index 547587bef4..76975a6729 100644 | 50 | index 2dc352d479e..d937759f157 100644 |
50 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 51 | --- a/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
51 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | 52 | +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb |
52 | @@ -3,7 +3,9 @@ SECTION = "examples" | 53 | @@ -3,7 +3,9 @@ SECTION = "examples" |
@@ -55,18 +56,11 @@ index 547587bef4..76975a6729 100644 | |||
55 | 56 | ||
56 | -SRC_URI = "file://helloworld.c" | 57 | -SRC_URI = "file://helloworld.c" |
57 | +SRC_URI = "file://helloworld.c \ | 58 | +SRC_URI = "file://helloworld.c \ |
58 | + file://CVE-1234-56789.patch \ | 59 | + file://0001-Fix-CVE-1234-56789.patch \ |
59 | + " | 60 | + " |
60 | |||
61 | S = "${WORKDIR}" | ||
62 | |||
63 | @@ -16,4 +18,4 @@ do_install() { | ||
64 | install -m 0755 helloworld ${D}${bindir} | ||
65 | } | ||
66 | 61 | ||
67 | -BBCLASSEXTEND = "native nativesdk" | 62 | S = "${WORKDIR}/sources" |
68 | \ No newline at end of file | 63 | UNPACKDIR = "${S}" |
69 | +BBCLASSEXTEND = "native nativesdk" | ||
70 | -- | 64 | -- |
71 | 2.41.0 | 65 | 2.45.1 |
72 | 66 | ||
diff --git a/meta/lib/patchtest/utils.py b/meta/lib/patchtest/utils.py index dd0abc22d9..8eddf3e85f 100644 --- a/meta/lib/patchtest/utils.py +++ b/meta/lib/patchtest/utils.py | |||
@@ -14,109 +14,6 @@ import logging | |||
14 | import re | 14 | import re |
15 | import mailbox | 15 | import mailbox |
16 | 16 | ||
17 | class CmdException(Exception): | ||
18 | """ Simple exception class where its attributes are the ones passed when instantiated """ | ||
19 | def __init__(self, cmd): | ||
20 | self._cmd = cmd | ||
21 | def __getattr__(self, name): | ||
22 | value = None | ||
23 | if self._cmd.has_key(name): | ||
24 | value = self._cmd[name] | ||
25 | return value | ||
26 | |||
27 | def exec_cmd(cmd, cwd, ignore_error=False, input=None, strip=True, updateenv={}): | ||
28 | """ | ||
29 | Input: | ||
30 | |||
31 | cmd: dict containing the following keys: | ||
32 | |||
33 | cmd : the command itself as an array of strings | ||
34 | ignore_error: if False, no exception is raised | ||
35 | strip: indicates if strip is done on the output (stdout and stderr) | ||
36 | input: input data to the command (stdin) | ||
37 | updateenv: environment variables to be appended to the current | ||
38 | process environment variables | ||
39 | |||
40 | NOTE: keys 'ignore_error' and 'input' are optional; if not included, | ||
41 | the defaults are the ones specify in the arguments | ||
42 | cwd: directory where commands are executed | ||
43 | ignore_error: raise CmdException if command fails to execute and | ||
44 | this value is False | ||
45 | input: input data (stdin) for the command | ||
46 | |||
47 | Output: dict containing the following keys: | ||
48 | |||
49 | cmd: the same as input | ||
50 | ignore_error: the same as input | ||
51 | strip: the same as input | ||
52 | input: the same as input | ||
53 | stdout: Standard output after command's execution | ||
54 | stderr: Standard error after command's execution | ||
55 | returncode: Return code after command's execution | ||
56 | |||
57 | """ | ||
58 | cmddefaults = { | ||
59 | 'cmd':'', | ||
60 | 'ignore_error':ignore_error, | ||
61 | 'strip':strip, | ||
62 | 'input':input, | ||
63 | 'updateenv':updateenv, | ||
64 | } | ||
65 | |||
66 | # update input values if necessary | ||
67 | cmddefaults.update(cmd) | ||
68 | |||
69 | _cmd = cmddefaults | ||
70 | |||
71 | if not _cmd['cmd']: | ||
72 | raise CmdException({'cmd':None, 'stderr':'no command given'}) | ||
73 | |||
74 | # update the environment | ||
75 | env = os.environ | ||
76 | env.update(_cmd['updateenv']) | ||
77 | |||
78 | _command = [e for e in _cmd['cmd']] | ||
79 | p = subprocess.Popen(_command, | ||
80 | stdin=subprocess.PIPE, | ||
81 | stdout=subprocess.PIPE, | ||
82 | stderr=subprocess.PIPE, | ||
83 | universal_newlines=True, | ||
84 | cwd=cwd, | ||
85 | env=env) | ||
86 | |||
87 | # execute the command and strip output | ||
88 | (_stdout, _stderr) = p.communicate(_cmd['input']) | ||
89 | if _cmd['strip']: | ||
90 | _stdout, _stderr = map(str.strip, [_stdout, _stderr]) | ||
91 | |||
92 | # generate the result | ||
93 | result = _cmd | ||
94 | result.update({'cmd':_command,'stdout':_stdout,'stderr':_stderr,'returncode':p.returncode}) | ||
95 | |||
96 | # launch exception if necessary | ||
97 | if not _cmd['ignore_error'] and p.returncode: | ||
98 | raise CmdException(result) | ||
99 | |||
100 | return result | ||
101 | |||
102 | def exec_cmds(cmds, cwd): | ||
103 | """ Executes commands | ||
104 | |||
105 | Input: | ||
106 | cmds: Array of commands | ||
107 | cwd: directory where commands are executed | ||
108 | |||
109 | Output: Array of output commands | ||
110 | """ | ||
111 | results = [] | ||
112 | _cmds = cmds | ||
113 | |||
114 | for cmd in _cmds: | ||
115 | result = exec_cmd(cmd, cwd) | ||
116 | results.append(result) | ||
117 | |||
118 | return results | ||
119 | |||
120 | def logger_create(name): | 17 | def logger_create(name): |
121 | logger = logging.getLogger(name) | 18 | logger = logging.getLogger(name) |
122 | loggerhandler = logging.StreamHandler() | 19 | loggerhandler = logging.StreamHandler() |
@@ -125,20 +22,6 @@ def logger_create(name): | |||
125 | logger.setLevel(logging.INFO) | 22 | logger.setLevel(logging.INFO) |
126 | return logger | 23 | return logger |
127 | 24 | ||
128 | def get_subject_prefix(path): | ||
129 | prefix = "" | ||
130 | mbox = mailbox.mbox(path) | ||
131 | |||
132 | if len(mbox): | ||
133 | subject = mbox[0]['subject'] | ||
134 | if subject: | ||
135 | pattern = re.compile(r"(\[.*\])", re.DOTALL) | ||
136 | match = pattern.search(subject) | ||
137 | if match: | ||
138 | prefix = match.group(1) | ||
139 | |||
140 | return prefix | ||
141 | |||
142 | def valid_branch(branch): | 25 | def valid_branch(branch): |
143 | """ Check if branch is valid name """ | 26 | """ Check if branch is valid name """ |
144 | lbranch = branch.lower() | 27 | lbranch = branch.lower() |
@@ -153,7 +36,17 @@ def valid_branch(branch): | |||
153 | 36 | ||
154 | def get_branch(path): | 37 | def get_branch(path): |
155 | """ Get the branch name from mbox """ | 38 | """ Get the branch name from mbox """ |
156 | fullprefix = get_subject_prefix(path) | 39 | fullprefix = "" |
40 | mbox = mailbox.mbox(path) | ||
41 | |||
42 | if len(mbox): | ||
43 | subject = mbox[0]['subject'] | ||
44 | if subject: | ||
45 | pattern = re.compile(r"(\[.*\])", re.DOTALL) | ||
46 | match = pattern.search(subject) | ||
47 | if match: | ||
48 | fullprefix = match.group(1) | ||
49 | |||
157 | branch, branches, valid_branches = None, [], [] | 50 | branch, branches, valid_branches = None, [], [] |
158 | 51 | ||
159 | if fullprefix: | 52 | if fullprefix: |