On Wed, 24 Jan 2024 at 10:04, Chi Xu <[email protected]> wrote:
> +Subject: [PATCH] Update test scripts: replace ../src/* with /usr/bin
> +
> +In order to run scripts on target, replace ../src/* with /usr/bin
> +
> +Upstream-Status: Inappropriate [embedded specific]
> +-if test -x ../src/xz/xz ; then
> ++if test -x /usr/bin/xz ; then
It's better to bundle the xz* executables into the ptest package where
the script expects them, and avoid making a non-upstreamable patch
altogether.
> +ptestdir=$(dirname "$(readlink -f "$0")")
> +cd "$ptestdir"/tests || exit
> +
> +# executables test cases
> +tests_exec=$(file $(ls test_*) | grep "ELF" | awk -F: '{print $1}')
> +for i in ${tests_exec}; do
> + ./$i
> +done
> +
> +# POSIX shell script test cases
> +export srcdir=${ptestdir}/tests
> +test_shell="test_files.sh test_scripts.sh test_compress.sh"
> +for j in ${test_shell}; do
> + if [ $j == "test_compress.sh" ]; then
> + ./$j create_compress_files
> + else
> + ./$j
> + fi
> + if [ $? -eq 0 ]; then
> + echo "PASS: $j"
> + else
> + echo "FAIL: $j"
> + fi
I still don't understand this part. If these scripts are executed as a
part of standard in-tree unit testing, what prints PASS/FAIL in that
context? Shouldn't we reuse that, to replicate the in-tree testing
sequence as much as possible?
Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194264):
https://lists.openembedded.org/g/openembedded-core/message/194264
Mute This Topic: https://lists.openembedded.org/mt/103905858/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-