diff options
-rw-r--r-- | meta-selftest/recipes-test/sysroot-test/sysroot-shebang-test_1.0.bb | 12 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/sysroot.py | 10 |
2 files changed, 22 insertions, 0 deletions
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/lib/oeqa/selftest/cases/sysroot.py b/meta/lib/oeqa/selftest/cases/sysroot.py index 315d1a61c2..9457f1e3ac 100644 --- a/meta/lib/oeqa/selftest/cases/sysroot.py +++ b/meta/lib/oeqa/selftest/cases/sysroot.py | |||
@@ -35,3 +35,13 @@ TESTSTRING:pn-sysroot-test-arch1 = "%s" | |||
35 | TESTSTRING:pn-sysroot-test-arch2 = "%s" | 35 | TESTSTRING:pn-sysroot-test-arch2 = "%s" |
36 | """ % (uuid1, uuid2)) | 36 | """ % (uuid1, uuid2)) |
37 | bitbake("sysroot-test") | 37 | bitbake("sysroot-test") |
38 | |||
39 | def test_sysroot_max_shebang(self): | ||
40 | """ | ||
41 | Summary: Check max shebang triggers. To confirm [YOCTO #11053] is closed. | ||
42 | Expected: Fail when a shebang bigger than the max shebang-size is reached. | ||
43 | Author: Paulo Neves <ptsneves@gmail.com> | ||
44 | """ | ||
45 | expected = "maximum shebang size exceeded, the maximum size is 128. [shebang-size]" | ||
46 | res = bitbake("sysroot-shebang-test-native -c populate_sysroot", ignore_status=True) | ||
47 | self.assertTrue(expected in res.output, msg=res.output) | ||