From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- poky/meta-selftest/COPYING.MIT | 17 +++++ poky/meta-selftest/README | 3 + poky/meta-selftest/classes/test_events.bbclass | 16 +++++ poky/meta-selftest/conf/layer.conf | 12 ++++ poky/meta-selftest/conf/machine/qemux86copy.conf | 3 + poky/meta-selftest/files/signing/key.passphrase | 1 + poky/meta-selftest/files/signing/key.pub | 30 +++++++++ poky/meta-selftest/files/signing/key.secret | 59 +++++++++++++++++ poky/meta-selftest/files/static-group | 14 ++++ poky/meta-selftest/files/static-passwd | 11 ++++ poky/meta-selftest/lib/devtool/__init__.py | 0 poky/meta-selftest/lib/devtool/bbpath.py | 44 +++++++++++++ poky/meta-selftest/lib/devtool/test.py | 11 ++++ .../lib/oeqa/runtime/cases/dnf_runtime.py | 47 ++++++++++++++ .../lib/oeqa/runtime/cases/selftest.json | 6 ++ .../lib/oeqa/runtime/cases/selftest.py | 31 +++++++++ .../lib/oeqa/selftest/cases/external-layer.py | 16 +++++ poky/meta-selftest/lib/recipetool/bbpath.py | 41 ++++++++++++ .../recipes-test/aspell/aspell_0.0.0.1.bb | 32 +++++++++ .../recipes-test/aspell/aspell_0.60.6.1.bbappend | 2 + .../container-image/container-image-testpkg.bb | 8 +++ .../container-image/container-test-image.bb | 8 +++ .../recipes-test/devtool/devtool-test-local/file1 | 1 + .../recipes-test/devtool/devtool-test-local/file2 | 1 + .../devtool/devtool-test-local_6.03.bb | 16 +++++ .../recipes-test/devtool/devtool-test-localonly.bb | 7 ++ .../devtool/devtool-test-localonly/file1 | 1 + .../devtool/devtool-test-localonly/file2 | 1 + .../recipes-test/devtool/devtool-test-patch-gz.bb | 18 ++++++ .../devtool/devtool-test-patch-gz/readme.patch.gz | Bin 0 -> 449 bytes .../recipes-test/devtool/devtool-test-subdir.bb | 9 +++ .../devtool-test-subdir/devtool-test-subdir.tar.gz | Bin 0 -> 181 bytes .../devtool/devtool-test-subdir/testfile | 1 + ...01-Add-a-note-line-to-the-quick-reference.patch | 25 +++++++ .../devtool/devtool-upgrade-test1_1.5.3.bb | 20 ++++++ .../devtool-upgrade-test1_1.5.3.bb.upgraded | 18 ++++++ .../devtool/devtool-upgrade-test2_git.bb | 22 +++++++ .../devtool/devtool-upgrade-test2_git.bb.upgraded | 21 ++++++ .../recipes-test/emptytest/emptytest.bb | 7 ++ poky/meta-selftest/recipes-test/error/error.bb | 10 +++ .../recipes-test/images/error-image.bb | 8 +++ .../recipes-test/images/oe-selftest-image.bb | 9 +++ .../recipes-test/images/test-empty-image.bb | 6 ++ .../recipes-test/images/wic-image-minimal.bb | 15 +++++ .../recipes-test/images/wic-image-minimal.wks | 10 +++ poky/meta-selftest/recipes-test/m4/m4_%.bbappend | 2 + .../man-db/files/0001-Test-patch-here.patch | 22 +++++++ .../recipes-test/man-db/man-db_%.bbappend | 2 + .../recipes-test/postinst/postinst_1.0.bb | 72 +++++++++++++++++++++ .../recipes-test/recipetool/files/add-file.patch | 8 +++ .../recipes-test/recipetool/files/file1 | 2 + .../recipes-test/recipetool/files/installscript.sh | 3 + .../recipetool/files/selftest-replaceme-inst-func | 1 + .../files/selftest-replaceme-inst-globfile | 1 + .../files/selftest-replaceme-inst-todir-globfile | 1 + .../recipetool/files/selftest-replaceme-orig | 1 + .../files/selftest-replaceme-src-globfile | 1 + .../recipetool/files/selftest-replaceme-todir | 1 + .../recipetool/files/subdir/fileinsubdir | 1 + .../recipetool/selftest-recipetool-appendfile.bb | 44 +++++++++++++ .../recipes-test/selftest-ed/selftest-ed_0.5.bb | 22 +++++++ .../recipes-test/selftest-ed/selftest-ed_1.14.1.bb | 36 +++++++++++ .../xcursor-transparent-theme_%.bbappend | 2 + poky/meta-selftest/wic/test_rawcopy_plugin.wks.in | 6 ++ poky/meta-selftest/wic/wictestdisk.wks | 7 ++ 65 files changed, 873 insertions(+) create mode 100644 poky/meta-selftest/COPYING.MIT create mode 100644 poky/meta-selftest/README create mode 100644 poky/meta-selftest/classes/test_events.bbclass create mode 100644 poky/meta-selftest/conf/layer.conf create mode 100644 poky/meta-selftest/conf/machine/qemux86copy.conf create mode 100644 poky/meta-selftest/files/signing/key.passphrase create mode 100644 poky/meta-selftest/files/signing/key.pub create mode 100644 poky/meta-selftest/files/signing/key.secret create mode 100644 poky/meta-selftest/files/static-group create mode 100644 poky/meta-selftest/files/static-passwd create mode 100644 poky/meta-selftest/lib/devtool/__init__.py create mode 100644 poky/meta-selftest/lib/devtool/bbpath.py create mode 100644 poky/meta-selftest/lib/devtool/test.py create mode 100644 poky/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py create mode 100644 poky/meta-selftest/lib/oeqa/runtime/cases/selftest.json create mode 100644 poky/meta-selftest/lib/oeqa/runtime/cases/selftest.py create mode 100644 poky/meta-selftest/lib/oeqa/selftest/cases/external-layer.py create mode 100644 poky/meta-selftest/lib/recipetool/bbpath.py create mode 100644 poky/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb create mode 100644 poky/meta-selftest/recipes-test/aspell/aspell_0.60.6.1.bbappend create mode 100644 poky/meta-selftest/recipes-test/container-image/container-image-testpkg.bb create mode 100644 poky/meta-selftest/recipes-test/container-image/container-test-image.bb create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-local/file1 create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-local/file2 create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-localonly/file1 create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-localonly/file2 create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-patch-gz/readme.patch.gz create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-subdir.bb create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-subdir/devtool-test-subdir.tar.gz create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-test-subdir/testfile create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/0001-Add-a-note-line-to-the-quick-reference.patch create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb create mode 100644 poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded create mode 100644 poky/meta-selftest/recipes-test/emptytest/emptytest.bb create mode 100644 poky/meta-selftest/recipes-test/error/error.bb create mode 100644 poky/meta-selftest/recipes-test/images/error-image.bb create mode 100644 poky/meta-selftest/recipes-test/images/oe-selftest-image.bb create mode 100644 poky/meta-selftest/recipes-test/images/test-empty-image.bb create mode 100644 poky/meta-selftest/recipes-test/images/wic-image-minimal.bb create mode 100644 poky/meta-selftest/recipes-test/images/wic-image-minimal.wks create mode 100644 poky/meta-selftest/recipes-test/m4/m4_%.bbappend create mode 100644 poky/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch create mode 100644 poky/meta-selftest/recipes-test/man-db/man-db_%.bbappend create mode 100644 poky/meta-selftest/recipes-test/postinst/postinst_1.0.bb create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/add-file.patch create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/file1 create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/installscript.sh create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-func create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-globfile create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-todir-globfile create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-orig create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-todir create mode 100644 poky/meta-selftest/recipes-test/recipetool/files/subdir/fileinsubdir create mode 100644 poky/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb create mode 100644 poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb create mode 100644 poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb create mode 100644 poky/meta-selftest/recipes-test/xcursor-transparent-theme/xcursor-transparent-theme_%.bbappend create mode 100644 poky/meta-selftest/wic/test_rawcopy_plugin.wks.in create mode 100644 poky/meta-selftest/wic/wictestdisk.wks (limited to 'poky/meta-selftest') diff --git a/poky/meta-selftest/COPYING.MIT b/poky/meta-selftest/COPYING.MIT new file mode 100644 index 0000000000..89de354795 --- /dev/null +++ b/poky/meta-selftest/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/poky/meta-selftest/README b/poky/meta-selftest/README new file mode 100644 index 0000000000..11a6fee2d0 --- /dev/null +++ b/poky/meta-selftest/README @@ -0,0 +1,3 @@ +This layer is intended as test layer, used by scripts/oe-selftest +and it's probably a mistake to include it in your builds (unless you +want to run the script). diff --git a/poky/meta-selftest/classes/test_events.bbclass b/poky/meta-selftest/classes/test_events.bbclass new file mode 100644 index 0000000000..35324eb40b --- /dev/null +++ b/poky/meta-selftest/classes/test_events.bbclass @@ -0,0 +1,16 @@ +python test1_eventhandler() { + bb.note("Test for bb.event.BuildStarted") +} +python test2_eventhandler() { + bb.note("Test for bb.event.BuildCompleted") +} +python test3_eventhandler() { + bb.note("Test for bb.event.InvalidEvent") +} + +addhandler test1_eventhandler +test1_eventhandler[eventmask] = "bb.event.BuildStarted" +addhandler test2_eventhandler +test2_eventhandler[eventmask] = "bb.event.BuildCompleted" +addhandler test3_eventhandler +test3_eventhandler[eventmask] = "bb.event.InvalidEvent" diff --git a/poky/meta-selftest/conf/layer.conf b/poky/meta-selftest/conf/layer.conf new file mode 100644 index 0000000000..f574a505d6 --- /dev/null +++ b/poky/meta-selftest/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "selftest" +BBFILE_PATTERN_selftest = "^${LAYERDIR}/" +BBFILE_PRIORITY_selftest = "5" + +LAYERSERIES_COMPAT_selftest = "sumo" diff --git a/poky/meta-selftest/conf/machine/qemux86copy.conf b/poky/meta-selftest/conf/machine/qemux86copy.conf new file mode 100644 index 0000000000..76c13fdcb9 --- /dev/null +++ b/poky/meta-selftest/conf/machine/qemux86copy.conf @@ -0,0 +1,3 @@ +require conf/machine/qemux86.conf + +MACHINEOVERRIDES .= ":qemux86" diff --git a/poky/meta-selftest/files/signing/key.passphrase b/poky/meta-selftest/files/signing/key.passphrase new file mode 100644 index 0000000000..5271a52680 --- /dev/null +++ b/poky/meta-selftest/files/signing/key.passphrase @@ -0,0 +1 @@ +test123 diff --git a/poky/meta-selftest/files/signing/key.pub b/poky/meta-selftest/files/signing/key.pub new file mode 100644 index 0000000000..e197bb3815 --- /dev/null +++ b/poky/meta-selftest/files/signing/key.pub @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQENBFYeMycBCADISkEj+u+3SkGbmC4b09StA3Fk4J8bKZrTTpQqUhOH4QFIQpso +q96Q907h/ABAgB+IV0SGIeN866E7BqToqoXZ74X6EoyXWdndaMaFZSj+oNqqg6Gi +hVsuGNpvRyyXSCYW8w9H2lFx09UufFrUxoSeP2iVdJJaUAmb8e00PCwkYrS2BZEa +tO2VgllbaqczldmlUGnkIZt8YUSQSI/xZBDYUvbcZYBaOnDH1SDQl26f+bgyeIyS +TW5TZb96o4tMfiifgPoqAapAxQLahG0WtjF/n1yNV5wUNQYsEQf6/h6W2rHGsCP5 +6FVFnr/ZPVam9iHUxL4lvJSI8dEH37s9GmarABEBAAG0LXRlc3R1c2VyIChub2Nv +bW1lbnQpIDx0ZXN0dXNlckB0ZXN0ZW1haWwuY29tPokBOAQTAQIAIgUCVh4zJwIb +AwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQezExa11krVLM2wf/fW1C8DPx +tZEyl6iPXFjNotslo+t2TL6jPefC22KmbokJCtCnxcopBjQRuhUSNDTkXkUdVagy +TaaYILV8XGajTmcVGQTaKeh+j6TM6CBGApQB5KhHvZCyvNBrGcNyuiex0Sm/rIhS +fZre6ptZM/026W2kLwwJESXzHJEqCoFmU6aSOUCVyiDgMfcNw6c4NmEoqZtLdnxU +B7Nac98o933AIvaaQMGtKIOcyOM7P/dyv8eMc38z2ew5bEB8E9aSdg5koXb3zIt5 +IKea631k4INAsFFyLMQNSmmKV7RK0miF5b4hGyekrYZRtiic5+dq5aWnVka4hBfi +x31euxwQE87gQLkBDQRWHjMnAQgAt7C9QCFPWzLGQuQ/YaQub+8s2lYNQnmfwDHm +5PuON+Wj/f5GyQhHKsbdUAPZ7GsjFIQnva7xNYYF/IvpC+0saB5NLMkBzjfIsg92 +6MkadAKlOR2o9gKlF59mulsJmJqNFTXiRcVXvpUnU8WB9ECmm321XfYHhk+4EMay +H3OUZ0k6dEmvrWBTKNTR7M0z6j/jW+8J3vP3L9k1H+OV0EZwAKXfbh1lN4H467jY +3gA7FU1WDmA06HphoSaFUEGTuXGtrRP0eksCUj3BtVygXnyQb379dISDOWcs/9Ke +v3KMrZWgDnA4pH1eQpjycBhwKOCHYyhSSVOwCS3DGkaaklmQZwARAQABiQEfBBgB +AgAJBQJWHjMnAhsMAAoJEHsxMWtdZK1SoPsIAKadG/tvS5COCyF8FuriL89Ysfov +kMRKeb9hsMDbKX2lm3UtoS5ErmpkEUO/SbazQYm6/vYc8noQquqhkIdCljIvpWDv +17tXEFfTGA493dlTTEWFt5bvzbQN6OhBu3904lAE4JGtlOOa9OKDeguwXbneLOyl +dnlj2f7rw05cB9t/RDu7T11dTI39BMTUUm1lpWxYJk41o59b9g+fpJZkiIAJwnN3 +MwM1u9/AWfTqjNRgMAO5dIYceceTwGogujG+xz93flt+NjQhILG0T9jd0DFBgIAX +Zq4PzX5aFDKjGoFaOOZ6r+kppBLH/HN6okMGIcfqaPPdnJI1MXFQvFzUNpo= +=2cSJ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/poky/meta-selftest/files/signing/key.secret b/poky/meta-selftest/files/signing/key.secret new file mode 100644 index 0000000000..d30d7cd610 --- /dev/null +++ b/poky/meta-selftest/files/signing/key.secret @@ -0,0 +1,59 @@ +-----BEGIN PGP PRIVATE KEY BLOCK----- +Version: GnuPG v1 + +lQO+BFYeMycBCADISkEj+u+3SkGbmC4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xF +hbeW7820DejoQbt/dOJQBOCRrZTjmvTig3oLsF253izspXZ5Y9n+68NOXAfbf0Q7 +u09dXUyN/QTE1FJtZaVsWCZONaOfW/YPn6SWZIiACcJzdzMDNbvfwFn06ozUYDAD +uXSGHHnHk8BqILoxvsc/d35bfjY0ISCxtE/Y3dAxQYCAF2auD81+WhQyoxqBWjjm +eq/pKaQSx/xzeqJDBiHH6mjz3ZySNTFxULxc1Daa +=b+vR +-----END PGP PRIVATE KEY BLOCK----- diff --git a/poky/meta-selftest/files/static-group b/poky/meta-selftest/files/static-group new file mode 100644 index 0000000000..9213b8e9bc --- /dev/null +++ b/poky/meta-selftest/files/static-group @@ -0,0 +1,14 @@ +messagebus:x:500: +systemd-bus-proxy:x:501: +systemd-network:x:502: +systemd-resolve:x:503: +systemd-timesync:x:504: +polkitd:x:505: +lock:x:506: +systemd-journal:x:507: +netdev:x:508: +avahi:x:509: +avahi-autoipd:x:510: +rpc:x:511: +rpcuser:x:513: + diff --git a/poky/meta-selftest/files/static-passwd b/poky/meta-selftest/files/static-passwd new file mode 100644 index 0000000000..412f85d469 --- /dev/null +++ b/poky/meta-selftest/files/static-passwd @@ -0,0 +1,11 @@ +messagebus:x:500:500::/var/lib/dbus:/bin/false +systemd-bus-proxy:x:501:501::/:/bin/nologin +systemd-network:x:502:502::/:/bin/nologin +systemd-resolve:x:503:503::/:/bin/nologin +systemd-timesync:x:504:504::/:/bin/nologin +polkitd:x:505:505::/:/bin/nologin +avahi:x:509:509::/:/bin/nologin +avahi-autoipd:x:510:510::/:/bin/nologin +rpc:x:511:511::/:/bin/nologin +distcc:x:512:nogroup::/:/bin/nologin +rpcuser:x:513:513::/var/lib/nfs:/bin/nologin diff --git a/poky/meta-selftest/lib/devtool/__init__.py b/poky/meta-selftest/lib/devtool/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/poky/meta-selftest/lib/devtool/bbpath.py b/poky/meta-selftest/lib/devtool/bbpath.py new file mode 100644 index 0000000000..5e8ffb3af6 --- /dev/null +++ b/poky/meta-selftest/lib/devtool/bbpath.py @@ -0,0 +1,44 @@ +import argparse + +already_loaded = False +kept_context = None + +def plugin_name(filename): + return os.path.splitext(os.path.basename(filename))[0] + +def plugin_init(plugins): + global already_loaded + already_loaded = plugin_name(__file__) in (plugin_name(p.__name__) for p in plugins) + +def print_name(args, config, basepath, workspace): + print (__file__) + +def print_bbdir(args, config, basepath, workspace): + print (__file__.replace('/lib/devtool/bbpath.py','')) + +def print_registered(args, config, basepath, workspace): + global kept_context + print(kept_context.loaded) + +def multiloaded(args, config, basepath, workspace): + global already_loaded + print("yes" if already_loaded else "no") + +def register_commands(subparsers, context): + global kept_context + kept_context = context + if 'loaded' in context.__dict__: + context.loaded += 1 + else: + context.loaded = 1 + + def addparser(name, helptxt, func): + parser = subparsers.add_parser(name, help=helptxt, + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.set_defaults(func=func) + return parser + + addparser('pluginfile', 'Print the filename of this plugin', print_name) + addparser('bbdir', 'Print the BBPATH directory of this plugin', print_bbdir) + addparser('count', 'How many times have this plugin been registered.', print_registered) + addparser('multiloaded', 'How many times have this plugin been initialized', multiloaded) diff --git a/poky/meta-selftest/lib/devtool/test.py b/poky/meta-selftest/lib/devtool/test.py new file mode 100644 index 0000000000..31190f58e7 --- /dev/null +++ b/poky/meta-selftest/lib/devtool/test.py @@ -0,0 +1,11 @@ +import argparse + +def selftest_reverse(args, config, basepath, workspace): + """Reverse the value passed to verify the plugin is executing.""" + print(args.value[::-1]) + +def register_commands(subparsers, context): + parser_build = subparsers.add_parser('selftest-reverse', help='Reverse value (for selftest)', + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser_build.add_argument('value', help='Value to reverse') + parser_build.set_defaults(func=selftest_reverse) diff --git a/poky/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/poky/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py new file mode 100644 index 0000000000..81c50ed97b --- /dev/null +++ b/poky/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py @@ -0,0 +1,47 @@ +from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.cases.dnf import DnfTest +from oeqa.utils.httpserver import HTTPService + +class DnfSelftest(DnfTest): + + @classmethod + def setUpClass(cls): + import tempfile + cls.temp_dir = tempfile.TemporaryDirectory(prefix="oeqa-remotefeeds-") + cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-rootfs-repo'), + cls.tc.target.server_ip) + cls.repo_server.start() + + @classmethod + def tearDownClass(cls): + cls.repo_server.stop() + cls.temp_dir.cleanup() + + @OETestDepends(['dnf.DnfBasicTest.test_dnf_help']) + def test_verify_package_feeds(self): + """ + Summary: Check correct setting of PACKAGE_FEED_URIS var + Expected: 1. Feeds were correctly set for dnf + 2. Update recovers packages from host's repo + Author: Humberto Ibarra + Author: Alexander Kanavin + """ + # When we created an image, we had to supply fake ip and port + # for the feeds. Now we can patch the real ones into the config file. + temp_file = os.path.join(self.temp_dir.name, 'tmp.repo') + self.tc.target.copyFrom("/etc/yum.repos.d/oe-remote-repo.repo", temp_file) + fixed_config = open(temp_file, "r").read().replace("bogus_ip", self.tc.target.server_ip).replace("bogus_port", str(self.repo_server.port)) + with open(temp_file, "w") as f: + f.write(fixed_config) + self.tc.target.copyTo(temp_file, "/etc/yum.repos.d/oe-remote-repo.repo") + + import re + # Use '-y' for non-interactive mode: automatically import the feed signing key + output_makecache = self.dnf('-vy makecache') + self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg = "dnf makecache failed to synchronize repo: %s" %(output_makecache)) + self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg = "dnf makecache failed: %s" %(output_makecache)) + + output_repoinfo = self.dnf('-v repoinfo') + matchobj = re.match(r".*Repo-pkgs\s*:\s*(?P[0-9]+)", output_repoinfo, re.DOTALL) + self.assertTrue(matchobj is not None, msg = "Could not find the amount of packages in dnf repoinfo output: %s" %(output_repoinfo)) + self.assertTrue(int(matchobj.group('n_pkgs')) > 0, msg = "Amount of remote packages is not more than zero: %s\n" %(output_repoinfo)) diff --git a/poky/meta-selftest/lib/oeqa/runtime/cases/selftest.json b/poky/meta-selftest/lib/oeqa/runtime/cases/selftest.json new file mode 100644 index 0000000000..e5ae46ecd4 --- /dev/null +++ b/poky/meta-selftest/lib/oeqa/runtime/cases/selftest.json @@ -0,0 +1,6 @@ +{ + "test_install_package": { + "pkg": "socat", + "rm": true + } +} diff --git a/poky/meta-selftest/lib/oeqa/runtime/cases/selftest.py b/poky/meta-selftest/lib/oeqa/runtime/cases/selftest.py new file mode 100644 index 0000000000..19de740623 --- /dev/null +++ b/poky/meta-selftest/lib/oeqa/runtime/cases/selftest.py @@ -0,0 +1,31 @@ +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends + +class Selftest(OERuntimeTestCase): + + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_install_package(self): + """ + Summary: Check basic package installation functionality. + Expected: 1. Before the test socat must be installed using scp. + 2. After the test socat must be uninstalled using ssh. + This can't be checked in this test. + Product: oe-core + Author: Mariano Lopez + """ + + (status, output) = self.target.run("socat -V") + self.assertEqual(status, 0, msg="socat is not installed") + + @OETestDepends(['selftest.Selftest.test_install_package']) + def test_verify_uninstall(self): + """ + Summary: Check basic package installation functionality. + Expected: 1. test_install_package must uninstall socat. + This test is just to verify that. + Product: oe-core + Author: Mariano Lopez + """ + + (status, output) = self.target.run("socat -V") + self.assertNotEqual(status, 0, msg="socat is still installed") diff --git a/poky/meta-selftest/lib/oeqa/selftest/cases/external-layer.py b/poky/meta-selftest/lib/oeqa/selftest/cases/external-layer.py new file mode 100644 index 0000000000..59b1afab7d --- /dev/null +++ b/poky/meta-selftest/lib/oeqa/selftest/cases/external-layer.py @@ -0,0 +1,16 @@ +#from oeqa.selftest.base import oeSelfTest +from oeqa.selftest.case import OESelftestTestCase +#from oeqa.utils.decorators import testcase + + +class ImportedTests(OESelftestTestCase): + + def test_unconditional_pass(self): + """ + Summary: Doesn't check anything, used to check import test from other layers. + Expected: 1. Pass unconditionally + Product: oe-core + Author: Mariano Lopez +Date: Wed, 24 Feb 2016 17:43:03 +1300 +Subject: [PATCH] Add a note line to the quick reference + +A test patch so we have a file to move around. +--- + doc/quickref.1.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/doc/quickref.1.in b/doc/quickref.1.in +index 389008b..226615c 100644 +--- a/doc/quickref.1.in ++++ b/doc/quickref.1.in +@@ -560,6 +560,7 @@ you want, at runtime, to change the parameters of. + .P + If you find any other problems, please report them. + ++NOTE: this is an important note. + + .SH REPORTING BUGS + Report bugs in +-- +2.5.0 + diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb new file mode 100644 index 0000000000..333ecac7ed --- /dev/null +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb @@ -0,0 +1,20 @@ +SUMMARY = "Pipe viewer test recipe for devtool upgrade test" +LICENSE = "Artistic-2.0" +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" + +SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \ + file://0001-Add-a-note-line-to-the-quick-reference.patch" +UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" +RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" + +SRC_URI[md5sum] = "9365d86bd884222b4bf1039b5a9ed1bd" +SRC_URI[sha256sum] = "681bcca9784bf3cb2207e68236d1f68e2aa7b80f999b5750dc77dcd756e81fbc" + +PR = "r5" + +S = "${WORKDIR}/pv-${PV}" + +EXCLUDE_FROM_WORLD = "1" + +inherit autotools + diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded new file mode 100644 index 0000000000..9d94f671db --- /dev/null +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded @@ -0,0 +1,18 @@ +SUMMARY = "Pipe viewer test recipe for devtool upgrade test" +LICENSE = "Artistic-2.0" +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" + +SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \ + file://0001-Add-a-note-line-to-the-quick-reference.patch" +UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" +RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" + +SRC_URI[md5sum] = "062bca5ff33df1dd09472e7fc3bbe332" +SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3" + +S = "${WORKDIR}/pv-${PV}" + +EXCLUDE_FROM_WORLD = "1" + +inherit autotools + diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb new file mode 100644 index 0000000000..07b83276fb --- /dev/null +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb @@ -0,0 +1,22 @@ +SUMMARY = "A simple tool to wait for a specific signal over DBus" +HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" +SECTION = "base" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "dbus" + +# Note: this is intentionally not the latest version in the original .bb +SRCREV = "1a3e1343761b30750bed70e0fd688f6d3c7b3717" +PV = "0.1+git${SRCPV}" +PR = "r2" + +SRC_URI = "git://git.yoctoproject.org/dbus-wait" +UPSTREAM_CHECK_COMMITS = "1" +RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" + +S = "${WORKDIR}/git" + +EXCLUDE_FROM_WORLD = "1" + +inherit autotools pkgconfig diff --git a/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded new file mode 100644 index 0000000000..32ec4b14fa --- /dev/null +++ b/poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded @@ -0,0 +1,21 @@ +SUMMARY = "A simple tool to wait for a specific signal over DBus" +HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" +SECTION = "base" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "dbus" + +# Note: this is intentionally not the latest version in the original .bb +SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517" +PV = "0.1+git${SRCPV}" + +SRC_URI = "git://git.yoctoproject.org/dbus-wait" +UPSTREAM_CHECK_COMMITS = "1" +RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" + +S = "${WORKDIR}/git" + +EXCLUDE_FROM_WORLD = "1" + +inherit autotools pkgconfig diff --git a/poky/meta-selftest/recipes-test/emptytest/emptytest.bb b/poky/meta-selftest/recipes-test/emptytest/emptytest.bb new file mode 100644 index 0000000000..905c6694f3 --- /dev/null +++ b/poky/meta-selftest/recipes-test/emptytest/emptytest.bb @@ -0,0 +1,7 @@ +include test_recipe.inc + +# Set LICENSE to something so that bitbake -p that is ran at the beginning +# is successful since test_recipe.inc has not yet been modified. +LICENSE = "" + +EXCLUDE_FROM_WORLD = "1" diff --git a/poky/meta-selftest/recipes-test/error/error.bb b/poky/meta-selftest/recipes-test/error/error.bb new file mode 100644 index 0000000000..3c22e7cbeb --- /dev/null +++ b/poky/meta-selftest/recipes-test/error/error.bb @@ -0,0 +1,10 @@ +SUMMARY = "Error Test case that fails on do_compile" +DESCRIPTION = "This generates a compile time error to be used to for testing." +LICENSE = "MIT" + +INHIBIT_DEFAULT_DEPS = "1" +EXCLUDE_FROM_WORLD = "1" + +do_compile() { + bbfatal "Failing as expected."; +} diff --git a/poky/meta-selftest/recipes-test/images/error-image.bb b/poky/meta-selftest/recipes-test/images/error-image.bb new file mode 100644 index 0000000000..13d9cc010e --- /dev/null +++ b/poky/meta-selftest/recipes-test/images/error-image.bb @@ -0,0 +1,8 @@ +SUMMARY = "An image that includes the error recipe and will therefore fail" +DESCRIPTION = "This generates an error. Not currently used by oe-selftest" + +IMAGE_INSTALL = "error" + +IMAGE_LINGUAS = " " + +inherit core-image diff --git a/poky/meta-selftest/recipes-test/images/oe-selftest-image.bb b/poky/meta-selftest/recipes-test/images/oe-selftest-image.bb new file mode 100644 index 0000000000..5d4d10eef6 --- /dev/null +++ b/poky/meta-selftest/recipes-test/images/oe-selftest-image.bb @@ -0,0 +1,9 @@ +SUMMARY = "An image used during oe-selftest tests" + +IMAGE_INSTALL = "packagegroup-core-boot dropbear" +IMAGE_FEATURES = "debug-tweaks" + +IMAGE_LINGUAS = " " + +inherit core-image + diff --git a/poky/meta-selftest/recipes-test/images/test-empty-image.bb b/poky/meta-selftest/recipes-test/images/test-empty-image.bb new file mode 100644 index 0000000000..88d8d612e8 --- /dev/null +++ b/poky/meta-selftest/recipes-test/images/test-empty-image.bb @@ -0,0 +1,6 @@ +SUMMARY = "An empty image." +IMAGE_INSTALL = "" +IMAGE_LINGUAS = "" +PACKAGE_INSTALL = "" + +inherit image diff --git a/poky/meta-selftest/recipes-test/images/wic-image-minimal.bb b/poky/meta-selftest/recipes-test/images/wic-image-minimal.bb new file mode 100644 index 0000000000..e1da203b59 --- /dev/null +++ b/poky/meta-selftest/recipes-test/images/wic-image-minimal.bb @@ -0,0 +1,15 @@ +SUMMARY = "An example of partitioned image." + +SRC_URI = "file://${FILE_DIRNAME}/${BPN}.wks" + +IMAGE_INSTALL = "packagegroup-core-boot" + +IMAGE_FSTYPES = "wic" + +WKS_FILE_DEPENDS = "syslinux syslinux-native dosfstools-native mtools-native gptfdisk-native" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +IMAGE_ROOTFS_EXTRA_SPACE = "2000" + +inherit image diff --git a/poky/meta-selftest/recipes-test/images/wic-image-minimal.wks b/poky/meta-selftest/recipes-test/images/wic-image-minimal.wks new file mode 100644 index 0000000000..ae69cb6e3c --- /dev/null +++ b/poky/meta-selftest/recipes-test/images/wic-image-minimal.wks @@ -0,0 +1,10 @@ +# short-description: Example of partitioned image with complex layout +# long-description: This image contains boot partition and 3 rootfs partitions +# created from core-image-minimal and wic-image-minimal image recipes. + +part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 +part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid +part /media --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label uuid-test --align 1024 --use-uuid --fsuuid 2c71ef06-a81d-4735-9d3a-379b69c6bdba +part /mnt --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label core --align 1024 + +bootloader --ptable gpt --timeout=0 --append="rootwait console=tty0" diff --git a/poky/meta-selftest/recipes-test/m4/m4_%.bbappend b/poky/meta-selftest/recipes-test/m4/m4_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/poky/meta-selftest/recipes-test/m4/m4_%.bbappend @@ -0,0 +1,2 @@ +# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. +include test_recipe.inc diff --git a/poky/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch b/poky/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch new file mode 100644 index 0000000000..b1d5eab2b8 --- /dev/null +++ b/poky/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch @@ -0,0 +1,22 @@ +From efc8831f33106e6b48de8e612c2d816fe7d1ae68 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 9 Feb 2018 17:37:48 +0200 +Subject: [PATCH] Test patch here! + +This is an invalid patch used by oe-selftest +--- + README | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/README b/README +index 48fff57..26d1234 100644 +--- a/README ++++ b/README +@@ -1,3 +1,4 @@ ++This is a test patch for purposes of oe-selftest + THIS LINE MAKES THIS PATCH INVALID README for the man-db manual pager suite + ======================================== + +-- +2.15.1 + diff --git a/poky/meta-selftest/recipes-test/man-db/man-db_%.bbappend b/poky/meta-selftest/recipes-test/man-db/man-db_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/poky/meta-selftest/recipes-test/man-db/man-db_%.bbappend @@ -0,0 +1,2 @@ +# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. +include test_recipe.inc diff --git a/poky/meta-selftest/recipes-test/postinst/postinst_1.0.bb b/poky/meta-selftest/recipes-test/postinst/postinst_1.0.bb new file mode 100644 index 0000000000..913bfabf89 --- /dev/null +++ b/poky/meta-selftest/recipes-test/postinst/postinst_1.0.bb @@ -0,0 +1,72 @@ +SUMMARY = "Packages to exercise postinstall functions" +LICENSE = "MIT" + +inherit allarch + +PACKAGES = "${PN}-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-rootfs-failing" + +ALLOW_EMPTY_${PN}-rootfs = "1" +ALLOW_EMPTY_${PN}-delayed-a = "1" +ALLOW_EMPTY_${PN}-delayed-b = "1" +ALLOW_EMPTY_${PN}-rootfs-failing = "1" + +RDEPENDS_${PN}-delayed-a = "${PN}-rootfs" +RDEPENDS_${PN}-delayed-b = "${PN}-delayed-a" + +TESTDIR = "${sysconfdir}/postinst-test" + +# At rootfs time touch $TESTDIR/rootfs. Errors if the file already exists, or +# if the function runs on first boot. +pkg_postinst_${PN}-rootfs () { + set -e + + if [ -z "$D" ]; then + echo "${PN}-rootfs should have finished at rootfs time" + exit 1 + fi + + if [ -e $D${TESTDIR}/rootfs ]; then + echo "$D${TESTDIR}/rootfs exists, but should not" + exit 1 + fi + + mkdir -p $D${TESTDIR} + touch $D${TESTDIR}/rootfs +} + +# Depends on rootfs, delays until first boot, verifies that the rootfs file was +# written. +pkg_postinst_ontarget_${PN}-delayed-a () { + set -e + + if [ ! -e ${TESTDIR}/rootfs ]; then + echo "${PN}-delayed-a: ${TESTDIR}/rootfs not found" + exit 1 + fi + + touch ${TESTDIR}/delayed-a +} + +# Depends on delayed-a, delays until first boot, verifies that the delayed-a file was +# written. This verifies the ordering between delayed postinsts. +pkg_postinst_ontarget_${PN}-delayed-b () { + set -e + + if [ ! -e ${TESTDIR}/delayed-a ]; then + echo "${PN}-delayed-b: ${TESTDIR}/delayed-a not found" + exit 1 + fi + + touch ${TESTDIR}/delayed-b +} + +# This scriptlet intentionally includes a bogus command in the middle to test +# that we catch and report such errors properly. +pkg_postinst_${PN}-rootfs-failing () { + mkdir -p $D${TESTDIR} + touch $D${TESTDIR}/rootfs-before-failure + run_a_really_broken_command + # Scriptlet execution should stop here; the following commands are NOT supposed to run. + # (oe-selftest checks for it). + touch $D${TESTDIR}/rootfs-after-failure +} diff --git a/poky/meta-selftest/recipes-test/recipetool/files/add-file.patch b/poky/meta-selftest/recipes-test/recipetool/files/add-file.patch new file mode 100644 index 0000000000..bdc99c94f0 --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/add-file.patch @@ -0,0 +1,8 @@ +diff --git a/file2 b/file2 +new file mode 100644 +index 0000000..049b42e +--- /dev/null ++++ b/file2 +@@ -0,0 +1,2 @@ ++Test file 2 ++456 diff --git a/poky/meta-selftest/recipes-test/recipetool/files/file1 b/poky/meta-selftest/recipes-test/recipetool/files/file1 new file mode 100644 index 0000000000..7571aa7a88 --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/file1 @@ -0,0 +1,2 @@ +First test file +123 diff --git a/poky/meta-selftest/recipes-test/recipetool/files/installscript.sh b/poky/meta-selftest/recipes-test/recipetool/files/installscript.sh new file mode 100644 index 0000000000..9de30d69ca --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/installscript.sh @@ -0,0 +1,3 @@ +#!/bin/sh +echo "Third file" > $1/selftest-replaceme-scripted + diff --git a/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-func b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-func new file mode 100644 index 0000000000..2802bb348b --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-func @@ -0,0 +1 @@ +A file installed by a function called by do_install diff --git a/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-globfile b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-globfile new file mode 100644 index 0000000000..996298bf1f --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-globfile @@ -0,0 +1 @@ +A file matched by a glob in do_install diff --git a/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-todir-globfile b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-todir-globfile new file mode 100644 index 0000000000..585ae3e9b0 --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-inst-todir-globfile @@ -0,0 +1 @@ +A file matched by a glob in do_install to a directory diff --git a/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-orig b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-orig new file mode 100644 index 0000000000..593d6a0bb4 --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-orig @@ -0,0 +1 @@ +Straight through with same nam diff --git a/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile new file mode 100644 index 0000000000..1e20a2b03e --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-src-globfile @@ -0,0 +1 @@ +A file matched by a glob in SRC_URI diff --git a/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-todir b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-todir new file mode 100644 index 0000000000..85bd5eba46 --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/selftest-replaceme-todir @@ -0,0 +1 @@ +File in SRC_URI installed just to directory path diff --git a/poky/meta-selftest/recipes-test/recipetool/files/subdir/fileinsubdir b/poky/meta-selftest/recipes-test/recipetool/files/subdir/fileinsubdir new file mode 100644 index 0000000000..d516b4951b --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/files/subdir/fileinsubdir @@ -0,0 +1 @@ +A file in a subdirectory diff --git a/poky/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb b/poky/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb new file mode 100644 index 0000000000..7375c47933 --- /dev/null +++ b/poky/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb @@ -0,0 +1,44 @@ +SUMMARY = "Test recipe for recipetool appendfile" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +INHIBIT_DEFAULT_DEPS = "1" + +SRC_URI = "file://installscript.sh \ + file://selftest-replaceme-orig \ + file://selftest-replaceme-todir \ + file://file1 \ + file://add-file.patch \ + file://subdir \ + file://selftest-replaceme-src-glob* \ + file://selftest-replaceme-inst-globfile \ + file://selftest-replaceme-inst-todir-globfile \ + file://selftest-replaceme-inst-func" + +EXCLUDE_FROM_WORLD = "1" + +install_extrafunc() { + install -m 0644 ${WORKDIR}/selftest-replaceme-inst-func ${D}${datadir}/selftest-replaceme-inst-func +} + +do_install() { + install -d ${D}${datadir}/ + install -m 0644 ${WORKDIR}/selftest-replaceme-orig ${D}${datadir}/selftest-replaceme-orig + install -m 0644 ${WORKDIR}/selftest-replaceme-todir ${D}${datadir} + install -m 0644 ${WORKDIR}/file1 ${D}${datadir}/selftest-replaceme-renamed + install -m 0644 ${WORKDIR}/subdir/fileinsubdir ${D}${datadir}/selftest-replaceme-subdir + install -m 0644 ${WORKDIR}/selftest-replaceme-src-globfile ${D}${datadir}/selftest-replaceme-src-globfile + cp ${WORKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile + cp ${WORKDIR}/selftest-replaceme-inst-todir-glob* ${D}${datadir} + install -d ${D}${sysconfdir} + install -m 0644 ${S}/file2 ${D}${sysconfdir}/selftest-replaceme-patched + sh ${WORKDIR}/installscript.sh ${D}${datadir} + install_extrafunc +} + +pkg_postinst_${PN} () { + echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst +} + +FILES_${PN} += "${datadir}" + diff --git a/poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb b/poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb new file mode 100644 index 0000000000..8e0d1cdd8e --- /dev/null +++ b/poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb @@ -0,0 +1,22 @@ +SUMMARY = "Line-oriented text editor -- selftest GPLv2 version" +HOMEPAGE = "http://www.gnu.org/software/ed/" +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \ + file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e" + +PR = "r2" +SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2" + +SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" +SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" + +inherit autotools texinfo + +S = "${WORKDIR}/ed-${PV}" + +EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'" + +CONFIGUREOPTS_remove = "--disable-dependency-tracking" +CONFIGUREOPTS_remove = "--disable-silent-rules" +EXTRA_OECONF_remove = "--disable-static" diff --git a/poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb b/poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb new file mode 100644 index 0000000000..8a2b565ce5 --- /dev/null +++ b/poky/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb @@ -0,0 +1,36 @@ +SUMMARY = "Line-oriented text editor -- selftest variant" +HOMEPAGE = "http://www.gnu.org/software/ed/" + +LICENSE = "GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \ + file://ed.h;endline=20;md5=4e36b7a40e137f42aee718165590d125 \ + file://main.c;endline=17;md5=c5b8f78f115df187af76868a2aead16a" + +SECTION = "base" + +# LSB states that ed should be in /bin/ +bindir = "${base_bindir}" + +SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.lz" +RECIPE_NO_UPDATE_REASON = "This recipe is used in selftest and shouldn't be updated otherwise" + +SRC_URI[md5sum] = "7f4a54fa7f366479f03654b8af645fd0" +SRC_URI[sha256sum] = "ffb97eb8f2a2b5a71a9b97e3872adce953aa1b8958e04c5b7bf11d556f32552a" + +S = "${WORKDIR}/ed-${PV}" + +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +inherit texinfo + +do_configure() { + ${S}/configure +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install + # Info dir listing isn't interesting at this point so remove it if it exists. + if [ -e "${D}${infodir}/dir" ]; then + rm -f ${D}${infodir}/dir + fi +} diff --git a/poky/meta-selftest/recipes-test/xcursor-transparent-theme/xcursor-transparent-theme_%.bbappend b/poky/meta-selftest/recipes-test/xcursor-transparent-theme/xcursor-transparent-theme_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/poky/meta-selftest/recipes-test/xcursor-transparent-theme/xcursor-transparent-theme_%.bbappend @@ -0,0 +1,2 @@ +# This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. +include test_recipe.inc diff --git a/poky/meta-selftest/wic/test_rawcopy_plugin.wks.in b/poky/meta-selftest/wic/test_rawcopy_plugin.wks.in new file mode 100644 index 0000000000..83be4be914 --- /dev/null +++ b/poky/meta-selftest/wic/test_rawcopy_plugin.wks.in @@ -0,0 +1,6 @@ +# short-description: This file is used in oe-selftest wic module to test rawcopy plugin + +part /boot --active --source bootimg-pcbios +part / --source rawcopy --sourceparams="file=core-image-minimal-${MACHINE}.ext4" --use-uuid + +bootloader --timeout=0 --append="console=ttyS0,115200n8" diff --git a/poky/meta-selftest/wic/wictestdisk.wks b/poky/meta-selftest/wic/wictestdisk.wks new file mode 100644 index 0000000000..d4de24d830 --- /dev/null +++ b/poky/meta-selftest/wic/wictestdisk.wks @@ -0,0 +1,7 @@ +# short-description: image for use in machine agnostic wic test cases + +# /boot is intentionally an empty partition +part /boot --ondisk sda --label boot --active --align 1024 --size 16 +part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid + +# bootloader is intentionally left out -- cgit v1.2.3