Commit Graph

9 Commits

Author SHA1 Message Date
Ross Burton 81c378287b test_utils: import functions directly for conciseness
(From OE-Core rev: 2a147008cf81838cfc569640a30df0c1bfd74e08)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:25 +01:00
Ross Burton a32d16cb29 test-utils: handle import bb failing and skip the test
Instead of reporting an error when bb cannot be imported, skip the test
instead. This makes it a lot easier to iterate a test suite when we don't care
about this particular test.

(From OE-Core rev: c4a5bd810ca92d57c334113c528bd1d233b3eac4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07 16:48:24 +01:00
Ross Burton fcfba0ddd9 utils: add trim_version() function
Add a helper function that returns just the first <num_parts> of <version>,
split by periods.  For example, trim_version("1.2.3", 2) will return "1.2".

This should help reduce the spread of numerous copies of this idea across
classes and recipes.

(From OE-Core rev: 17a12e3c62807a7d60fcbf0aa4fd9cf4a739a204)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30 20:59:09 +01:00
Ross Burton 0e904db7da utils: add helper to get all non-system packages
For example if PACKAGES is "foo foo-data foo-dev foo-doc", this will return
"foo-data".

(From OE-Core rev: 3115187e468398a8c1edaf3e5369a2d10fb112f4)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 23:52:21 +01:00
Enrico Scholz 8c22531e49 lib/oe/path.py: support missing directory components in realpath()
Some use cases in OE operate on symlinks which dangling path components.
Assume that these are directories instead of raising ENOENT.

(From OE-Core rev: a96e2c84f24c15b77ee1fbc1f998b8b4796b8664)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 22:45:25 +00:00
Enrico Scholz 21b6ff9bc3 lib: implemented oe.path.realpath()
Various parts of the buildsystem have to work with symlinks. Resolving
them is not trivial because they are always relative to a sysroot
directory.

Patch adds a function which returns the destination of a symlink by
assuming a given path as the / toplevel directory.  A testsuite was
added too.

(From OE-Core rev: 76e0bd7f8e3a3bd052a6e329f88e2d8099e899c4)

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11 14:46:11 +00:00
Christopher Larson 9fb67f895c oe.license: add license flattening code
This flattens a license tree by selecting one side of each OR operation
(chosen via the user supplied function).

(From OE-Core rev: 6984961314c8ba2aceab9acabb658f96ed249fef)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:29 +00:00
Christopher Larson a57de1ac9d license: split license parsing into oe.license
In addition to moving this functionality to oe.license, makes the string
preparation more picky before passing it off to the ast compilation. This
ensures that LICENSE entries like 'GPL/BSD' are seen as invalid (due to the
presence of the unsupported '/').

(From OE-Core rev: 20d4068045c76e9dc2aff0c152dd02d6a109c9dd)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:29 +00:00
Christopher Larson 91378835c6 oe.test_types: move into an oe.tests package
(From OE-Core rev: 36cc35b4cbb91049a63daa7c915f538047db0f76)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:29 +00:00