diff options
Diffstat (limited to 'meta-selftest/recipes-test')
100 files changed, 1242 insertions, 138 deletions
diff --git a/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend b/meta-selftest/recipes-test/aspell/aspell_%.bbappend index 205720982c..205720982c 100644 --- a/meta-selftest/recipes-test/aspell/aspell_0.60.8.bbappend +++ b/meta-selftest/recipes-test/aspell/aspell_%.bbappend | |||
diff --git a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb index 9f905a5198..e1e473fe80 100644 --- a/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb +++ b/meta-selftest/recipes-test/aspell/aspell_0.0.0.1.bb | |||
@@ -4,8 +4,9 @@ | |||
4 | 4 | ||
5 | SUMMARY = "GNU Aspell spell-checker" | 5 | SUMMARY = "GNU Aspell spell-checker" |
6 | SECTION = "console/utils" | 6 | SECTION = "console/utils" |
7 | HOMEPAGE = "https://ftp.gnu.org/gnu/aspell/" | ||
7 | 8 | ||
8 | LICENSE = "LGPLv2 | LGPLv2.1" | 9 | LICENSE = "LGPL-2.0-only | LGPL-2.1-only" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" | 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" |
10 | 11 | ||
11 | SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" | 12 | SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" |
@@ -19,15 +20,15 @@ PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses" | |||
19 | 20 | ||
20 | PACKAGES += "libaspell libpspell libpspell-dev aspell-utils" | 21 | PACKAGES += "libaspell libpspell libpspell-dev aspell-utils" |
21 | 22 | ||
22 | FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*" | 23 | FILES:${PN}-dbg += "${libdir}/aspell-0.60/.debu*" |
23 | FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*" | 24 | FILES:libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*" |
24 | FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*" | 25 | FILES:aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*" |
25 | FILES_${PN} = "${bindir}/aspell" | 26 | FILES:${PN} = "${bindir}/aspell" |
26 | FILES_libpspell = "${libdir}/libpspell.so.*" | 27 | FILES:libpspell = "${libdir}/libpspell.so.*" |
27 | FILES_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell" | 28 | FILES:libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell" |
28 | 29 | ||
29 | ARM_INSTRUCTION_SET_armv4 = "arm" | 30 | ARM_INSTRUCTION_SET:armv4 = "arm" |
30 | ARM_INSTRUCTION_SET_armv5 = "arm" | 31 | ARM_INSTRUCTION_SET:armv5 = "arm" |
31 | ARM_INSTRUCTION_SET_armv6 = "arm" | 32 | ARM_INSTRUCTION_SET:armv6 = "arm" |
32 | 33 | ||
33 | inherit autotools gettext | 34 | inherit autotools gettext |
diff --git a/meta-selftest/recipes-test/base-files/base-files_%.bbappend b/meta-selftest/recipes-test/base-files/base-files_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/meta-selftest/recipes-test/base-files/base-files_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. | ||
2 | include test_recipe.inc | ||
diff --git a/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb b/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb new file mode 100644 index 0000000000..94f9a7a770 --- /dev/null +++ b/meta-selftest/recipes-test/bbclasses/systemd-and-sysvinit.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | LICENSE = "MIT" | ||
2 | |||
3 | inherit allarch systemd update-rc.d | ||
4 | |||
5 | do_install() { | ||
6 | install -d ${D}${systemd_system_unitdir} | ||
7 | touch ${D}${systemd_system_unitdir}/${BPN}.service | ||
8 | |||
9 | install -d ${D}${INIT_D_DIR} | ||
10 | touch ${D}${INIT_D_DIR}/${BPN} | ||
11 | } | ||
12 | |||
13 | INITSCRIPT_NAME = "${BPN}" | ||
14 | |||
15 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" | ||
16 | |||
17 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/bbclasses/systemd-only.bb b/meta-selftest/recipes-test/bbclasses/systemd-only.bb new file mode 100644 index 0000000000..6968247b08 --- /dev/null +++ b/meta-selftest/recipes-test/bbclasses/systemd-only.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | LICENSE = "MIT" | ||
2 | |||
3 | inherit allarch systemd | ||
4 | |||
5 | do_install() { | ||
6 | install -d ${D}${systemd_system_unitdir} | ||
7 | touch ${D}${systemd_system_unitdir}/${BPN}.service | ||
8 | } | ||
9 | |||
10 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" | ||
11 | |||
12 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/binutils/binutils_%.bbappend b/meta-selftest/recipes-test/binutils/binutils_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/meta-selftest/recipes-test/binutils/binutils_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. | ||
2 | include test_recipe.inc | ||
diff --git a/meta-selftest/recipes-test/container-image/container-image-testpkg.bb b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb index f8dd2290b3..929bc29753 100644 --- a/meta-selftest/recipes-test/container-image/container-image-testpkg.bb +++ b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb | |||
@@ -2,7 +2,7 @@ LICENSE = "MIT" | |||
2 | 2 | ||
3 | INHIBIT_DEFAULT_DEPS = "1" | 3 | INHIBIT_DEFAULT_DEPS = "1" |
4 | 4 | ||
5 | do_install_append() { | 5 | do_install:append() { |
6 | install -d ${D}${bindir} | 6 | install -d ${D}${bindir} |
7 | touch ${D}${bindir}/theapp | 7 | touch ${D}${bindir}/theapp |
8 | } | 8 | } |
diff --git a/meta-selftest/recipes-test/container-image/container-test-image.bb b/meta-selftest/recipes-test/container-image/container-test-image.bb index d5f939c6e9..26b6409d1d 100644 --- a/meta-selftest/recipes-test/container-image/container-test-image.bb +++ b/meta-selftest/recipes-test/container-image/container-test-image.bb | |||
@@ -4,5 +4,6 @@ LICENSE = "MIT" | |||
4 | 4 | ||
5 | IMAGE_FSTYPES = "container" | 5 | IMAGE_FSTYPES = "container" |
6 | IMAGE_LINGUAS = "" | 6 | IMAGE_LINGUAS = "" |
7 | IMAGE_FEATURES = "" | ||
7 | 8 | ||
8 | inherit core-image | 9 | inherit core-image |
diff --git a/meta-selftest/recipes-test/cpp/.gitignore b/meta-selftest/recipes-test/cpp/.gitignore new file mode 100644 index 0000000000..30d388a12b --- /dev/null +++ b/meta-selftest/recipes-test/cpp/.gitignore | |||
@@ -0,0 +1 @@ | |||
build* \ No newline at end of file | |||
diff --git a/meta-selftest/recipes-test/cpp/cmake-example.bb b/meta-selftest/recipes-test/cpp/cmake-example.bb new file mode 100644 index 0000000000..aecfcf780a --- /dev/null +++ b/meta-selftest/recipes-test/cpp/cmake-example.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | SUMMARY = "A C++ example compiled with cmake." | ||
8 | |||
9 | require cpp-example.inc | ||
10 | |||
11 | SRC_URI += "file://CMakeLists.txt" | ||
12 | |||
13 | inherit cmake-qemu | ||
14 | |||
15 | PACKAGECONFIG[failing_test] = "-DFAILING_TEST=ON" | ||
16 | |||
17 | FILES:${PN}-ptest += "${bindir}/test-cmake-example" | ||
18 | |||
19 | do_run_tests () { | ||
20 | bbnote ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD} | ||
21 | eval ${DESTDIR:+DESTDIR=${DESTDIR} }${CMAKE_VERBOSE} cmake --build '${B}' --target test -- ${EXTRA_OECMAKE_BUILD} | ||
22 | } | ||
23 | do_run_tests[doc] = "Run cmake --target=test using qemu-user" | ||
24 | |||
25 | addtask do_run_tests after do_compile | ||
diff --git a/meta-selftest/recipes-test/cpp/cmake-example/run-ptest b/meta-selftest/recipes-test/cpp/cmake-example/run-ptest new file mode 100644 index 0000000000..94b620a198 --- /dev/null +++ b/meta-selftest/recipes-test/cpp/cmake-example/run-ptest | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Copyright OpenEmbedded Contributors | ||
4 | # | ||
5 | # SPDX-License-Identifier: MIT | ||
6 | # | ||
7 | |||
8 | test-cmake-example | ||
9 | |||
10 | # Note: run-ptests exits with exit value from test-cmake-example | ||
diff --git a/meta-selftest/recipes-test/cpp/cpp-example.inc b/meta-selftest/recipes-test/cpp/cpp-example.inc new file mode 100644 index 0000000000..76ff64e87f --- /dev/null +++ b/meta-selftest/recipes-test/cpp/cpp-example.inc | |||
@@ -0,0 +1,24 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | LICENSE = "MIT" | ||
8 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
9 | |||
10 | DEPENDS += "json-c" | ||
11 | |||
12 | PV = "1.0" | ||
13 | |||
14 | SRC_URI = "\ | ||
15 | file://cpp-example.cpp \ | ||
16 | file://cpp-example-lib.hpp \ | ||
17 | file://cpp-example-lib.cpp \ | ||
18 | file://test-cpp-example.cpp \ | ||
19 | file://run-ptest \ | ||
20 | " | ||
21 | |||
22 | S = "${UNPACKDIR}" | ||
23 | |||
24 | inherit ptest | ||
diff --git a/meta-selftest/recipes-test/cpp/files/CMakeLists.txt b/meta-selftest/recipes-test/cpp/files/CMakeLists.txt new file mode 100644 index 0000000000..6fa6917d89 --- /dev/null +++ b/meta-selftest/recipes-test/cpp/files/CMakeLists.txt | |||
@@ -0,0 +1,61 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | cmake_minimum_required(VERSION 3.22) | ||
8 | |||
9 | project(cmake-example | ||
10 | VERSION 1.0.0 | ||
11 | LANGUAGES CXX | ||
12 | ) | ||
13 | |||
14 | option(BUILD_SHARED_LIBS "Build using shared libraries" ON) | ||
15 | option(FAILING_TEST "Compile a failing unit test to test the test infrastructure" OFF) | ||
16 | |||
17 | set(CMAKE_CXX_STANDARD 17) | ||
18 | set(CMAKE_CXX_STANDARD_REQUIRED On) | ||
19 | set(CMAKE_CXX_EXTENSIONS Off) | ||
20 | |||
21 | include(GNUInstallDirs) | ||
22 | |||
23 | # Linking a small library makes the example more useful for testing. | ||
24 | find_package(json-c) | ||
25 | |||
26 | # A simple library linking json-c library found by pkgconfig | ||
27 | add_library(cmake-example-lib cpp-example-lib.cpp cpp-example-lib.hpp) | ||
28 | set_target_properties(cmake-example-lib PROPERTIES | ||
29 | VERSION ${PROJECT_VERSION} | ||
30 | SOVERSION ${PROJECT_VERSION_MAJOR} | ||
31 | ) | ||
32 | target_link_libraries(cmake-example-lib PRIVATE json-c::json-c) | ||
33 | |||
34 | install(TARGETS cmake-example-lib | ||
35 | INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
36 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
37 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
38 | ) | ||
39 | |||
40 | # A simple executable linking the library | ||
41 | add_executable(cmake-example cpp-example.cpp) | ||
42 | target_link_libraries(cmake-example PRIVATE cmake-example-lib) | ||
43 | |||
44 | install(TARGETS cmake-example | ||
45 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
46 | ) | ||
47 | |||
48 | # A simple test executable for testing the library | ||
49 | add_executable(test-cmake-example test-cpp-example.cpp) | ||
50 | target_link_libraries(test-cmake-example PRIVATE cmake-example-lib) | ||
51 | |||
52 | if (FAILING_TEST) | ||
53 | target_compile_definitions(test-cmake-example PRIVATE FAIL_COMPARISON_STR="foo") | ||
54 | endif(FAILING_TEST) | ||
55 | |||
56 | install(TARGETS test-cmake-example | ||
57 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
58 | ) | ||
59 | |||
60 | include(CTest) | ||
61 | add_test(NAME test-cmake-example COMMAND test-cmake-example) | ||
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp new file mode 100644 index 0000000000..d3dc976864 --- /dev/null +++ b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Copyright OpenEmbedded Contributors | ||
3 | * | ||
4 | * SPDX-License-Identifier: MIT | ||
5 | */ | ||
6 | |||
7 | #include <iostream> | ||
8 | #include <string> | ||
9 | #include <json-c/json.h> | ||
10 | #include "cpp-example-lib.hpp" | ||
11 | |||
12 | const std::string &CppExample::get_string() | ||
13 | { | ||
14 | return test_string; | ||
15 | } | ||
16 | |||
17 | const char *CppExample::get_json_c_version() | ||
18 | { | ||
19 | return json_c_version(); | ||
20 | } | ||
21 | |||
22 | void CppExample::print_json() | ||
23 | { | ||
24 | struct json_object *jobj; | ||
25 | const int flag = JSON_C_TO_STRING_SPACED | JSON_C_TO_STRING_PRETTY; | ||
26 | |||
27 | jobj = json_object_new_object(); | ||
28 | json_object_object_add(jobj, "test_string", json_object_new_string(test_string.c_str())); | ||
29 | |||
30 | std::cout << json_object_to_json_string_ext(jobj, flag) << std::endl; | ||
31 | |||
32 | json_object_put(jobj); // Delete the json object | ||
33 | } | ||
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp new file mode 100644 index 0000000000..0ad9e7b7b2 --- /dev/null +++ b/meta-selftest/recipes-test/cpp/files/cpp-example-lib.hpp | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright OpenEmbedded Contributors | ||
3 | * | ||
4 | * SPDX-License-Identifier: MIT | ||
5 | */ | ||
6 | |||
7 | #pragma once | ||
8 | |||
9 | #include <string> | ||
10 | |||
11 | struct CppExample | ||
12 | { | ||
13 | inline static const std::string test_string = "cpp-example-lib Magic: 123456789"; | ||
14 | |||
15 | /* Retrieve a constant string */ | ||
16 | const std::string &get_string(); | ||
17 | /* Retrieve a constant string from a library */ | ||
18 | const char *get_json_c_version(); | ||
19 | /* Call a more advanced function from a library */ | ||
20 | void print_json(); | ||
21 | }; | ||
diff --git a/meta-selftest/recipes-test/cpp/files/cpp-example.cpp b/meta-selftest/recipes-test/cpp/files/cpp-example.cpp new file mode 100644 index 0000000000..9889554e0c --- /dev/null +++ b/meta-selftest/recipes-test/cpp/files/cpp-example.cpp | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright OpenEmbedded Contributors | ||
3 | * | ||
4 | * SPDX-License-Identifier: MIT | ||
5 | */ | ||
6 | |||
7 | #include "cpp-example-lib.hpp" | ||
8 | |||
9 | #include <iostream> | ||
10 | |||
11 | int main() | ||
12 | { | ||
13 | auto cpp_example = CppExample(); | ||
14 | std::cout << "C++ example linking " << cpp_example.get_string() << std::endl; | ||
15 | std::cout << "Linking json-c version " << cpp_example.get_json_c_version() << std::endl; | ||
16 | cpp_example.print_json(); | ||
17 | return 0; | ||
18 | } | ||
diff --git a/meta-selftest/recipes-test/cpp/files/meson.build b/meta-selftest/recipes-test/cpp/files/meson.build new file mode 100644 index 0000000000..0e2b55f3a2 --- /dev/null +++ b/meta-selftest/recipes-test/cpp/files/meson.build | |||
@@ -0,0 +1,38 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | project('meson-example', 'cpp', | ||
8 | version: '1.0.0', | ||
9 | default_options: ['cpp_std=c++17'] | ||
10 | ) | ||
11 | |||
12 | jsoncdep = dependency('json-c') | ||
13 | |||
14 | if get_option('FAILING_TEST').enabled() | ||
15 | add_project_arguments('-DFAIL_COMPARISON_STR=foo', language: 'cpp') | ||
16 | endif | ||
17 | |||
18 | mesonexlib = shared_library('mesonexlib', | ||
19 | 'cpp-example-lib.cpp', 'cpp-example-lib.hpp', | ||
20 | version: meson.project_version(), | ||
21 | soversion: meson.project_version().split('.')[0], | ||
22 | dependencies : jsoncdep, | ||
23 | install : true | ||
24 | ) | ||
25 | |||
26 | executable('mesonex', | ||
27 | 'cpp-example.cpp', | ||
28 | link_with : mesonexlib, | ||
29 | install : true | ||
30 | ) | ||
31 | |||
32 | test_mesonex = executable('test-mesonex', | ||
33 | 'test-cpp-example.cpp', | ||
34 | link_with : mesonexlib, | ||
35 | install : true | ||
36 | ) | ||
37 | |||
38 | test('meson example test', test_mesonex) | ||
diff --git a/meta-selftest/recipes-test/cpp/files/meson.options b/meta-selftest/recipes-test/cpp/files/meson.options new file mode 100644 index 0000000000..58a0bf9e61 --- /dev/null +++ b/meta-selftest/recipes-test/cpp/files/meson.options | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | option('FAILING_TEST', type : 'feature', value : 'disabled', | ||
3 | description : 'Compile a failing unit test to test the test infrastructure') | ||
diff --git a/meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp b/meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp new file mode 100644 index 0000000000..83c9bfa844 --- /dev/null +++ b/meta-selftest/recipes-test/cpp/files/test-cpp-example.cpp | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright OpenEmbedded Contributors | ||
3 | * | ||
4 | * SPDX-License-Identifier: MIT | ||
5 | */ | ||
6 | |||
7 | #include "cpp-example-lib.hpp" | ||
8 | |||
9 | #include <iostream> | ||
10 | |||
11 | /* This is for creating a failing test for testing the test infrastructure */ | ||
12 | #ifndef FAIL_COMPARISON_STR | ||
13 | #define FAIL_COMPARISON_STR "" | ||
14 | #endif | ||
15 | |||
16 | int main() { | ||
17 | auto cpp_example = CppExample(); | ||
18 | auto ret_string = cpp_example.get_string(); | ||
19 | if(0 == ret_string.compare(CppExample::test_string + FAIL_COMPARISON_STR)) { | ||
20 | std::cout << "PASS: " << ret_string << " = " << CppExample::test_string << std::endl; | ||
21 | } else { | ||
22 | std::cout << "FAIL: " << ret_string << " != " << CppExample::test_string << std::endl; | ||
23 | return 1; | ||
24 | } | ||
25 | } | ||
diff --git a/meta-selftest/recipes-test/cpp/meson-example.bb b/meta-selftest/recipes-test/cpp/meson-example.bb new file mode 100644 index 0000000000..14a7ca8dc9 --- /dev/null +++ b/meta-selftest/recipes-test/cpp/meson-example.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | SUMMARY = "A C++ example compiled with meson." | ||
8 | |||
9 | require cpp-example.inc | ||
10 | |||
11 | SRC_URI += "\ | ||
12 | file://meson.build \ | ||
13 | file://meson.options \ | ||
14 | " | ||
15 | |||
16 | inherit pkgconfig meson | ||
17 | |||
18 | PACKAGECONFIG[failing_test] = "-DFAILING_TEST=enabled" | ||
19 | |||
20 | FILES:${PN}-ptest += "${bindir}/test-mesonex" | ||
21 | |||
22 | do_run_tests () { | ||
23 | meson test -C "${B}" --no-rebuild | ||
24 | } | ||
25 | do_run_tests[doc] = "Run meson test using qemu-user" | ||
26 | |||
27 | addtask do_run_tests after do_compile | ||
diff --git a/meta-selftest/recipes-test/cpp/meson-example/run-ptest b/meta-selftest/recipes-test/cpp/meson-example/run-ptest new file mode 100644 index 0000000000..b1804f0096 --- /dev/null +++ b/meta-selftest/recipes-test/cpp/meson-example/run-ptest | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Copyright OpenEmbedded Contributors | ||
4 | # | ||
5 | # SPDX-License-Identifier: MIT | ||
6 | # | ||
7 | |||
8 | test-mesonex | ||
9 | |||
10 | # Note: run-ptests exits with exit value from test-mesonex | ||
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb index d36c9edee4..f12bee0b3d 100644 --- a/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb +++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides.bb | |||
@@ -4,5 +4,5 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
4 | EXCLUDE_FROM_WORLD = "1" | 4 | EXCLUDE_FROM_WORLD = "1" |
5 | 5 | ||
6 | SRC_URI = "file://source;subdir=${BP}" | 6 | SRC_URI = "file://source;subdir=${BP}" |
7 | SRC_URI_append_qemuarm = " file://arm.patch;striplevel=0" | 7 | SRC_URI:append:qemuarm = " file://arm.patch;striplevel=0" |
8 | SRC_URI_append_qemux86 = " file://x86.patch;striplevel=0" | 8 | SRC_URI:append:qemux86 = " file://x86.patch;striplevel=0" |
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch index e33a2753f9..17ed5a54f1 100644 --- a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch +++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemuarm/arm.patch | |||
@@ -1,3 +1,5 @@ | |||
1 | Upstream-Status: Inappropriate [Test artefact] | ||
2 | |||
1 | --- source.orig 2020-10-06 13:26:10.792688630 +0100 | 3 | --- source.orig 2020-10-06 13:26:10.792688630 +0100 |
2 | +++ source 2020-10-06 13:26:18.853424694 +0100 | 4 | +++ source 2020-10-06 13:26:18.853424694 +0100 |
3 | @@ -1 +1 @@ | 5 | @@ -1 +1 @@ |
diff --git a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch index 1a0a175fa8..0af5ebbfaf 100644 --- a/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch +++ b/meta-selftest/recipes-test/devtool/devtool-patch-overrides/qemux86/x86.patch | |||
@@ -1,3 +1,5 @@ | |||
1 | Upstream-Status: Inappropriate [Test artefact] | ||
2 | |||
1 | --- source.orig 2020-10-06 13:26:10.792688630 +0100 | 3 | --- source.orig 2020-10-06 13:26:10.792688630 +0100 |
2 | +++ source 2020-10-06 13:26:18.853424694 +0100 | 4 | +++ source 2020-10-06 13:26:18.853424694 +0100 |
3 | @@ -1 +1 @@ | 5 | @@ -1 +1 @@ |
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb b/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb index 6a3d58c884..c7740eb118 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb +++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored.bb | |||
@@ -4,6 +4,6 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
4 | SRC_URI = "file://${BPN}.tar.gz \ | 4 | SRC_URI = "file://${BPN}.tar.gz \ |
5 | file://${BPN}.patch" | 5 | file://${BPN}.patch" |
6 | 6 | ||
7 | S = "${WORKDIR}/${BPN}" | 7 | S = "${UNPACKDIR}/${BPN}" |
8 | 8 | ||
9 | EXCLUDE_FROM_WORLD = "1" | 9 | EXCLUDE_FROM_WORLD = "1" |
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch index 96ea0eb4e3..bc1ca4bc4a 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch +++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch | |||
@@ -1,3 +1,5 @@ | |||
1 | Upstream-Status: Inappropriate [Test artefact] | ||
2 | |||
1 | diff --git a/ignored b/ignored | 3 | diff --git a/ignored b/ignored |
2 | index a579759..e3d7b43 100644 | 4 | index a579759..e3d7b43 100644 |
3 | --- a/ignored | 5 | --- a/ignored |
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected index 68ec6d9875..8ead9ee1ce 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected +++ b/meta-selftest/recipes-test/devtool/devtool-test-ignored/devtool-test-ignored.patch.expected | |||
@@ -3,6 +3,7 @@ From: Martin Jansa <Martin.Jansa@gmail.com> | |||
3 | Date: Thu, 28 May 2020 01:32:31 +0200 | 3 | Date: Thu, 28 May 2020 01:32:31 +0200 |
4 | Subject: [PATCH] meta-selftest: add test of .gitignore in tarball | 4 | Subject: [PATCH] meta-selftest: add test of .gitignore in tarball |
5 | 5 | ||
6 | Upstream-Status: Inappropriate [Test artefact] | ||
6 | --- | 7 | --- |
7 | ignored | 2 +- | 8 | ignored | 2 +- |
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local/file3 b/meta-selftest/recipes-test/devtool/devtool-test-local/file3 new file mode 100644 index 0000000000..0f30e9eec4 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-local/file3 | |||
@@ -0,0 +1 @@ | |||
The third file. | |||
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb index 6bfc557060..03e082e83f 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb +++ b/meta-selftest/recipes-test/devtool/devtool-test-local_6.03.bb | |||
@@ -1,4 +1,4 @@ | |||
1 | LICENSE = "GPLv2+" | 1 | LICENSE = "GPL-2.0-or-later" |
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | 2 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" |
3 | 3 | ||
4 | INHIBIT_DEFAULT_DEPS = "1" | 4 | INHIBIT_DEFAULT_DEPS = "1" |
@@ -7,9 +7,12 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/syslinux-${PV}.tar.x | |||
7 | file://file1 \ | 7 | file://file1 \ |
8 | file://file2" | 8 | file://file2" |
9 | 9 | ||
10 | SRC_URI:append:class-native = " file://file3" | ||
11 | |||
10 | SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13" | 12 | SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13" |
11 | SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e" | 13 | SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e" |
12 | 14 | ||
13 | S = "${WORKDIR}/syslinux-${PV}" | 15 | S = "${UNPACKDIR}/syslinux-${PV}" |
14 | 16 | ||
15 | EXCLUDE_FROM_WORLD = "1" | 17 | EXCLUDE_FROM_WORLD = "1" |
18 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb index 3f7123cda0..54463fed98 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb +++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly.bb | |||
@@ -4,4 +4,9 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
4 | SRC_URI = "file://file1 \ | 4 | SRC_URI = "file://file1 \ |
5 | file://file2" | 5 | file://file2" |
6 | 6 | ||
7 | SRC_URI:append:class-native = " file://file3" | ||
8 | |||
9 | S = "${UNPACKDIR}" | ||
10 | |||
7 | EXCLUDE_FROM_WORLD = "1" | 11 | EXCLUDE_FROM_WORLD = "1" |
12 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3 b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3 new file mode 100644 index 0000000000..0f30e9eec4 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-localonly/file3 | |||
@@ -0,0 +1 @@ | |||
The third file. | |||
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb b/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb index 3ec22cae7f..3653403a2e 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb +++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename.bb | |||
@@ -4,6 +4,6 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
4 | SRC_URI = "file://${BPN}.tar.gz \ | 4 | SRC_URI = "file://${BPN}.tar.gz \ |
5 | file://0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch" | 5 | file://0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch" |
6 | 6 | ||
7 | S = "${WORKDIR}/${BPN}" | 7 | S = "${UNPACKDIR}/${BPN}" |
8 | 8 | ||
9 | EXCLUDE_FROM_WORLD = "1" | 9 | EXCLUDE_FROM_WORLD = "1" |
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch index 6aaf409ebc..2b7088e367 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch +++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch | |||
@@ -1,3 +1,5 @@ | |||
1 | Upstream-Status: Inappropriate [Test artefact] | ||
2 | |||
1 | diff --git a/patch-me b/patch-me | 3 | diff --git a/patch-me b/patch-me |
2 | index a20b29a..5e35d1b 100644 | 4 | index a20b29a..5e35d1b 100644 |
3 | --- a/patch-me | 5 | --- a/patch-me |
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected index 1bf25a61d0..52b0df74ce 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected +++ b/meta-selftest/recipes-test/devtool/devtool-test-long-filename/0001-I-ll-patch-you-only-if-devtool-lets-me-to-do-it-corr.patch.expected | |||
@@ -3,6 +3,7 @@ From: Martin Jansa <Martin.Jansa@gmail.com> | |||
3 | Date: Thu, 28 May 2020 02:03:39 +0200 | 3 | Date: Thu, 28 May 2020 02:03:39 +0200 |
4 | Subject: [PATCH] meta-selftest: add test for .patch file with long filename | 4 | Subject: [PATCH] meta-selftest: add test for .patch file with long filename |
5 | 5 | ||
6 | Upstream-Status: Inappropriate [Test artefact] | ||
6 | --- | 7 | --- |
7 | patch-me | 2 +- | 8 | patch-me | 2 +- |
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb index fc3799590c..f6960320db 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb +++ b/meta-selftest/recipes-test/devtool/devtool-test-patch-gz.bb | |||
@@ -1,4 +1,4 @@ | |||
1 | LICENSE = "GPLv2+" | 1 | LICENSE = "GPL-2.0-or-later" |
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | 2 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" |
3 | 3 | ||
4 | DEPENDS = "libxres libxext virtual/libx11 ncurses" | 4 | DEPENDS = "libxres libxext virtual/libx11 ncurses" |
@@ -8,7 +8,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/xrestop/xrestop-0.4.tar.gz | |||
8 | " | 8 | " |
9 | UPSTREAM_VERSION_UNKNOWN = "1" | 9 | UPSTREAM_VERSION_UNKNOWN = "1" |
10 | 10 | ||
11 | S = "${WORKDIR}/xrestop-0.4" | 11 | S = "${UNPACKDIR}/xrestop-0.4" |
12 | 12 | ||
13 | SRC_URI[md5sum] = "d8a54596cbaf037e62b80c4585a3ca9b" | 13 | SRC_URI[md5sum] = "d8a54596cbaf037e62b80c4585a3ca9b" |
14 | SRC_URI[sha256sum] = "67c2fc94a7ecedbaae0d1837e82e93d1d98f4a6d759828860e552119af3ce257" | 14 | SRC_URI[sha256sum] = "67c2fc94a7ecedbaae0d1837e82e93d1d98f4a6d759828860e552119af3ce257" |
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-reset-re++.bb b/meta-selftest/recipes-test/devtool/devtool-test-reset-re++.bb new file mode 100644 index 0000000000..0146be4c52 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-reset-re++.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | LICENSE = "CLOSED" | ||
2 | INHIBIT_DEFAULT_DEPS = "1" | ||
3 | |||
4 | SRC_URI = "file://file1" | ||
5 | |||
6 | S = "${UNPACKDIR}" | ||
7 | |||
8 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-reset-re++/file1 b/meta-selftest/recipes-test/devtool/devtool-test-reset-re++/file1 new file mode 100644 index 0000000000..51f466f2e4 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-reset-re++/file1 | |||
@@ -0,0 +1 @@ | |||
A file | |||
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-subdir.bb b/meta-selftest/recipes-test/devtool/devtool-test-subdir.bb index 3f6956524b..966142431b 100644 --- a/meta-selftest/recipes-test/devtool/devtool-test-subdir.bb +++ b/meta-selftest/recipes-test/devtool/devtool-test-subdir.bb | |||
@@ -4,6 +4,6 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
4 | SRC_URI = "file://devtool-test-subdir.tar.gz \ | 4 | SRC_URI = "file://devtool-test-subdir.tar.gz \ |
5 | file://testfile;subdir=${BPN}" | 5 | file://testfile;subdir=${BPN}" |
6 | 6 | ||
7 | S = "${WORKDIR}/${BPN}" | 7 | S = "${UNPACKDIR}/${BPN}" |
8 | 8 | ||
9 | EXCLUDE_FROM_WORLD = "1" | 9 | EXCLUDE_FROM_WORLD = "1" |
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/0001-Add-a-note-line-to-the-quick-reference.patch b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/0001-Add-a-note-line-to-the-quick-reference.patch index 4ea3d74f0f..db66a284b7 100644 --- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/0001-Add-a-note-line-to-the-quick-reference.patch +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/0001-Add-a-note-line-to-the-quick-reference.patch | |||
@@ -4,6 +4,8 @@ Date: Wed, 24 Feb 2016 17:43:03 +1300 | |||
4 | Subject: [PATCH] Add a note line to the quick reference | 4 | Subject: [PATCH] Add a note line to the quick reference |
5 | 5 | ||
6 | A test patch so we have a file to move around. | 6 | A test patch so we have a file to move around. |
7 | |||
8 | Upstream-Status: Inappropriate [Test artefact] | ||
7 | --- | 9 | --- |
8 | doc/quickref.1.in | 1 + | 10 | doc/quickref.1.in | 1 + |
9 | 1 file changed, 1 insertion(+) | 11 | 1 file changed, 1 insertion(+) |
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch index c4f3f12666..5159652f69 100644 --- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/backported.patch | |||
@@ -4,6 +4,8 @@ Date: Mon Nov 18 18:43:15 2019 +0100 | |||
4 | 4 | ||
5 | Backport of the NEWS file from version 1.6.0 | 5 | Backport of the NEWS file from version 1.6.0 |
6 | 6 | ||
7 | Upstream-Status: Inappropriate [Test artefact] | ||
8 | |||
7 | diff --git a/doc/NEWS b/doc/NEWS | 9 | diff --git a/doc/NEWS b/doc/NEWS |
8 | index 69793fc..fd49b1c 100644 | 10 | index 69793fc..fd49b1c 100644 |
9 | --- a/doc/NEWS | 11 | --- a/doc/NEWS |
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb index fee5bee739..254ea45708 100644 --- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb | |||
@@ -14,7 +14,7 @@ SRC_URI[sha256sum] = "681bcca9784bf3cb2207e68236d1f68e2aa7b80f999b5750dc77dcd756 | |||
14 | 14 | ||
15 | PR = "r5" | 15 | PR = "r5" |
16 | 16 | ||
17 | S = "${WORKDIR}/pv-${PV}" | 17 | S = "${UNPACKDIR}/pv-${PV}" |
18 | 18 | ||
19 | EXCLUDE_FROM_WORLD = "1" | 19 | EXCLUDE_FROM_WORLD = "1" |
20 | 20 | ||
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded index d75df0c8c7..f80744e14b 100644 --- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded | |||
@@ -11,7 +11,7 @@ RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" | |||
11 | 11 | ||
12 | SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3" | 12 | SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3" |
13 | 13 | ||
14 | S = "${WORKDIR}/pv-${PV}" | 14 | S = "${UNPACKDIR}/pv-${PV}" |
15 | 15 | ||
16 | EXCLUDE_FROM_WORLD = "1" | 16 | EXCLUDE_FROM_WORLD = "1" |
17 | 17 | ||
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb index 07b83276fb..66d66e95e2 100644 --- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb | |||
@@ -1,22 +1,20 @@ | |||
1 | SUMMARY = "A simple tool to wait for a specific signal over DBus" | 1 | SUMMARY = "A simple tool to wait for a specific signal over DBus" |
2 | HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" | 2 | HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" |
3 | SECTION = "base" | 3 | SECTION = "base" |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
6 | 6 | ||
7 | DEPENDS = "dbus" | 7 | DEPENDS = "dbus" |
8 | 8 | ||
9 | # Note: this is intentionally not the latest version in the original .bb | 9 | # Note: this is intentionally not the latest version in the original .bb |
10 | SRCREV = "1a3e1343761b30750bed70e0fd688f6d3c7b3717" | 10 | SRCREV = "1a3e1343761b30750bed70e0fd688f6d3c7b3717" |
11 | PV = "0.1+git${SRCPV}" | 11 | PV = "0.1+git" |
12 | PR = "r2" | 12 | PR = "r2" |
13 | 13 | ||
14 | SRC_URI = "git://git.yoctoproject.org/dbus-wait" | 14 | SRC_URI = "git://git.yoctoproject.org/dbus-wait;branch=master" |
15 | UPSTREAM_CHECK_COMMITS = "1" | 15 | UPSTREAM_CHECK_COMMITS = "1" |
16 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" | 16 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" |
17 | 17 | ||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | EXCLUDE_FROM_WORLD = "1" | 18 | EXCLUDE_FROM_WORLD = "1" |
21 | 19 | ||
22 | inherit autotools pkgconfig | 20 | inherit autotools pkgconfig |
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded index 32ec4b14fa..d3256ef5df 100644 --- a/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded | |||
@@ -1,21 +1,19 @@ | |||
1 | SUMMARY = "A simple tool to wait for a specific signal over DBus" | 1 | SUMMARY = "A simple tool to wait for a specific signal over DBus" |
2 | HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" | 2 | HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait" |
3 | SECTION = "base" | 3 | SECTION = "base" |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
6 | 6 | ||
7 | DEPENDS = "dbus" | 7 | DEPENDS = "dbus" |
8 | 8 | ||
9 | # Note: this is intentionally not the latest version in the original .bb | 9 | # Note: this is intentionally not the latest version in the original .bb |
10 | SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517" | 10 | SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517" |
11 | PV = "0.1+git${SRCPV}" | 11 | PV = "0.1+git" |
12 | 12 | ||
13 | SRC_URI = "git://git.yoctoproject.org/dbus-wait" | 13 | SRC_URI = "git://git.yoctoproject.org/dbus-wait;branch=master" |
14 | UPSTREAM_CHECK_COMMITS = "1" | 14 | UPSTREAM_CHECK_COMMITS = "1" |
15 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" | 15 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" |
16 | 16 | ||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | EXCLUDE_FROM_WORLD = "1" | 17 | EXCLUDE_FROM_WORLD = "1" |
20 | 18 | ||
21 | inherit autotools pkgconfig | 19 | inherit autotools pkgconfig |
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb new file mode 100644 index 0000000000..0501e2025f --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | SUMMARY = "Pipe viewer test recipe for devtool upgrade test" | ||
2 | LICENSE = "Artistic-2.0" | ||
3 | LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" | ||
4 | |||
5 | SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz" | ||
6 | UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" | ||
7 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" | ||
8 | |||
9 | SRC_URI[md5sum] = "9365d86bd884222b4bf1039b5a9ed1bd" | ||
10 | |||
11 | S = "${UNPACKDIR}/pv-${PV}" | ||
12 | |||
13 | EXCLUDE_FROM_WORLD = "1" | ||
14 | |||
15 | inherit autotools | ||
16 | |||
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded new file mode 100644 index 0000000000..2ba7c8213e --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test3_1.5.3.bb.upgraded | |||
@@ -0,0 +1,15 @@ | |||
1 | SUMMARY = "Pipe viewer test recipe for devtool upgrade test" | ||
2 | LICENSE = "Artistic-2.0" | ||
3 | LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" | ||
4 | |||
5 | SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3" | ||
6 | SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz" | ||
7 | UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" | ||
8 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" | ||
9 | |||
10 | S = "${UNPACKDIR}/pv-${PV}" | ||
11 | |||
12 | EXCLUDE_FROM_WORLD = "1" | ||
13 | |||
14 | inherit autotools | ||
15 | |||
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb new file mode 100644 index 0000000000..71c03653f7 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | SUMMARY = "Pipe viewer test recipe for devtool upgrade test" | ||
2 | LICENSE = "Artistic-2.0" | ||
3 | LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" | ||
4 | |||
5 | SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz" | ||
6 | UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" | ||
7 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" | ||
8 | |||
9 | SRC_URI[md5sum] = "9365d86bd884222b4bf1039b5a9ed1bd" | ||
10 | SRC_URI[sha1sum] = "63a0801350e812541c7f8e9ad74e0d6b629d0b39" | ||
11 | SRC_URI[sha256sum] = "681bcca9784bf3cb2207e68236d1f68e2aa7b80f999b5750dc77dcd756e81fbc" | ||
12 | SRC_URI[sha384sum] = "5fff6390465ff23dbf573fcf39dfad3aed2f92074a35e6c02abe58b7678858d90fa6572ff4cb56df8b3e217c739cdbe3" | ||
13 | SRC_URI[sha512sum] = "32efe7071a363f547afc74e96774f711795edda1d2702823a347d0f9953e859b7d8c45b3e63e18ffb9e0d5ed5910be652d7d727c8676e81b6cb3aed0b13aec00" | ||
14 | |||
15 | PR = "r5" | ||
16 | |||
17 | S = "${UNPACKDIR}/pv-${PV}" | ||
18 | |||
19 | EXCLUDE_FROM_WORLD = "1" | ||
20 | |||
21 | inherit autotools | ||
22 | |||
diff --git a/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded new file mode 100644 index 0000000000..0bc9f71da6 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-upgrade-test4_1.5.3.bb.upgraded | |||
@@ -0,0 +1,19 @@ | |||
1 | SUMMARY = "Pipe viewer test recipe for devtool upgrade test" | ||
2 | LICENSE = "Artistic-2.0" | ||
3 | LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02" | ||
4 | |||
5 | SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz" | ||
6 | UPSTREAM_CHECK_URI = "http://www.ivarch.com/programs/pv.shtml" | ||
7 | RECIPE_NO_UPDATE_REASON = "This recipe is used to test devtool upgrade feature" | ||
8 | |||
9 | SRC_URI[sha1sum] = "395ce62f4f3e035b86c77038f04b96c5aa233595" | ||
10 | SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3" | ||
11 | SRC_URI[sha384sum] = "218c8d2d097aeba5310be759bc20573f18ffa0b11701eac6dd2e7e14ddf13c6e0e094ca7ca026eaa05ef92a056402e36" | ||
12 | SRC_URI[sha512sum] = "1cf9d7376fceefcd594d0a8b591afc8e11ce89f7210d10ad74438974ecebe9cc5d9ec4db9cc79e0566bfd2b0278c0cc263c07547803e7536432cd1ffd32d8a45" | ||
13 | |||
14 | S = "${UNPACKDIR}/pv-${PV}" | ||
15 | |||
16 | EXCLUDE_FROM_WORLD = "1" | ||
17 | |||
18 | inherit autotools | ||
19 | |||
diff --git a/meta-selftest/recipes-test/ext-dtb/bbb-dtbs-as-ext.bb b/meta-selftest/recipes-test/ext-dtb/bbb-dtbs-as-ext.bb new file mode 100644 index 0000000000..5055d03e54 --- /dev/null +++ b/meta-selftest/recipes-test/ext-dtb/bbb-dtbs-as-ext.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Boeaglebone Devicetrees" | ||
2 | DESCRIPTION = "Handle the dtc files of the beaglebone-yocto via devicetree.bbclass just for testing purpose" | ||
3 | SECTION = "kernel" | ||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
6 | |||
7 | inherit devicetree | ||
8 | |||
9 | COMPATIBLE_MACHINE = "^(beaglebone-yocto)$" | ||
10 | |||
11 | # Take a copy of a small devicetree from the kernel's source directory for handling it externally | ||
12 | # Borrowed an example DTB overlay from | ||
13 | # https://raw.githubusercontent.com/beagleboard/linux/refs/heads/5.10/arch/arm/boot/dts/overlays/BBORG_RELAY-00A2.dts | ||
14 | SRC_URI = "\ | ||
15 | file://am335x-bonegreen-ext.dts \ | ||
16 | file://BBORG_RELAY-00A2.dts \ | ||
17 | " | ||
18 | |||
19 | # The am335x-bonegreen-ext.dts needs also the ti directories | ||
20 | DT_INCLUDE:append = " ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/ti/omap" | ||
21 | |||
22 | # Sym-links are handled as extra configuration nodes in FIT images. | ||
23 | do_install:append() { | ||
24 | ln -sf am335x-bonegreen-ext.dtb "${D}/boot/devicetree/am335x-bonegreen-ext-alias.dtb" | ||
25 | } | ||
26 | |||
27 | do_deploy:append() { | ||
28 | ln -sf am335x-bonegreen-ext.dtb "${DEPLOYDIR}/devicetree/am335x-bonegreen-ext-alias.dtb" | ||
29 | } | ||
diff --git a/meta-selftest/recipes-test/ext-dtb/files/BBORG_RELAY-00A2.dts b/meta-selftest/recipes-test/ext-dtb/files/BBORG_RELAY-00A2.dts new file mode 100644 index 0000000000..9530fa50fe --- /dev/null +++ b/meta-selftest/recipes-test/ext-dtb/files/BBORG_RELAY-00A2.dts | |||
@@ -0,0 +1,49 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Copyright (C) 2015 Robert Nelson <robertcnelson@gmail.com> | ||
4 | * Copyright (C) 2019 Amilcar Lucas <amilcar.lucas@iav.de> | ||
5 | */ | ||
6 | |||
7 | /dts-v1/; | ||
8 | /plugin/; | ||
9 | |||
10 | &{/chosen} { | ||
11 | overlays { | ||
12 | BBORG_RELAY-00A2.kernel = __TIMESTAMP__; | ||
13 | }; | ||
14 | }; | ||
15 | |||
16 | &ocp { | ||
17 | P9_41_pinmux { pinctrl-0 = <&P9_41_gpio_pin>;}; | ||
18 | P9_42_pinmux { pinctrl-0 = <&P9_42_gpio_pin>;}; | ||
19 | P9_30_pinmux { pinctrl-0 = <&P9_30_gpio_pin>;}; | ||
20 | P9_27_pinmux { pinctrl-0 = <&P9_27_gpio_pin>;}; | ||
21 | }; | ||
22 | |||
23 | // relay1 | ||
24 | &bone_led_P9_41 { | ||
25 | status = "okay"; | ||
26 | label = "relay1"; | ||
27 | default-state = "keep"; | ||
28 | }; | ||
29 | |||
30 | // relay2 | ||
31 | &bone_led_P9_42 { | ||
32 | status = "okay"; | ||
33 | label = "relay2"; | ||
34 | default-state = "keep"; | ||
35 | }; | ||
36 | |||
37 | // realy3 | ||
38 | &bone_led_P9_30 { | ||
39 | status = "okay"; | ||
40 | label = "relay3"; | ||
41 | default-state = "keep"; | ||
42 | }; | ||
43 | |||
44 | // realy4 | ||
45 | &bone_led_P9_27 { | ||
46 | status = "okay"; | ||
47 | label = "relay4"; | ||
48 | default-state = "keep"; | ||
49 | }; | ||
diff --git a/meta-selftest/recipes-test/ext-dtb/files/am335x-bonegreen-ext.dts b/meta-selftest/recipes-test/ext-dtb/files/am335x-bonegreen-ext.dts new file mode 100644 index 0000000000..a0b39337a9 --- /dev/null +++ b/meta-selftest/recipes-test/ext-dtb/files/am335x-bonegreen-ext.dts | |||
@@ -0,0 +1,14 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-only | ||
2 | /* | ||
3 | * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/ | ||
4 | */ | ||
5 | /dts-v1/; | ||
6 | |||
7 | #include "am33xx.dtsi" | ||
8 | #include "am335x-bone-common.dtsi" | ||
9 | #include "am335x-bonegreen-common.dtsi" | ||
10 | |||
11 | / { | ||
12 | model = "TI AM335x BeagleBone Green External"; | ||
13 | compatible = "ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; | ||
14 | }; | ||
diff --git a/meta-selftest/recipes-test/fortran/fortran-helloworld.bb b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb index 3a46404477..240ed473cc 100644 --- a/meta-selftest/recipes-test/fortran/fortran-helloworld.bb +++ b/meta-selftest/recipes-test/fortran/fortran-helloworld.bb | |||
@@ -6,12 +6,14 @@ DEPENDS = "libgfortran" | |||
6 | 6 | ||
7 | SRC_URI = "file://hello.f95" | 7 | SRC_URI = "file://hello.f95" |
8 | 8 | ||
9 | S = "${UNPACKDIR}" | ||
10 | |||
9 | # These set flags that Fortran doesn't support | 11 | # These set flags that Fortran doesn't support |
10 | SECURITY_CFLAGS = "" | 12 | SECURITY_CFLAGS = "" |
11 | SECURITY_LDFLAGS = "" | 13 | SECURITY_LDFLAGS = "" |
12 | 14 | ||
13 | do_compile() { | 15 | do_compile() { |
14 | ${FC} ${LDFLAGS} ${WORKDIR}/hello.f95 -o ${B}/fortran-hello | 16 | ${FC} ${LDFLAGS} hello.f95 -o ${B}/fortran-hello |
15 | } | 17 | } |
16 | 18 | ||
17 | do_install() { | 19 | do_install() { |
diff --git a/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend b/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/meta-selftest/recipes-test/gcc-source/gcc-source_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. | ||
2 | include test_recipe.inc | ||
diff --git a/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb b/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb index 08089b4186..1c0886dcbe 100644 --- a/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb +++ b/meta-selftest/recipes-test/git-submodule-test/git-submodule-test.bb | |||
@@ -1,8 +1,24 @@ | |||
1 | SUMMARY = "Test recipe for fetching git submodules" | 1 | SUMMARY = "Test recipe for fetching git submodules" |
2 | HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/git-submodule-test/" | ||
2 | LICENSE = "MIT" | 3 | LICENSE = "MIT" |
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | 4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
4 | 5 | ||
5 | INHIBIT_DEFAULT_DEPS = "1" | 6 | INHIBIT_DEFAULT_DEPS = "1" |
6 | 7 | ||
7 | SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test" | 8 | UPSTREAM_VERSION_UNKNOWN = "1" |
9 | |||
10 | SRC_URI = "gitsm://git.yoctoproject.org/git-submodule-test;branch=master" | ||
8 | SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee" | 11 | SRCREV = "a2885dd7d25380d23627e7544b7bbb55014b16ee" |
12 | |||
13 | do_test_git_as_user() { | ||
14 | cd ${S} | ||
15 | git status | ||
16 | } | ||
17 | addtask test_git_as_user after do_unpack | ||
18 | |||
19 | fakeroot do_test_git_as_root() { | ||
20 | cd ${S} | ||
21 | git status | ||
22 | } | ||
23 | do_test_git_as_root[depends] += "virtual/fakeroot-native:do_populate_sysroot" | ||
24 | addtask test_git_as_root after do_unpack | ||
diff --git a/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb b/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb new file mode 100644 index 0000000000..756c01cb09 --- /dev/null +++ b/meta-selftest/recipes-test/gitrepotest/gitrepotest.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | SUMMARY = "Test recipe for git repo initialization" | ||
2 | HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2" | ||
3 | LICENSE = "GPL-2.0-or-later" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
5 | |||
6 | INHIBIT_DEFAULT_DEPS = "1" | ||
7 | |||
8 | PATCHTOOL = "git" | ||
9 | |||
10 | SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https \ | ||
11 | file://0001-testpatch.patch \ | ||
12 | " | ||
13 | |||
14 | SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7" | ||
15 | |||
diff --git a/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch b/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch new file mode 100644 index 0000000000..4f8b745995 --- /dev/null +++ b/meta-selftest/recipes-test/gitrepotest/gitrepotest/0001-testpatch.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | Upstream-Status: Inappropriate [Test artefact] | ||
2 | |||
3 | diff --git a/Makefile.am b/Makefile.am | ||
4 | index 432a9b4..bbf7c74 100644 | ||
5 | --- a/Makefile.am | ||
6 | +++ b/Makefile.am | ||
7 | @@ -1,3 +1,4 @@ | ||
8 | +## This is useless comment to test if patch works | ||
9 | ACLOCAL_AMFLAGS = -I m4 | ||
10 | |||
11 | SUBDIRS = matchbox-panel applets data po | ||
diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb new file mode 100644 index 0000000000..5146129666 --- /dev/null +++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require gitunpackoffline.inc | ||
2 | |||
3 | # Clear the base.bbclass magic srcrev call | ||
4 | fetcher_hashes_dummyfunc[vardepvalue] = "" | ||
diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb new file mode 100644 index 0000000000..d9a54690b2 --- /dev/null +++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | require gitunpackoffline.inc | ||
2 | |||
3 | TAGVALUE = "2.11" | ||
4 | |||
5 | PV = "0.0+git" | ||
diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc new file mode 100644 index 0000000000..59b383800c --- /dev/null +++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc | |||
@@ -0,0 +1,15 @@ | |||
1 | SUMMARY = "Test recipe for fetching git submodules" | ||
2 | HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2" | ||
3 | LICENSE = "GPL-2.0-or-later" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
5 | |||
6 | INHIBIT_DEFAULT_DEPS = "1" | ||
7 | |||
8 | TAGVALUE = "2.10" | ||
9 | |||
10 | # Deliberately have a tag which has to be resolved but ensure do_unpack doesn't access the network again. | ||
11 | SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https" | ||
12 | SRC_URI:append:gitunpack-enable-recipe = ";tag=${TAGVALUE}" | ||
13 | SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7" | ||
14 | SRCREV:gitunpack-enable-recipe = "" | ||
15 | |||
diff --git a/meta-selftest/recipes-test/images/oe-selftest-image.bb b/meta-selftest/recipes-test/images/oe-selftest-image.bb index 5d4d10eef6..0eb4057209 100644 --- a/meta-selftest/recipes-test/images/oe-selftest-image.bb +++ b/meta-selftest/recipes-test/images/oe-selftest-image.bb | |||
@@ -1,7 +1,8 @@ | |||
1 | SUMMARY = "An image used during oe-selftest tests" | 1 | SUMMARY = "An image used during oe-selftest tests" |
2 | 2 | ||
3 | IMAGE_INSTALL = "packagegroup-core-boot dropbear" | 3 | # libudev is needed for deploy mdadm via devtool |
4 | IMAGE_FEATURES = "debug-tweaks" | 4 | IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-dropbear libudev" |
5 | IMAGE_FEATURES = "allow-empty-password empty-root-password allow-root-login" | ||
5 | 6 | ||
6 | IMAGE_LINGUAS = " " | 7 | IMAGE_LINGUAS = " " |
7 | 8 | ||
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.bb b/meta-selftest/recipes-test/images/wic-image-minimal.bb index 1cb019898d..89843d9b3c 100644 --- a/meta-selftest/recipes-test/images/wic-image-minimal.bb +++ b/meta-selftest/recipes-test/images/wic-image-minimal.bb | |||
@@ -7,12 +7,14 @@ IMAGE_INSTALL = "packagegroup-core-boot" | |||
7 | IMAGE_FSTYPES = "wic" | 7 | IMAGE_FSTYPES = "wic" |
8 | 8 | ||
9 | WKS_FILE_DEPENDS = "dosfstools-native mtools-native gptfdisk-native" | 9 | WKS_FILE_DEPENDS = "dosfstools-native mtools-native gptfdisk-native" |
10 | WKS_FILE_DEPENDS_append_x86 = " syslinux-native syslinux" | 10 | WKS_FILE_DEPENDS:append:x86 = " syslinux-native syslinux" |
11 | WKS_FILE_DEPENDS_append_x86-64 = " syslinux-native syslinux" | 11 | WKS_FILE_DEPENDS:append:x86-64 = " syslinux-native syslinux" |
12 | WKS_FILE_DEPENDS_append_x86-x32 = " syslinux-native syslinux" | 12 | WKS_FILE_DEPENDS:append:x86-x32 = " syslinux-native syslinux" |
13 | 13 | ||
14 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 14 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
15 | 15 | ||
16 | IMAGE_ROOTFS_EXTRA_SPACE = "2000" | 16 | IMAGE_ROOTFS_EXTRA_SPACE = "2000" |
17 | 17 | ||
18 | inherit image | 18 | inherit image |
19 | |||
20 | include test_recipe.inc | ||
diff --git a/meta-selftest/recipes-test/images/wic-image-minimal.wks b/meta-selftest/recipes-test/images/wic-image-minimal.wks index ae69cb6e3c..4186b16517 100644 --- a/meta-selftest/recipes-test/images/wic-image-minimal.wks +++ b/meta-selftest/recipes-test/images/wic-image-minimal.wks | |||
@@ -2,7 +2,7 @@ | |||
2 | # long-description: This image contains boot partition and 3 rootfs partitions | 2 | # long-description: This image contains boot partition and 3 rootfs partitions |
3 | # created from core-image-minimal and wic-image-minimal image recipes. | 3 | # created from core-image-minimal and wic-image-minimal image recipes. |
4 | 4 | ||
5 | part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 | 5 | part /boot --source bootimg_pcbios --ondisk sda --label boot --active --align 1024 |
6 | part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid | 6 | part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid |
7 | 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 | 7 | 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 |
8 | part /mnt --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label core --align 1024 | 8 | part /mnt --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label core --align 1024 |
diff --git a/meta-selftest/recipes-test/license/incompatible-license-alias.bb b/meta-selftest/recipes-test/license/incompatible-license-alias.bb index e0b4e13c26..1af99e7809 100644 --- a/meta-selftest/recipes-test/license/incompatible-license-alias.bb +++ b/meta-selftest/recipes-test/license/incompatible-license-alias.bb | |||
@@ -1,3 +1,5 @@ | |||
1 | SUMMARY = "Recipe with an alias of an SPDX license" | 1 | SUMMARY = "Recipe with an alias of an SPDX license" |
2 | DESCRIPTION = "Is licensed with an alias of an SPDX license to be used for testing" | 2 | DESCRIPTION = "Is licensed with an alias of an SPDX license to be used for testing" |
3 | LICENSE = "GPLv3" | 3 | LICENSE = "GPLv3" |
4 | |||
5 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/license/incompatible-license.bb b/meta-selftest/recipes-test/license/incompatible-license.bb index 282f5c2875..6fdc58fd30 100644 --- a/meta-selftest/recipes-test/license/incompatible-license.bb +++ b/meta-selftest/recipes-test/license/incompatible-license.bb | |||
@@ -1,3 +1,5 @@ | |||
1 | SUMMARY = "Recipe with an SPDX license" | 1 | SUMMARY = "Recipe with an SPDX license" |
2 | DESCRIPTION = "Is licensed with an SPDX license to be used for testing" | 2 | DESCRIPTION = "Is licensed with an SPDX license to be used for testing" |
3 | LICENSE = "GPL-3.0-only" | 3 | LICENSE = "GPL-3.0-only" |
4 | |||
5 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/license/incompatible-licenses.bb b/meta-selftest/recipes-test/license/incompatible-licenses.bb index ab3b58d2c9..47bd8d7c00 100644 --- a/meta-selftest/recipes-test/license/incompatible-licenses.bb +++ b/meta-selftest/recipes-test/license/incompatible-licenses.bb | |||
@@ -1,3 +1,5 @@ | |||
1 | SUMMARY = "Recipe with multiple SPDX licenses" | 1 | SUMMARY = "Recipe with multiple SPDX licenses" |
2 | DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing" | 2 | DESCRIPTION = "Is licensed with multiple SPDX licenses to be used for testing" |
3 | LICENSE = "GPL-2.0-only & GPL-3.0 & LGPL-3.0-only" | 3 | LICENSE = "GPL-2.0-only & GPL-3.0-only & LGPL-3.0-only" |
4 | |||
5 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb index 35af0966ef..142d73158e 100644 --- a/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb +++ b/meta-selftest/recipes-test/license/incompatible-nonspdx-license.bb | |||
@@ -1,3 +1,5 @@ | |||
1 | SUMMARY = "Recipe with a non-SPDX license" | 1 | SUMMARY = "Recipe with a non-SPDX license" |
2 | DESCRIPTION = "Is licensed with a non-SPDX license to be used for testing" | 2 | DESCRIPTION = "Is licensed with a non-SPDX license to be used for testing" |
3 | LICENSE = "FooLicense" | 3 | LICENSE = "FooLicense" |
4 | |||
5 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/logging-test/logging-test.bb b/meta-selftest/recipes-test/logging-test/logging-test.bb new file mode 100644 index 0000000000..ac3fb46f45 --- /dev/null +++ b/meta-selftest/recipes-test/logging-test/logging-test.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | SUMMARY = "Destined to fail" | ||
2 | LICENSE = "CLOSED" | ||
3 | |||
4 | deltask do_patch | ||
5 | INHIBIT_DEFAULT_DEPS = "1" | ||
6 | |||
7 | do_shelltest() { | ||
8 | echo "This is shell stdout" | ||
9 | echo "This is shell stderr" >&2 | ||
10 | exit 1 | ||
11 | } | ||
12 | addtask do_shelltest | ||
13 | |||
14 | python do_pythontest_exec_func_shell() { | ||
15 | bb.build.exec_func('do_shelltest', d) | ||
16 | } | ||
17 | addtask do_pythontest_exec_func_shell | ||
18 | |||
19 | python do_pythontest_exit () { | ||
20 | print("This is python stdout") | ||
21 | sys.exit(1) | ||
22 | } | ||
23 | addtask do_pythontest_exit | ||
24 | |||
25 | python do_pythontest_exec_func_python() { | ||
26 | bb.build.exec_func('do_pythontest_exit', d) | ||
27 | } | ||
28 | addtask do_pythontest_exec_func_python | ||
29 | |||
30 | python do_pythontest_fatal () { | ||
31 | print("This is python fatal test stdout") | ||
32 | bb.fatal("This is a fatal error") | ||
33 | } | ||
34 | addtask do_pythontest_fatal | ||
diff --git a/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch b/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch index b1d5eab2b8..7df224e5c8 100644 --- a/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch +++ b/meta-selftest/recipes-test/man-db/files/0001-Test-patch-here.patch | |||
@@ -4,6 +4,8 @@ Date: Fri, 9 Feb 2018 17:37:48 +0200 | |||
4 | Subject: [PATCH] Test patch here! | 4 | Subject: [PATCH] Test patch here! |
5 | 5 | ||
6 | This is an invalid patch used by oe-selftest | 6 | This is an invalid patch used by oe-selftest |
7 | |||
8 | Upstream-Status: Inappropriate [Test artefact] | ||
7 | --- | 9 | --- |
8 | README | 1 + | 10 | README | 1 + |
9 | 1 file changed, 1 insertion(+) | 11 | 1 file changed, 1 insertion(+) |
diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb index a76a6bea1b..d7785cee2e 100644 --- a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb +++ b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb | |||
@@ -1,21 +1,25 @@ | |||
1 | LICENSE = "MIT" | 1 | LICENSE = "MIT" |
2 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 2 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
3 | 3 | ||
4 | MCMACHINE_virtclass-mcextend-musl = "qemux86-64" | 4 | MCMACHINE:virtclass-mcextend-musl = "qemux86-64" |
5 | MCMACHINE_virtclass-mcextend-tiny = "qemux86" | 5 | MCMACHINE:virtclass-mcextend-tiny = "qemux86" |
6 | MCIMGTYPE_virtclass-mcextend-musl = "ext4" | 6 | MCIMGTYPE:virtclass-mcextend-musl = "ext4" |
7 | MCIMGTYPE_virtclass-mcextend-tiny = "cpio.gz" | 7 | MCIMGTYPE:virtclass-mcextend-tiny = "cpio.gz" |
8 | 8 | ||
9 | MC_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/images/${MCMACHINE}" | 9 | MC_DEPLOY_DIR_IMAGE = "${TOPDIR}/tmp-mc-${MCNAME}/deploy/images/${MCMACHINE}" |
10 | MC_DEPLOY_IMAGE_BASENAME = "core-image-minimal" | ||
10 | 11 | ||
11 | do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc::${MCNAME}:virtual/kernel:do_deploy" | 12 | do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc::${MCNAME}:virtual/kernel:do_deploy" |
12 | 13 | ||
13 | do_install () { | 14 | do_install () { |
14 | install -d ${D}/var/lib/machines/${MCNAME} | 15 | install -d ${D}/var/lib/machines/${MCNAME} |
15 | install ${MC_DEPLOY_DIR_IMAGE}/core-image-minimal-${MCMACHINE}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/core-image-minimal.${MCIMGTYPE} | 16 | install ${MC_DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/${MC_DEPLOY_IMAGE_BASENAME}.${MCIMGTYPE} |
16 | install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME} | 17 | install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME} |
17 | } | 18 | } |
18 | 19 | ||
20 | # for IMAGE_LINK_NAME, IMAGE_BASENAME | ||
21 | inherit image-artifact-names | ||
22 | |||
19 | python () { | 23 | python () { |
20 | mcname = d.getVar('MCNAME') | 24 | mcname = d.getVar('MCNAME') |
21 | if not mcname: | 25 | if not mcname: |
@@ -23,6 +27,18 @@ python () { | |||
23 | multiconfigs = d.getVar('BBMULTICONFIG') or "" | 27 | multiconfigs = d.getVar('BBMULTICONFIG') or "" |
24 | if mcname not in multiconfigs: | 28 | if mcname not in multiconfigs: |
25 | raise bb.parse.SkipRecipe("multiconfig target %s not enabled" % mcname) | 29 | raise bb.parse.SkipRecipe("multiconfig target %s not enabled" % mcname) |
30 | |||
31 | # these will most likely start with my BPN multiconfig-image-packager, but I want them from core-image-minimal | ||
32 | # as there is no good way to query core-image-minimal's context lets assume that there are no overrides | ||
33 | # and that we can just replace IMAGE_BASENAME | ||
34 | image_link_name = d.getVar('IMAGE_LINK_NAME') | ||
35 | image_basename = d.getVar('IMAGE_BASENAME') | ||
36 | machine = d.getVar('MACHINE') | ||
37 | mcmachine = d.getVar('MCMACHINE') | ||
38 | image_to_deploy = d.getVar('MC_DEPLOY_IMAGE_BASENAME') | ||
39 | image_link_name_to_deploy = image_link_name.replace(image_basename, image_to_deploy).replace(machine, mcmachine) | ||
40 | bb.warn('%s: assuming that "%s" built for "%s" has IMAGE_LINK_NAME "%s"' % (d.getVar('PN'), mcmachine, image_to_deploy, image_link_name_to_deploy)) | ||
41 | d.setVar('IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL', image_link_name_to_deploy) | ||
26 | } | 42 | } |
27 | 43 | ||
28 | BBCLASSEXTEND = "mcextend:tiny mcextend:musl" | 44 | BBCLASSEXTEND = "mcextend:tiny mcextend:musl" |
diff --git a/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb b/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb new file mode 100644 index 0000000000..3b59e37619 --- /dev/null +++ b/meta-selftest/recipes-test/overlayfs-user/overlayfs-user.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | SUMMARY = "Overlayfs class unit test" | ||
2 | DESCRIPTION = "Contains an overlayfs configuration" | ||
3 | LICENSE = "MIT" | ||
4 | |||
5 | INHIBIT_DEFAULT_DEPS = "1" | ||
6 | EXCLUDE_FROM_WORLD = "1" | ||
7 | |||
8 | inherit_defer ${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs", "", d)} | ||
9 | include test_recipe.inc | ||
10 | |||
11 | OVERLAYFS_WRITABLE_PATHS[mnt-overlay] += "/usr/share/my-application" | ||
12 | |||
13 | do_install() { | ||
14 | install -d ${D}/usr/share/my-application | ||
15 | install -d ${D}${sysconfdir} | ||
16 | echo "Original file in /etc" >> ${D}${sysconfdir}/lower-layer-test.txt | ||
17 | } | ||
18 | |||
19 | FILES:${PN} += "\ | ||
20 | ${exec_prefix} \ | ||
21 | ${sysconfdir} \ | ||
22 | " | ||
diff --git a/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb b/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb new file mode 100644 index 0000000000..5d19a4dd25 --- /dev/null +++ b/meta-selftest/recipes-test/packagenameconflict/packagenameconflict.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | SUMMARY = "Test case that tries to rename a package to an existing one and fails" | ||
2 | DESCRIPTION = "This generates a packaging error when a package is renamed to a pre-existing name" | ||
3 | LICENSE = "MIT" | ||
4 | |||
5 | # Add a new package ${PN}-renametest | ||
6 | PACKAGES += "${PN}-renametest" | ||
7 | # ... and try to rename the ${PN}-dev to the new ${PN}-renametest (conflict) | ||
8 | PKG:${PN}-dev = "${PN}-renametest" | ||
9 | |||
10 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/meta-selftest/recipes-test/perlcross/perlcross_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. | ||
2 | include test_recipe.inc | ||
diff --git a/meta-selftest/recipes-test/poison/poison.bb b/meta-selftest/recipes-test/poison/poison.bb new file mode 100644 index 0000000000..771113acf3 --- /dev/null +++ b/meta-selftest/recipes-test/poison/poison.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "Sysroot poisoning test" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | inherit nopackages | ||
7 | |||
8 | # This test confirms that compiling code that searches /usr/include for headers | ||
9 | # will result in compiler errors. This recipe should will fail to build and | ||
10 | # oe-selftest has a test that verifies that. | ||
11 | python do_compile() { | ||
12 | import subprocess | ||
13 | |||
14 | tests = { | ||
15 | "Preprocessor": "${CPP} -I/usr/include -", | ||
16 | "C Compiler": "${CC} -I/usr/include -x c -", | ||
17 | "C++ Compiler": "${CXX} -I/usr/include -x c++ -", | ||
18 | } | ||
19 | |||
20 | for name, cmd in tests.items(): | ||
21 | cmd = d.expand(cmd) | ||
22 | bb.note("Test command: " + cmd) | ||
23 | testcode = "int main(int argc, char** argv) {}" | ||
24 | proc = subprocess.run(cmd, shell=True, input=testcode, capture_output=True, text=True) | ||
25 | |||
26 | if proc.returncode != 0 and "is unsafe for cross-compilation" in proc.stderr: | ||
27 | bb.note(f"{name} passed: {proc.stderr}") | ||
28 | else: | ||
29 | bb.error(f"{name} is not poisoned. Exit status {proc.returncode}, output: {proc.stdout} {proc.stderr}") | ||
30 | } | ||
31 | |||
32 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/postinst/postinst_1.0.bb b/meta-selftest/recipes-test/postinst/postinst_1.0.bb index 913bfabf89..b936c4f44b 100644 --- a/meta-selftest/recipes-test/postinst/postinst_1.0.bb +++ b/meta-selftest/recipes-test/postinst/postinst_1.0.bb | |||
@@ -5,19 +5,19 @@ inherit allarch | |||
5 | 5 | ||
6 | PACKAGES = "${PN}-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-rootfs-failing" | 6 | PACKAGES = "${PN}-rootfs ${PN}-delayed-a ${PN}-delayed-b ${PN}-rootfs-failing" |
7 | 7 | ||
8 | ALLOW_EMPTY_${PN}-rootfs = "1" | 8 | ALLOW_EMPTY:${PN}-rootfs = "1" |
9 | ALLOW_EMPTY_${PN}-delayed-a = "1" | 9 | ALLOW_EMPTY:${PN}-delayed-a = "1" |
10 | ALLOW_EMPTY_${PN}-delayed-b = "1" | 10 | ALLOW_EMPTY:${PN}-delayed-b = "1" |
11 | ALLOW_EMPTY_${PN}-rootfs-failing = "1" | 11 | ALLOW_EMPTY:${PN}-rootfs-failing = "1" |
12 | 12 | ||
13 | RDEPENDS_${PN}-delayed-a = "${PN}-rootfs" | 13 | RDEPENDS:${PN}-delayed-a = "${PN}-rootfs" |
14 | RDEPENDS_${PN}-delayed-b = "${PN}-delayed-a" | 14 | RDEPENDS:${PN}-delayed-b = "${PN}-delayed-a" |
15 | 15 | ||
16 | TESTDIR = "${sysconfdir}/postinst-test" | 16 | TESTDIR = "${sysconfdir}/postinst-test" |
17 | 17 | ||
18 | # At rootfs time touch $TESTDIR/rootfs. Errors if the file already exists, or | 18 | # At rootfs time touch $TESTDIR/rootfs. Errors if the file already exists, or |
19 | # if the function runs on first boot. | 19 | # if the function runs on first boot. |
20 | pkg_postinst_${PN}-rootfs () { | 20 | pkg_postinst:${PN}-rootfs () { |
21 | set -e | 21 | set -e |
22 | 22 | ||
23 | if [ -z "$D" ]; then | 23 | if [ -z "$D" ]; then |
@@ -36,7 +36,7 @@ pkg_postinst_${PN}-rootfs () { | |||
36 | 36 | ||
37 | # Depends on rootfs, delays until first boot, verifies that the rootfs file was | 37 | # Depends on rootfs, delays until first boot, verifies that the rootfs file was |
38 | # written. | 38 | # written. |
39 | pkg_postinst_ontarget_${PN}-delayed-a () { | 39 | pkg_postinst_ontarget:${PN}-delayed-a () { |
40 | set -e | 40 | set -e |
41 | 41 | ||
42 | if [ ! -e ${TESTDIR}/rootfs ]; then | 42 | if [ ! -e ${TESTDIR}/rootfs ]; then |
@@ -49,7 +49,7 @@ pkg_postinst_ontarget_${PN}-delayed-a () { | |||
49 | 49 | ||
50 | # Depends on delayed-a, delays until first boot, verifies that the delayed-a file was | 50 | # Depends on delayed-a, delays until first boot, verifies that the delayed-a file was |
51 | # written. This verifies the ordering between delayed postinsts. | 51 | # written. This verifies the ordering between delayed postinsts. |
52 | pkg_postinst_ontarget_${PN}-delayed-b () { | 52 | pkg_postinst_ontarget:${PN}-delayed-b () { |
53 | set -e | 53 | set -e |
54 | 54 | ||
55 | if [ ! -e ${TESTDIR}/delayed-a ]; then | 55 | if [ ! -e ${TESTDIR}/delayed-a ]; then |
@@ -62,7 +62,7 @@ pkg_postinst_ontarget_${PN}-delayed-b () { | |||
62 | 62 | ||
63 | # This scriptlet intentionally includes a bogus command in the middle to test | 63 | # This scriptlet intentionally includes a bogus command in the middle to test |
64 | # that we catch and report such errors properly. | 64 | # that we catch and report such errors properly. |
65 | pkg_postinst_${PN}-rootfs-failing () { | 65 | pkg_postinst:${PN}-rootfs-failing () { |
66 | mkdir -p $D${TESTDIR} | 66 | mkdir -p $D${TESTDIR} |
67 | touch $D${TESTDIR}/rootfs-before-failure | 67 | touch $D${TESTDIR}/rootfs-before-failure |
68 | run_a_really_broken_command | 68 | run_a_really_broken_command |
diff --git a/meta-selftest/recipes-test/recipetool/files/add-file.patch b/meta-selftest/recipes-test/recipetool/files/add-file.patch index bdc99c94f0..cb43cc629d 100644 --- a/meta-selftest/recipes-test/recipetool/files/add-file.patch +++ b/meta-selftest/recipes-test/recipetool/files/add-file.patch | |||
@@ -1,3 +1,5 @@ | |||
1 | Upstream-Status: Inappropriate [Test artefact] | ||
2 | |||
1 | diff --git a/file2 b/file2 | 3 | diff --git a/file2 b/file2 |
2 | new file mode 100644 | 4 | new file mode 100644 |
3 | index 0000000..049b42e | 5 | index 0000000..049b42e |
diff --git a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb index b5f976708f..7698413d4d 100644 --- a/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb +++ b/meta-selftest/recipes-test/recipetool/selftest-recipetool-appendfile.bb | |||
@@ -17,26 +17,26 @@ SRC_URI = "file://installscript.sh \ | |||
17 | EXCLUDE_FROM_WORLD = "1" | 17 | EXCLUDE_FROM_WORLD = "1" |
18 | 18 | ||
19 | install_extrafunc() { | 19 | install_extrafunc() { |
20 | install -m 0644 ${WORKDIR}/selftest-replaceme-inst-func ${D}${datadir}/selftest-replaceme-inst-func | 20 | install -m 0644 ${UNPACKDIR}/selftest-replaceme-inst-func ${D}${datadir}/selftest-replaceme-inst-func |
21 | } | 21 | } |
22 | 22 | ||
23 | do_install() { | 23 | do_install() { |
24 | install -d ${D}${datadir}/ | 24 | install -d ${D}${datadir}/ |
25 | install -m 0644 ${WORKDIR}/selftest-replaceme-orig ${D}${datadir}/selftest-replaceme-orig | 25 | install -m 0644 ${UNPACKDIR}/selftest-replaceme-orig ${D}${datadir}/selftest-replaceme-orig |
26 | install -m 0644 ${WORKDIR}/selftest-replaceme-todir ${D}${datadir} | 26 | install -m 0644 ${UNPACKDIR}/selftest-replaceme-todir ${D}${datadir} |
27 | install -m 0644 ${WORKDIR}/file1 ${D}${datadir}/selftest-replaceme-renamed | 27 | install -m 0644 ${UNPACKDIR}/file1 ${D}${datadir}/selftest-replaceme-renamed |
28 | install -m 0644 ${WORKDIR}/subdir/fileinsubdir ${D}${datadir}/selftest-replaceme-subdir | 28 | install -m 0644 ${UNPACKDIR}/subdir/fileinsubdir ${D}${datadir}/selftest-replaceme-subdir |
29 | cp ${WORKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile | 29 | cp ${UNPACKDIR}/selftest-replaceme-inst-glob* ${D}${datadir}/selftest-replaceme-inst-globfile |
30 | cp ${WORKDIR}/selftest-replaceme-inst-todir-glob* ${D}${datadir} | 30 | cp ${UNPACKDIR}/selftest-replaceme-inst-todir-glob* ${D}${datadir} |
31 | install -d ${D}${sysconfdir} | 31 | install -d ${D}${sysconfdir} |
32 | install -m 0644 ${S}/file2 ${D}${sysconfdir}/selftest-replaceme-patched | 32 | install -m 0644 ${S}/file2 ${D}${sysconfdir}/selftest-replaceme-patched |
33 | sh ${WORKDIR}/installscript.sh ${D}${datadir} | 33 | sh ${UNPACKDIR}/installscript.sh ${D}${datadir} |
34 | install_extrafunc | 34 | install_extrafunc |
35 | } | 35 | } |
36 | 36 | ||
37 | pkg_postinst_${PN} () { | 37 | pkg_postinst:${PN} () { |
38 | echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst | 38 | echo "Test file installed by postinst" > $D${datadir}/selftest-replaceme-postinst |
39 | } | 39 | } |
40 | 40 | ||
41 | FILES_${PN} += "${datadir}" | 41 | FILES:${PN} += "${datadir}" |
42 | 42 | ||
diff --git a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb index 0cd0494da8..dfaf67c938 100644 --- a/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb +++ b/meta-selftest/recipes-test/recipeutils/recipeutils-test_1.2.bb | |||
@@ -2,12 +2,14 @@ SUMMARY = "Test recipe for recipeutils.patch_recipe()" | |||
2 | 2 | ||
3 | require recipeutils-test.inc | 3 | require recipeutils-test.inc |
4 | 4 | ||
5 | LICENSE = "Proprietary" | 5 | LICENSE = "HPND" |
6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e" | 6 | LIC_FILES_CHKSUM = "file://${UNPACKDIR}/somefile;md5=d41d8cd98f00b204e9800998ecf8427e" |
7 | DEPENDS += "zlib" | 7 | DEPENDS += "zlib" |
8 | 8 | ||
9 | S = "${UNPACKDIR}" | ||
10 | |||
9 | BBCLASSEXTEND = "native nativesdk" | 11 | BBCLASSEXTEND = "native nativesdk" |
10 | 12 | ||
11 | SRC_URI += "file://somefile" | 13 | SRC_URI += "file://somefile" |
12 | 14 | ||
13 | SRC_URI_append = " file://anotherfile" | 15 | SRC_URI:append = " file://anotherfile" |
diff --git a/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb index 440471fe80..ca22e1e19c 100644 --- a/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb +++ b/meta-selftest/recipes-test/selftest-chown/selftest-chown.bb | |||
@@ -5,12 +5,12 @@ LICENSE = "MIT" | |||
5 | 5 | ||
6 | DEPENDS += "coreutils-native" | 6 | DEPENDS += "coreutils-native" |
7 | 7 | ||
8 | S = "${WORKDIR}" | 8 | S = "${UNPACKDIR}" |
9 | 9 | ||
10 | inherit useradd allarch | 10 | inherit useradd allarch |
11 | 11 | ||
12 | USERADD_PACKAGES = "${PN}" | 12 | USERADD_PACKAGES = "${PN}" |
13 | USERADD_PARAM_${PN} = "-u 1234 -M test" | 13 | USERADD_PARAM:${PN} = "-u 1234 -M test" |
14 | TESTDIR = "${D}${sysconfdir}/selftest-chown" | 14 | TESTDIR = "${D}${sysconfdir}/selftest-chown" |
15 | 15 | ||
16 | do_install() { | 16 | do_install() { |
@@ -27,4 +27,4 @@ do_install() { | |||
27 | chown -R test:test ${TESTDIR}/fifotest | 27 | chown -R test:test ${TESTDIR}/fifotest |
28 | } | 28 | } |
29 | 29 | ||
30 | FILES_${PN} = "${sysconfdir}/selftest-chown/*" | 30 | FILES:${PN} = "${sysconfdir}/selftest-chown/*" |
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb deleted file mode 100644 index 4f713f5c0e..0000000000 --- a/meta-selftest/recipes-test/selftest-ed/selftest-ed_0.5.bb +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | SUMMARY = "Line-oriented text editor -- selftest GPLv2 version" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/ed/" | ||
3 | SECTION = "base" | ||
4 | LICENSE = "GPLv2+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \ | ||
6 | file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e" | ||
7 | |||
8 | PR = "r2" | ||
9 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2" | ||
10 | |||
11 | SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" | ||
12 | SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" | ||
13 | |||
14 | inherit autotools texinfo | ||
15 | |||
16 | S = "${WORKDIR}/ed-${PV}" | ||
17 | |||
18 | EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'" | ||
19 | |||
20 | CONFIGUREOPTS_remove = "--disable-dependency-tracking" | ||
21 | CONFIGUREOPTS_remove = "--disable-silent-rules" | ||
22 | EXTRA_OECONF_remove = "--disable-static" | ||
23 | |||
24 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb deleted file mode 100644 index 08fb415d9d..0000000000 --- a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.14.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | SUMMARY = "Line-oriented text editor -- selftest variant" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/ed/" | ||
3 | |||
4 | LICENSE = "GPLv3+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7 \ | ||
6 | file://ed.h;endline=20;md5=4e36b7a40e137f42aee718165590d125 \ | ||
7 | file://main.c;endline=17;md5=c5b8f78f115df187af76868a2aead16a" | ||
8 | |||
9 | SECTION = "base" | ||
10 | |||
11 | # LSB states that ed should be in /bin/ | ||
12 | bindir = "${base_bindir}" | ||
13 | |||
14 | SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.lz" | ||
15 | RECIPE_NO_UPDATE_REASON = "This recipe is used in selftest and shouldn't be updated otherwise" | ||
16 | |||
17 | SRC_URI[md5sum] = "7f4a54fa7f366479f03654b8af645fd0" | ||
18 | SRC_URI[sha256sum] = "ffb97eb8f2a2b5a71a9b97e3872adce953aa1b8958e04c5b7bf11d556f32552a" | ||
19 | |||
20 | S = "${WORKDIR}/ed-${PV}" | ||
21 | |||
22 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | ||
23 | |||
24 | inherit texinfo | ||
25 | |||
26 | do_configure() { | ||
27 | ${S}/configure | ||
28 | } | ||
29 | |||
30 | do_install() { | ||
31 | oe_runmake 'DESTDIR=${D}' install | ||
32 | # Info dir listing isn't interesting at this point so remove it if it exists. | ||
33 | if [ -e "${D}${infodir}/dir" ]; then | ||
34 | rm -f ${D}${infodir}/dir | ||
35 | fi | ||
36 | } | ||
37 | |||
38 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.20.2.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.20.2.bb new file mode 100644 index 0000000000..e183d2d4e5 --- /dev/null +++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.20.2.bb | |||
@@ -0,0 +1,44 @@ | |||
1 | SUMMARY = "Line-oriented text editor" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/ed/" | ||
3 | DESCRIPTION = "GNU ed is a line-oriented text editor. It is used to create, display, modify and otherwise manipulate text files, both interactively and via shell scripts. A restricted version of ed, red, can only edit files in the current directory and cannot execute shell commands." | ||
4 | |||
5 | LICENSE = "GPL-2.0-only" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=76d6e300ffd8fb9d18bd9b136a9bba13 \ | ||
7 | file://ed.h;endline=20;md5=c3212b6c53b09668107420af9368c0ef \ | ||
8 | file://main.c;endline=17;md5=e5d2ae5ddd1ecb87dc71702c06dd06dc \ | ||
9 | " | ||
10 | |||
11 | SECTION = "base" | ||
12 | |||
13 | CVE_PRODUCT = "gnu:ed" | ||
14 | |||
15 | # LSB states that ed should be in /bin/ | ||
16 | bindir = "${base_bindir}" | ||
17 | |||
18 | # Upstream regularly removes previous releases from https://ftp.gnu.org/gnu/ed/ | ||
19 | SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.lz" | ||
20 | UPSTREAM_CHECK_URI = "${GNU_MIRROR}/ed/" | ||
21 | |||
22 | SRC_URI[sha256sum] = "65fec7318f48c2ca17f334ac0f4703defe62037bb13cc23920de077b5fa24523" | ||
23 | |||
24 | S = "${UNPACKDIR}/ed-${PV}" | ||
25 | |||
26 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | ||
27 | |||
28 | # for gcc 15 true/false change | ||
29 | CFLAGS += "-std=gnu17" | ||
30 | |||
31 | inherit texinfo | ||
32 | |||
33 | do_configure() { | ||
34 | ${S}/configure | ||
35 | } | ||
36 | |||
37 | do_install() { | ||
38 | oe_runmake 'DESTDIR=${D}' install | ||
39 | # Info dir listing isn't interesting at this point so remove it if it exists. | ||
40 | if [ -e "${D}${infodir}/dir" ]; then | ||
41 | rm -f ${D}${infodir}/dir | ||
42 | fi | ||
43 | } | ||
44 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.21.1.bb b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.21.1.bb new file mode 100644 index 0000000000..6b8ce6e23b --- /dev/null +++ b/meta-selftest/recipes-test/selftest-ed/selftest-ed_1.21.1.bb | |||
@@ -0,0 +1,42 @@ | |||
1 | SUMMARY = "Line-oriented text editor" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/ed/" | ||
3 | DESCRIPTION = "GNU ed is a line-oriented text editor. It is used to create, display, modify and otherwise manipulate text files, both interactively and via shell scripts. A restricted version of ed, red, can only edit files in the current directory and cannot execute shell commands." | ||
4 | |||
5 | LICENSE = "GPL-2.0-only" | ||
6 | LICENSE:gplv3test = "GPL-3.0-or-later" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=cca7f74ec83b7a9ce7ccd195aad471bd \ | ||
8 | file://ed.h;endline=20;md5=a24e7f91c0fb83e65a746f5994762a49 \ | ||
9 | file://main.c;endline=17;md5=fd6ad9f1853f123f4ae7a31d59761f09 \ | ||
10 | " | ||
11 | |||
12 | SECTION = "base" | ||
13 | |||
14 | CVE_PRODUCT = "gnu:ed" | ||
15 | |||
16 | # LSB states that ed should be in /bin/ | ||
17 | bindir = "${base_bindir}" | ||
18 | |||
19 | # Upstream regularly removes previous releases from https://ftp.gnu.org/gnu/ed/ | ||
20 | SRC_URI = "${GNU_MIRROR}/ed/ed-${PV}.tar.lz" | ||
21 | UPSTREAM_CHECK_URI = "${GNU_MIRROR}/ed/" | ||
22 | |||
23 | SRC_URI[sha256sum] = "d6d0c7192b02b0519c902a93719053e865ade5a784a3b327d93d888457b23c4b" | ||
24 | |||
25 | S = "${UNPACKDIR}/ed-${PV}" | ||
26 | |||
27 | EXTRA_OEMAKE = "-e MAKEFLAGS=" | ||
28 | |||
29 | inherit texinfo | ||
30 | |||
31 | do_configure() { | ||
32 | ${S}/configure | ||
33 | } | ||
34 | |||
35 | do_install() { | ||
36 | oe_runmake 'DESTDIR=${D}' install | ||
37 | # Info dir listing isn't interesting at this point so remove it if it exists. | ||
38 | if [ -e "${D}${infodir}/dir" ]; then | ||
39 | rm -f ${D}${infodir}/dir | ||
40 | fi | ||
41 | } | ||
42 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb index 842a9772cb..8b2aa6c737 100644 --- a/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb +++ b/meta-selftest/recipes-test/selftest-hardlink/selftest-hardlink.bb | |||
@@ -6,15 +6,18 @@ SRC_URI = "file://hello.c \ | |||
6 | file://gdb.sh \ | 6 | file://gdb.sh \ |
7 | " | 7 | " |
8 | 8 | ||
9 | S = "${WORKDIR}" | 9 | S = "${UNPACKDIR}" |
10 | 10 | ||
11 | do_compile () { | 11 | do_compile () { |
12 | ${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS} | 12 | ${CC} hello.c -o hello1 ${CFLAGS} ${LDFLAGS} |
13 | |||
14 | ${CC} hello.c -c -o hello.o ${CFLAGS} | ||
15 | ${AR} rcs libhello.a hello.o | ||
13 | } | 16 | } |
14 | 17 | ||
15 | do_install () { | 18 | do_install () { |
16 | install -d ${D}${bindir} | 19 | install -d ${D}${bindir} |
17 | install -m 755 ${WORKDIR}/gdb.sh ${D}${bindir}/ | 20 | install -m 755 ${S}/gdb.sh ${D}${bindir}/ |
18 | install -m 755 hello1 ${D}${bindir}/hello1 | 21 | install -m 755 hello1 ${D}${bindir}/hello1 |
19 | ln ${D}${bindir}/hello1 ${D}${bindir}/hello2 | 22 | ln ${D}${bindir}/hello1 ${D}${bindir}/hello2 |
20 | 23 | ||
@@ -22,9 +25,19 @@ do_install () { | |||
22 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello3 | 25 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello3 |
23 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello4 | 26 | ln ${D}${bindir}/hello1 ${D}${libexecdir}/hello4 |
24 | 27 | ||
28 | # We need so many hardlink copies to look for specific race conditions | ||
29 | install -d ${D}${libdir} | ||
30 | install -m 0644 libhello.a ${D}${libdir} | ||
31 | for num in `seq 1 100` ; do | ||
32 | ln ${D}${libdir}/libhello.a ${D}${libdir}/libhello-${num}.a | ||
33 | done | ||
34 | |||
25 | dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M | 35 | dd if=/dev/zero of=${D}${bindir}/sparsetest bs=1 count=0 seek=1M |
26 | } | 36 | } |
27 | 37 | ||
28 | RDEPENDS_${PN}-gdb += "gdb" | 38 | RDEPENDS:${PN}-gdb += "gdb" |
29 | PACKAGES =+ "${PN}-gdb" | 39 | PACKAGES =+ "${PN}-gdb" |
30 | FILES_${PN}-gdb = "${bindir}/gdb.sh" | 40 | FILES:${PN}-gdb = "${bindir}/gdb.sh" |
41 | |||
42 | PACKAGE_STRIP_STATIC = "1" | ||
43 | PACKAGE_DEBUG_STATIC_SPLIT = "1" | ||
diff --git a/meta-selftest/recipes-test/selftest-hello/files/helloworld.c b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c new file mode 100644 index 0000000000..fc7169b7b8 --- /dev/null +++ b/meta-selftest/recipes-test/selftest-hello/files/helloworld.c | |||
@@ -0,0 +1,8 @@ | |||
1 | #include <stdio.h> | ||
2 | |||
3 | int main(void) | ||
4 | { | ||
5 | printf("Hello world!\n"); | ||
6 | |||
7 | return 0; | ||
8 | } | ||
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 new file mode 100644 index 0000000000..0ffe7308ba --- /dev/null +++ b/meta-selftest/recipes-test/selftest-hello/selftest-hello_1.0.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | DESCRIPTION = "Simple helloworld application -- selftest variant" | ||
2 | SECTION = "examples" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | SRC_URI = "file://helloworld.c" | ||
7 | |||
8 | S = "${UNPACKDIR}" | ||
9 | |||
10 | do_compile() { | ||
11 | ${CC} ${CFLAGS} ${LDFLAGS} helloworld.c -o helloworld | ||
12 | } | ||
13 | |||
14 | do_install() { | ||
15 | install -d ${D}${bindir} | ||
16 | install -m 0755 helloworld ${D}${bindir} | ||
17 | } | ||
18 | |||
19 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-selftest/recipes-test/selftest-users/acreategroup.bb b/meta-selftest/recipes-test/selftest-users/acreategroup.bb new file mode 100644 index 0000000000..07771ecf40 --- /dev/null +++ b/meta-selftest/recipes-test/selftest-users/acreategroup.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "creategroup_a" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | S = "${UNPACKDIR}" | ||
7 | |||
8 | EXCLUDE_FROM_WORLD = "1" | ||
9 | |||
10 | inherit useradd allarch | ||
11 | |||
12 | USERADD_PACKAGES = "${PN}" | ||
13 | USERADD_PARAM:${PN} = "-u 5560 --gid a_group a_user" | ||
14 | GROUPADD_PARAM:${PN} = "-r a_group" | ||
15 | |||
16 | TESTDIR = "${D}${sysconfdir}/creategroup" | ||
17 | |||
18 | do_install() { | ||
19 | install -d ${TESTDIR} | ||
20 | install -d ${TESTDIR}/dir | ||
21 | touch ${TESTDIR}/file | ||
22 | ln -s ./file ${TESTDIR}/symlink | ||
23 | install -d ${TESTDIR}/fifotest | ||
24 | mkfifo ${TESTDIR}/fifotest/fifo | ||
25 | |||
26 | chown a_user:a_group ${TESTDIR}/file | ||
27 | chown -R a_user:a_group ${TESTDIR}/dir | ||
28 | chown -h a_user:a_group ${TESTDIR}/symlink | ||
29 | chown -R a_user:a_group ${TESTDIR}/fifotest | ||
30 | } | ||
31 | |||
32 | FILES:${PN} = "${sysconfdir}/creategroup/*" | ||
diff --git a/meta-selftest/recipes-test/selftest-users/bcreategroup.bb b/meta-selftest/recipes-test/selftest-users/bcreategroup.bb new file mode 100644 index 0000000000..0071fcc331 --- /dev/null +++ b/meta-selftest/recipes-test/selftest-users/bcreategroup.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "creategroup_b" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | # This recipe requires a and c. C requires A. Reverse alpha. | ||
7 | |||
8 | USERADD_DEPENDS = "acreategroup ccreategroup" | ||
9 | |||
10 | S = "${UNPACKDIR}" | ||
11 | |||
12 | EXCLUDE_FROM_WORLD = "1" | ||
13 | |||
14 | inherit useradd allarch | ||
15 | |||
16 | USERADD_PACKAGES = "${PN}" | ||
17 | USERADD_PARAM:${PN} = "-u 5561 -g b_group -G a_group,c_group b_user " | ||
18 | GROUPADD_PARAM:${PN} = "-r b_group" | ||
19 | |||
20 | TESTDIR = "${D}${sysconfdir}/creategroup" | ||
21 | |||
22 | do_install() { | ||
23 | install -d ${TESTDIR} | ||
24 | install -d ${TESTDIR}/dir | ||
25 | touch ${TESTDIR}/file | ||
26 | ln -s ./file ${TESTDIR}/symlink | ||
27 | install -d ${TESTDIR}/fifotest | ||
28 | mkfifo ${TESTDIR}/fifotest/fifo | ||
29 | |||
30 | chown a_user:a_group ${TESTDIR}/file | ||
31 | chown -R c_user:c_group ${TESTDIR}/dir | ||
32 | chown -h a_user:a_group ${TESTDIR}/symlink | ||
33 | chown -R b_user:b_group ${TESTDIR}/fifotest | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${sysconfdir}/creategroup/*" | ||
37 | |||
diff --git a/meta-selftest/recipes-test/selftest-users/ccreategroup.bb b/meta-selftest/recipes-test/selftest-users/ccreategroup.bb new file mode 100644 index 0000000000..1685916630 --- /dev/null +++ b/meta-selftest/recipes-test/selftest-users/ccreategroup.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | SUMMARY = "creategroup_c" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | USERADD_DEPENDS = "acreategroup" | ||
7 | |||
8 | S = "${UNPACKDIR}" | ||
9 | |||
10 | EXCLUDE_FROM_WORLD = "1" | ||
11 | |||
12 | inherit useradd allarch | ||
13 | |||
14 | USERADD_PACKAGES = "${PN}" | ||
15 | USERADD_PARAM:${PN} = "-u 5563 --gid c_group -G a_group c_user" | ||
16 | GROUPADD_PARAM:${PN} = "-r c_group" | ||
17 | |||
18 | TESTDIR = "${D}${sysconfdir}/creategroup" | ||
19 | |||
20 | do_install() { | ||
21 | install -d ${TESTDIR} | ||
22 | install -d ${TESTDIR}/dir | ||
23 | touch ${TESTDIR}/file | ||
24 | ln -s ./file ${TESTDIR}/symlink | ||
25 | install -d ${TESTDIR}/fifotest | ||
26 | mkfifo ${TESTDIR}/fifotest/fifo | ||
27 | |||
28 | chown c_user:c_group ${TESTDIR}/file | ||
29 | chown -R c_user:c_group ${TESTDIR}/dir | ||
30 | chown -h c_user:c_group ${TESTDIR}/symlink | ||
31 | chown -R c_user:c_group ${TESTDIR}/fifotest | ||
32 | } | ||
33 | |||
34 | FILES:${PN} = "${sysconfdir}/creategroup/*" | ||
diff --git a/meta-selftest/recipes-test/selftest-users/creategroup1.bb b/meta-selftest/recipes-test/selftest-users/creategroup1.bb new file mode 100644 index 0000000000..28651d3ed7 --- /dev/null +++ b/meta-selftest/recipes-test/selftest-users/creategroup1.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "creategroup pt 1" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | S = "${UNPACKDIR}" | ||
7 | |||
8 | inherit useradd allarch | ||
9 | |||
10 | USERADD_PACKAGES = "${PN}" | ||
11 | USERADD_PARAM:${PN} = "-u 5555 --gid grouptest gt1" | ||
12 | GROUPADD_PARAM:${PN} = "-r grouptest" | ||
13 | |||
14 | TESTDIR = "${D}${sysconfdir}/creategroup" | ||
15 | |||
16 | do_install() { | ||
17 | install -d ${TESTDIR} | ||
18 | install -d ${TESTDIR}/dir | ||
19 | touch ${TESTDIR}/file | ||
20 | ln -s ./file ${TESTDIR}/symlink | ||
21 | install -d ${TESTDIR}/fifotest | ||
22 | mkfifo ${TESTDIR}/fifotest/fifo | ||
23 | |||
24 | chown gt1:grouptest ${TESTDIR}/file | ||
25 | chown -R gt1:grouptest ${TESTDIR}/dir | ||
26 | chown -h gt1:grouptest ${TESTDIR}/symlink | ||
27 | chown -R gt1:grouptest ${TESTDIR}/fifotest | ||
28 | } | ||
29 | |||
30 | FILES:${PN} = "${sysconfdir}/creategroup/*" | ||
diff --git a/meta-selftest/recipes-test/selftest-users/creategroup2.bb b/meta-selftest/recipes-test/selftest-users/creategroup2.bb new file mode 100644 index 0000000000..2840c92106 --- /dev/null +++ b/meta-selftest/recipes-test/selftest-users/creategroup2.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "creategroup pt 2" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | USERADD_DEPENDS = "creategroup1" | ||
7 | |||
8 | S = "${UNPACKDIR}" | ||
9 | |||
10 | inherit useradd allarch | ||
11 | |||
12 | USERADD_PACKAGES = "${PN}" | ||
13 | USERADD_PARAM:${PN} = "-u 5556 --gid grouptest gt2" | ||
14 | |||
15 | TESTDIR = "${D}${sysconfdir}/creategroup" | ||
16 | |||
17 | do_install() { | ||
18 | install -d ${TESTDIR} | ||
19 | install -d ${TESTDIR}/dir | ||
20 | touch ${TESTDIR}/file | ||
21 | ln -s ./file ${TESTDIR}/symlink | ||
22 | install -d ${TESTDIR}/fifotest | ||
23 | mkfifo ${TESTDIR}/fifotest/fifo | ||
24 | |||
25 | chown gt2:grouptest ${TESTDIR}/file | ||
26 | chown -R gt2:grouptest ${TESTDIR}/dir | ||
27 | chown -h gt2:grouptest ${TESTDIR}/symlink | ||
28 | chown -R gt2:grouptest ${TESTDIR}/fifotest | ||
29 | } | ||
30 | |||
31 | FILES:${PN} = "${sysconfdir}/creategroup/*" | ||
32 | |||
diff --git a/meta-selftest/recipes-test/selftest-users/dcreategroup.bb b/meta-selftest/recipes-test/selftest-users/dcreategroup.bb new file mode 100644 index 0000000000..eba91fe63d --- /dev/null +++ b/meta-selftest/recipes-test/selftest-users/dcreategroup.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | SUMMARY = "creategroup_d" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | USERADD_DEPENDS = "bcreategroup" | ||
7 | |||
8 | S = "${UNPACKDIR}" | ||
9 | |||
10 | EXCLUDE_FROM_WORLD = "1" | ||
11 | |||
12 | inherit useradd allarch | ||
13 | |||
14 | USERADD_PACKAGES = "${PN}" | ||
15 | USERADD_PARAM:${PN} = "-u 5564 -g d_group -G b_group d_user " | ||
16 | GROUPADD_PARAM:${PN} = "-r d_group" | ||
17 | |||
18 | TESTDIR = "${D}${sysconfdir}/creategroup" | ||
19 | |||
20 | do_install() { | ||
21 | install -d ${TESTDIR} | ||
22 | install -d ${TESTDIR}/dir | ||
23 | touch ${TESTDIR}/file | ||
24 | ln -s ./file ${TESTDIR}/symlink | ||
25 | install -d ${TESTDIR}/fifotest | ||
26 | mkfifo ${TESTDIR}/fifotest/fifo | ||
27 | |||
28 | chown d_user:d_group ${TESTDIR}/file | ||
29 | chown -R d_user:b_group ${TESTDIR}/dir | ||
30 | chown -h d_user:d_group ${TESTDIR}/symlink | ||
31 | chown -R d_user:b_group ${TESTDIR}/fifotest | ||
32 | } | ||
33 | |||
diff --git a/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb b/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb new file mode 100644 index 0000000000..7ba7ec85fe --- /dev/null +++ b/meta-selftest/recipes-test/selftest-users/useraddbadtask.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "UserAddBadTask" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | DEPENDS:append = "coreutils-native" | ||
7 | |||
8 | S = "${UNPACKDIR}" | ||
9 | |||
10 | inherit useradd allarch | ||
11 | |||
12 | USERADD_PACKAGES = "${PN}" | ||
13 | USERADD_PARAM:${PN} = "-u 5555 --gid groupaddtask useraddtask" | ||
14 | GROUPADD_PARAM:${PN} = "-r groupaddtask" | ||
15 | |||
16 | do_badthingshappen() { | ||
17 | echo "foo" | ||
18 | } | ||
19 | |||
20 | addtask badthingshappen after do_populate_sysroot before do_package | ||
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb new file mode 100644 index 0000000000..21f06782fb --- /dev/null +++ b/meta-selftest/recipes-test/sysroot-test/sysroot-la-test_1.0.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | SUMMARY = "Produce a broken la file" | ||
2 | LICENSE = "CLOSED" | ||
3 | INHIBIT_DEFAULT_DEPS = "1" | ||
4 | |||
5 | EXCLUDE_FROM_WORLD = "1" | ||
6 | |||
7 | # remove-libtool.bbclass is inherited by default and removes all | ||
8 | # .la files which for this test we specifically do not want. | ||
9 | REMOVE_LIBTOOL_LA = "0" | ||
10 | |||
11 | do_install() { | ||
12 | install -d ${D}${libdir}/test/ | ||
13 | echo '${WORKDIR}' > ${D}${libdir}/test/la-test.la | ||
14 | } | ||
15 | |||
16 | BBCLASSEXTEND += "native" | ||
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb new file mode 100644 index 0000000000..e748310fc4 --- /dev/null +++ b/meta-selftest/recipes-test/sysroot-test/sysroot-pc-test_1.0.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "Produce a broken pc file" | ||
2 | LICENSE = "CLOSED" | ||
3 | INHIBIT_DEFAULT_DEPS = "1" | ||
4 | |||
5 | EXCLUDE_FROM_WORLD = "1" | ||
6 | |||
7 | do_install() { | ||
8 | install -d ${D}${libdir}/test/ | ||
9 | echo '${WORKDIR}' > ${D}${libdir}/test/test.pc | ||
10 | } | ||
11 | |||
12 | BBCLASSEXTEND += "native" | ||
diff --git a/meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb b/meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb new file mode 100644 index 0000000000..6c834be897 --- /dev/null +++ b/meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "Check that shebang does not exceed 128 characters" | ||
2 | LICENSE = "CLOSED" | ||
3 | INHIBIT_DEFAULT_DEPS = "1" | ||
4 | |||
5 | EXCLUDE_FROM_WORLD = "1" | ||
6 | do_install() { | ||
7 | install -d ${D}${bindir} | ||
8 | echo '#!BiM3cnVd1Amtv6PG+FynrQiVMbZnX5ELgF21q3EkuB+44JEGWtq8TvBJ7EGidfVs3eR3wVOUbLnjYDlKUWcm7YC/ute7f+KDHbwxziRUSUBZAUqgjiQdfQ0HnxajI0ozbM863E9JV9k13yZKYfh9/zR77Y6Dl4Dd3zOWS75LSpkAXV' > ${D}${bindir}/max-shebang | ||
9 | chmod 755 ${D}${bindir}/max-shebang | ||
10 | } | ||
11 | |||
12 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend b/meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend new file mode 100644 index 0000000000..205720982c --- /dev/null +++ b/meta-selftest/recipes-test/systemd-machine-units/systemd-machine-units_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # This bbappend is used to alter the recipe using the test_recipe.inc file created by tests. | ||
2 | include test_recipe.inc | ||
diff --git a/meta-selftest/recipes-test/testrpm/files/testfile.txt b/meta-selftest/recipes-test/testrpm/files/testfile.txt new file mode 100644 index 0000000000..c4d7630c1e --- /dev/null +++ b/meta-selftest/recipes-test/testrpm/files/testfile.txt | |||
@@ -0,0 +1 @@ | |||
== This file serves the purposes of SRC_URI only | |||
diff --git a/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb new file mode 100644 index 0000000000..17ab7af0ab --- /dev/null +++ b/meta-selftest/recipes-test/testrpm/testrpm_0.0.1.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "Test recipe for testing rpm generated by oe-core" | ||
2 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | |||
6 | SRC_URI = "file://testfile.txt" | ||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | S = "${UNPACKDIR}" | ||
10 | |||
11 | do_compile(){ | ||
12 | echo "testdata" > ${B}/"file with [brackets].txt" | ||
13 | echo "testdata" > ${B}/"file with (parentheses).txt" | ||
14 | } | ||
15 | |||
16 | do_install(){ | ||
17 | install ${B}/* ${D}/ | ||
18 | } | ||
19 | |||
20 | FILES:${PN} = "*" | ||
diff --git a/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb b/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb new file mode 100644 index 0000000000..c91d00c8d9 --- /dev/null +++ b/meta-selftest/recipes-test/wrapper/cmdline-shebang-wrapper-test.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | SUMMARY = "Check that create_cmdline_shebang works" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
4 | INHIBIT_DEFAULT_DEPS = "1" | ||
5 | |||
6 | SRC_URI += "file://test.awk" | ||
7 | |||
8 | EXCLUDE_FROM_WORLD = "1" | ||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | # was not able to make ownership preservation check | ||
12 | install -m 0400 ${UNPACKDIR}/test.awk ${D}${bindir}/test | ||
13 | |||
14 | perm_old="$(stat --format='%a' ${D}${bindir}/test)" | ||
15 | sed -i -e 's|@AWK_BIN@|${bindir}/awk|g' ${D}${bindir}/test | ||
16 | create_cmdline_shebang_wrapper ${D}${bindir}/test | ||
17 | if [ $(${D}${bindir}/test) != "Don't Panic!" ]; then | ||
18 | bbfatal "Wrapper is broken" | ||
19 | else | ||
20 | bbnote "Wrapper is good" | ||
21 | fi | ||
22 | |||
23 | perm_new="$(stat --format='%a' ${D}${bindir}/test.real)" | ||
24 | |||
25 | if [ "$perm_new" != "$perm_old" ]; then | ||
26 | bbfatal "Wrapper permissions for ${D}${bindir}/test.real not preserved. Found $perm_new but expected $perm_old" | ||
27 | fi | ||
28 | } | ||
29 | |||
30 | BBCLASSEXTEND = "native" | ||
diff --git a/meta-selftest/recipes-test/wrapper/files/test.awk b/meta-selftest/recipes-test/wrapper/files/test.awk new file mode 100644 index 0000000000..91429197b1 --- /dev/null +++ b/meta-selftest/recipes-test/wrapper/files/test.awk | |||
@@ -0,0 +1,2 @@ | |||
1 | #! @AWK_BIN@ -f | ||
2 | BEGIN { print "Don't Panic!" } | ||