diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-09-19 15:57:07 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-21 11:34:19 +0100 |
commit | b32174e58e89119e3ca2315030629a6580ccbd52 (patch) | |
tree | 1be70a32209bd098988f1d60cd7ce496329129d0 /scripts | |
parent | 455877548e7a685f0dacf3b10056ff85c7aeedf2 (diff) | |
download | poky-b32174e58e89119e3ca2315030629a6580ccbd52.tar.gz |
scripts: rename yocto-compat-layer to remove "compatible" nomenclature
"Yocto Project Compatible" [1] is a programme which requires you meet
specific criteria including going through an application process - it is
not sufficient simply to run the script we have created here and have it
produce no warnings/errors. To avoid people being confused by the fact
that this script uses the term "compatible" or variations thereof,
substitute usage of that word with "check" instead. The functionality of
the script is unchanged.
[1] https://www.yoctoproject.org/ecosystem/yocto-project-branding-program
(From OE-Core rev: 2a6126a115f10750ea89f95629d3699ad41c5665)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/checklayer/__init__.py (renamed from scripts/lib/compatlayer/__init__.py) | 2 | ||||
-rw-r--r-- | scripts/lib/checklayer/case.py (renamed from scripts/lib/compatlayer/case.py) | 2 | ||||
-rw-r--r-- | scripts/lib/checklayer/cases/__init__.py (renamed from scripts/lib/compatlayer/cases/__init__.py) | 0 | ||||
-rw-r--r-- | scripts/lib/checklayer/cases/bsp.py (renamed from scripts/lib/compatlayer/cases/bsp.py) | 10 | ||||
-rw-r--r-- | scripts/lib/checklayer/cases/common.py (renamed from scripts/lib/compatlayer/cases/common.py) | 6 | ||||
-rw-r--r-- | scripts/lib/checklayer/cases/distro.py (renamed from scripts/lib/compatlayer/cases/distro.py) | 8 | ||||
-rw-r--r-- | scripts/lib/checklayer/context.py (renamed from scripts/lib/compatlayer/context.py) | 4 | ||||
-rwxr-xr-x | scripts/yocto-check-layer (renamed from scripts/yocto-compat-layer.py) | 20 | ||||
-rwxr-xr-x | scripts/yocto-check-layer-wrapper (renamed from scripts/yocto-compat-layer-wrapper) | 10 |
9 files changed, 31 insertions, 31 deletions
diff --git a/scripts/lib/compatlayer/__init__.py b/scripts/lib/checklayer/__init__.py index 7197e850e4..6c2b86a79a 100644 --- a/scripts/lib/compatlayer/__init__.py +++ b/scripts/lib/checklayer/__init__.py | |||
@@ -1,4 +1,4 @@ | |||
1 | # Yocto Project compatibility layer tool | 1 | # Yocto Project layer check tool |
2 | # | 2 | # |
3 | # Copyright (C) 2017 Intel Corporation | 3 | # Copyright (C) 2017 Intel Corporation |
4 | # Released under the MIT license (see COPYING.MIT) | 4 | # Released under the MIT license (see COPYING.MIT) |
diff --git a/scripts/lib/compatlayer/case.py b/scripts/lib/checklayer/case.py index 54ce78aa60..9dd00412e5 100644 --- a/scripts/lib/compatlayer/case.py +++ b/scripts/lib/checklayer/case.py | |||
@@ -3,5 +3,5 @@ | |||
3 | 3 | ||
4 | from oeqa.core.case import OETestCase | 4 | from oeqa.core.case import OETestCase |
5 | 5 | ||
6 | class OECompatLayerTestCase(OETestCase): | 6 | class OECheckLayerTestCase(OETestCase): |
7 | pass | 7 | pass |
diff --git a/scripts/lib/compatlayer/cases/__init__.py b/scripts/lib/checklayer/cases/__init__.py index e69de29bb2..e69de29bb2 100644 --- a/scripts/lib/compatlayer/cases/__init__.py +++ b/scripts/lib/checklayer/cases/__init__.py | |||
diff --git a/scripts/lib/compatlayer/cases/bsp.py b/scripts/lib/checklayer/cases/bsp.py index 43efae406f..b6b611be73 100644 --- a/scripts/lib/compatlayer/cases/bsp.py +++ b/scripts/lib/checklayer/cases/bsp.py | |||
@@ -3,14 +3,14 @@ | |||
3 | 3 | ||
4 | import unittest | 4 | import unittest |
5 | 5 | ||
6 | from compatlayer import LayerType, get_signatures, check_command, get_depgraph | 6 | from checklayer import LayerType, get_signatures, check_command, get_depgraph |
7 | from compatlayer.case import OECompatLayerTestCase | 7 | from checklayer.case import OECheckLayerTestCase |
8 | 8 | ||
9 | class BSPCompatLayer(OECompatLayerTestCase): | 9 | class BSPCheckLayer(OECheckLayerTestCase): |
10 | @classmethod | 10 | @classmethod |
11 | def setUpClass(self): | 11 | def setUpClass(self): |
12 | if self.tc.layer['type'] != LayerType.BSP: | 12 | if self.tc.layer['type'] != LayerType.BSP: |
13 | raise unittest.SkipTest("BSPCompatLayer: Layer %s isn't BSP one." %\ | 13 | raise unittest.SkipTest("BSPCheckLayer: Layer %s isn't BSP one." %\ |
14 | self.tc.layer['name']) | 14 | self.tc.layer['name']) |
15 | 15 | ||
16 | def test_bsp_defines_machines(self): | 16 | def test_bsp_defines_machines(self): |
@@ -62,7 +62,7 @@ class BSPCompatLayer(OECompatLayerTestCase): | |||
62 | This criteria can only be tested by testing different machines in combination, | 62 | This criteria can only be tested by testing different machines in combination, |
63 | i.e. one main layer, potentially several additional BSP layers and an explicit | 63 | i.e. one main layer, potentially several additional BSP layers and an explicit |
64 | choice of machines: | 64 | choice of machines: |
65 | yocto-compat-layer --additional-layers .../meta-intel --machines intel-corei7-64 imx6slevk -- .../meta-freescale | 65 | yocto-check-layer --additional-layers .../meta-intel --machines intel-corei7-64 imx6slevk -- .../meta-freescale |
66 | ''' | 66 | ''' |
67 | 67 | ||
68 | if not self.td['machines']: | 68 | if not self.td['machines']: |
diff --git a/scripts/lib/compatlayer/cases/common.py b/scripts/lib/checklayer/cases/common.py index 55e8ba4c51..a13c1088f0 100644 --- a/scripts/lib/compatlayer/cases/common.py +++ b/scripts/lib/checklayer/cases/common.py | |||
@@ -4,10 +4,10 @@ | |||
4 | import glob | 4 | import glob |
5 | import os | 5 | import os |
6 | import unittest | 6 | import unittest |
7 | from compatlayer import get_signatures, LayerType, check_command, get_depgraph, compare_signatures | 7 | from checklayer import get_signatures, LayerType, check_command, get_depgraph, compare_signatures |
8 | from compatlayer.case import OECompatLayerTestCase | 8 | from checklayer.case import OECheckLayerTestCase |
9 | 9 | ||
10 | class CommonCompatLayer(OECompatLayerTestCase): | 10 | class CommonCheckLayer(OECheckLayerTestCase): |
11 | def test_readme(self): | 11 | def test_readme(self): |
12 | # The top-level README file may have a suffix (like README.rst or README.txt). | 12 | # The top-level README file may have a suffix (like README.rst or README.txt). |
13 | readme_files = glob.glob(os.path.join(self.tc.layer['path'], 'README*')) | 13 | readme_files = glob.glob(os.path.join(self.tc.layer['path'], 'README*')) |
diff --git a/scripts/lib/compatlayer/cases/distro.py b/scripts/lib/checklayer/cases/distro.py index 523acc1e78..df1b3035eb 100644 --- a/scripts/lib/compatlayer/cases/distro.py +++ b/scripts/lib/checklayer/cases/distro.py | |||
@@ -3,14 +3,14 @@ | |||
3 | 3 | ||
4 | import unittest | 4 | import unittest |
5 | 5 | ||
6 | from compatlayer import LayerType | 6 | from checklayer import LayerType |
7 | from compatlayer.case import OECompatLayerTestCase | 7 | from checklayer.case import OECheckLayerTestCase |
8 | 8 | ||
9 | class DistroCompatLayer(OECompatLayerTestCase): | 9 | class DistroCheckLayer(OECheckLayerTestCase): |
10 | @classmethod | 10 | @classmethod |
11 | def setUpClass(self): | 11 | def setUpClass(self): |
12 | if self.tc.layer['type'] != LayerType.DISTRO: | 12 | if self.tc.layer['type'] != LayerType.DISTRO: |
13 | raise unittest.SkipTest("DistroCompatLayer: Layer %s isn't Distro one." %\ | 13 | raise unittest.SkipTest("DistroCheckLayer: Layer %s isn't Distro one." %\ |
14 | self.tc.layer['name']) | 14 | self.tc.layer['name']) |
15 | 15 | ||
16 | def test_distro_defines_distros(self): | 16 | def test_distro_defines_distros(self): |
diff --git a/scripts/lib/compatlayer/context.py b/scripts/lib/checklayer/context.py index 7811d4ac20..1bec2c4103 100644 --- a/scripts/lib/compatlayer/context.py +++ b/scripts/lib/checklayer/context.py | |||
@@ -8,8 +8,8 @@ import re | |||
8 | 8 | ||
9 | from oeqa.core.context import OETestContext | 9 | from oeqa.core.context import OETestContext |
10 | 10 | ||
11 | class CompatLayerTestContext(OETestContext): | 11 | class CheckLayerTestContext(OETestContext): |
12 | def __init__(self, td=None, logger=None, layer=None, test_software_layer_signatures=True): | 12 | def __init__(self, td=None, logger=None, layer=None, test_software_layer_signatures=True): |
13 | super(CompatLayerTestContext, self).__init__(td, logger) | 13 | super(CheckLayerTestContext, self).__init__(td, logger) |
14 | self.layer = layer | 14 | self.layer = layer |
15 | self.test_software_layer_signatures = test_software_layer_signatures | 15 | self.test_software_layer_signatures = test_software_layer_signatures |
diff --git a/scripts/yocto-compat-layer.py b/scripts/yocto-check-layer index 9a541c66e5..5a4fd752ca 100755 --- a/scripts/yocto-compat-layer.py +++ b/scripts/yocto-check-layer | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/env python3 | 1 | #!/usr/bin/env python3 |
2 | 2 | ||
3 | # Yocto Project compatibility layer tool | 3 | # Yocto Project layer checking tool |
4 | # | 4 | # |
5 | # Copyright (C) 2017 Intel Corporation | 5 | # Copyright (C) 2017 Intel Corporation |
6 | # Released under the MIT license (see COPYING.MIT) | 6 | # Released under the MIT license (see COPYING.MIT) |
@@ -22,29 +22,29 @@ import scriptpath | |||
22 | scriptpath.add_oe_lib_path() | 22 | scriptpath.add_oe_lib_path() |
23 | scriptpath.add_bitbake_lib_path() | 23 | scriptpath.add_bitbake_lib_path() |
24 | 24 | ||
25 | from compatlayer import LayerType, detect_layers, add_layer, add_layer_dependencies, get_signatures | 25 | from checklayer import LayerType, detect_layers, add_layer, add_layer_dependencies, get_signatures |
26 | from oeqa.utils.commands import get_bb_vars | 26 | from oeqa.utils.commands import get_bb_vars |
27 | 27 | ||
28 | PROGNAME = 'yocto-compat-layer' | 28 | PROGNAME = 'yocto-check-layer' |
29 | CASES_PATHS = [os.path.join(os.path.abspath(os.path.dirname(__file__)), | 29 | CASES_PATHS = [os.path.join(os.path.abspath(os.path.dirname(__file__)), |
30 | 'lib', 'compatlayer', 'cases')] | 30 | 'lib', 'checklayer', 'cases')] |
31 | logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout) | 31 | logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout) |
32 | 32 | ||
33 | def test_layer_compatibility(td, layer, test_software_layer_signatures): | 33 | def test_layer(td, layer, test_software_layer_signatures): |
34 | from compatlayer.context import CompatLayerTestContext | 34 | from checklayer.context import CheckLayerTestContext |
35 | logger.info("Starting to analyze: %s" % layer['name']) | 35 | logger.info("Starting to analyze: %s" % layer['name']) |
36 | logger.info("----------------------------------------------------------------------") | 36 | logger.info("----------------------------------------------------------------------") |
37 | 37 | ||
38 | tc = CompatLayerTestContext(td=td, logger=logger, layer=layer, test_software_layer_signatures=test_software_layer_signatures) | 38 | tc = CheckLayerTestContext(td=td, logger=logger, layer=layer, test_software_layer_signatures=test_software_layer_signatures) |
39 | tc.loadTests(CASES_PATHS) | 39 | tc.loadTests(CASES_PATHS) |
40 | return tc.runTests() | 40 | return tc.runTests() |
41 | 41 | ||
42 | def main(): | 42 | def main(): |
43 | parser = argparse.ArgumentParser( | 43 | parser = argparse.ArgumentParser( |
44 | description="Yocto Project compatibility layer tool", | 44 | description="Yocto Project layer checking tool", |
45 | add_help=False) | 45 | add_help=False) |
46 | parser.add_argument('layers', metavar='LAYER_DIR', nargs='+', | 46 | parser.add_argument('layers', metavar='LAYER_DIR', nargs='+', |
47 | help='Layer to test compatibility with Yocto Project') | 47 | help='Layer to check') |
48 | parser.add_argument('-o', '--output-log', | 48 | parser.add_argument('-o', '--output-log', |
49 | help='File to output log (optional)', action='store') | 49 | help='File to output log (optional)', action='store') |
50 | parser.add_argument('--dependency', nargs="+", | 50 | parser.add_argument('--dependency', nargs="+", |
@@ -179,7 +179,7 @@ def main(): | |||
179 | layers_tested = layers_tested + 1 | 179 | layers_tested = layers_tested + 1 |
180 | continue | 180 | continue |
181 | 181 | ||
182 | result = test_layer_compatibility(td, layer, args.test_software_layer_signatures) | 182 | result = test_layer(td, layer, args.test_software_layer_signatures) |
183 | results[layer['name']] = result | 183 | results[layer['name']] = result |
184 | results_status[layer['name']] = 'PASS' if results[layer['name']].wasSuccessful() else 'FAIL' | 184 | results_status[layer['name']] = 'PASS' if results[layer['name']].wasSuccessful() else 'FAIL' |
185 | layers_tested = layers_tested + 1 | 185 | layers_tested = layers_tested + 1 |
diff --git a/scripts/yocto-compat-layer-wrapper b/scripts/yocto-check-layer-wrapper index b6baeb484e..bbf6ee176d 100755 --- a/scripts/yocto-compat-layer-wrapper +++ b/scripts/yocto-check-layer-wrapper | |||
@@ -1,8 +1,8 @@ | |||
1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
2 | 2 | ||
3 | # Yocto Project compatibility layer tool wrapper | 3 | # Yocto Project layer check tool wrapper |
4 | # | 4 | # |
5 | # Creates a temprary build directory to run Yocto Project Compatible | 5 | # Creates a temporary build directory to run the yocto-check-layer |
6 | # script to avoid a contaminated environment. | 6 | # script to avoid a contaminated environment. |
7 | # | 7 | # |
8 | # Copyright (C) 2017 Intel Corporation | 8 | # Copyright (C) 2017 Intel Corporation |
@@ -24,7 +24,7 @@ do | |||
24 | done | 24 | done |
25 | shift $(($OPTIND - 1)) | 25 | shift $(($OPTIND - 1)) |
26 | 26 | ||
27 | # generate a temp directory to run compat layer script | 27 | # generate a temp directory to run check layer script |
28 | base_dir=$(realpath $BUILDDIR/../) | 28 | base_dir=$(realpath $BUILDDIR/../) |
29 | cd $base_dir | 29 | cd $base_dir |
30 | 30 | ||
@@ -32,9 +32,9 @@ build_dir=$(mktemp -p $base_dir -d -t build-XXXX) | |||
32 | 32 | ||
33 | source oe-init-build-env $build_dir | 33 | source oe-init-build-env $build_dir |
34 | if [[ $output_log != '' ]]; then | 34 | if [[ $output_log != '' ]]; then |
35 | yocto-compat-layer.py -o "$output_log" "$*" | 35 | yocto-check-layer -o "$output_log" "$*" |
36 | else | 36 | else |
37 | yocto-compat-layer.py "$@" | 37 | yocto-check-layer "$@" |
38 | fi | 38 | fi |
39 | retcode=$? | 39 | retcode=$? |
40 | 40 | ||