diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-05-04 16:28:15 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-09 07:50:14 +0100 |
commit | b81c523326c3ae37eaff1756bb809cea49c8f6ea (patch) | |
tree | 2d3653b05014ccba74a03755c7759746af2fb079 /meta/recipes-extended/cpio/cpio-2.13 | |
parent | f70ab32ec4aca5e2bcd67de3183dc0a0eef56bda (diff) | |
download | poky-b81c523326c3ae37eaff1756bb809cea49c8f6ea.tar.gz |
cpio: Run ptests under ptest user
Running these tests under root user on musl works ok but it emits
additional diagnostic
cpio: dir: Cannot change ownership to uid 0, gid 0: Not supported
Ideally its better to run this test suite under non-root user which
is often how these are run. Moreover, tests work on musl as well.
(From OE-Core rev: 22d19266269c28f596f031fcba8f2831c6465880)
(From OE-Core rev: 587e007d9febfe92fef434dea984d31642bb23a1)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/cpio/cpio-2.13')
-rwxr-xr-x[-rw-r--r--] | meta/recipes-extended/cpio/cpio-2.13/run-ptest | 9 | ||||
-rw-r--r-- | meta/recipes-extended/cpio/cpio-2.13/test.sh | 10 |
2 files changed, 11 insertions, 8 deletions
diff --git a/meta/recipes-extended/cpio/cpio-2.13/run-ptest b/meta/recipes-extended/cpio/cpio-2.13/run-ptest index f027574e86..f35a756d6b 100644..100755 --- a/meta/recipes-extended/cpio/cpio-2.13/run-ptest +++ b/meta/recipes-extended/cpio/cpio-2.13/run-ptest | |||
@@ -1,10 +1,3 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | # Define cpio test work dir | 3 | su -c ./test.sh ptest |
4 | WORKDIR=@PTEST_PATH@/tests/ | ||
5 | |||
6 | # Run test | ||
7 | cd ${WORKDIR} | ||
8 | ./atconfig ./atlocal ./testsuite | ||
9 | |||
10 | ./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.....//' -e '/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: /;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 's/UNEXPECTED PASS.*//g' | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.13/test.sh b/meta/recipes-extended/cpio/cpio-2.13/test.sh new file mode 100644 index 0000000000..f027574e86 --- /dev/null +++ b/meta/recipes-extended/cpio/cpio-2.13/test.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Define cpio test work dir | ||
4 | WORKDIR=@PTEST_PATH@/tests/ | ||
5 | |||
6 | # Run test | ||
7 | cd ${WORKDIR} | ||
8 | ./atconfig ./atlocal ./testsuite | ||
9 | |||
10 | ./testsuite 2>&1 | grep -E '[0-9]{1,3}: ' | sed -e 's/^.....//' -e '/[ok]$/s/^/PASS: /;/FAILED (.*)/s/^/FAIL: /;/skipped (.*)/s/^/SKIP: /;/expected failure/ s/^/PASS: /;/UNEXPECTED PASS/s/^/FAIL: /' -e 's/ok$//g' -e 's/FAILED.*//g' -e 's/skipped.*//g' -e 's/expected failure.*//g' -e 's/UNEXPECTED PASS.*//g' | ||