mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 13:54:19 +08:00
Adapt os-test-result and move packages to redoxer bin
This commit is contained in:
parent
fcb4bb0900
commit
865230fde4
@ -9,10 +9,12 @@ ca-certificates = {}
|
||||
coreutils = {}
|
||||
extrautils = {}
|
||||
findutils = {}
|
||||
gnu-make = {}
|
||||
ion = {}
|
||||
netdb = {}
|
||||
pkgutils = {}
|
||||
relibc = {}
|
||||
sed = {}
|
||||
|
||||
# Override to not background dhcpd
|
||||
[[files]]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/willnode/redoxer"
|
||||
branch = "artifact-opt"
|
||||
git = "https://gitlab.redox-os.org/redox-os/redoxer"
|
||||
branch = "master"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
|
||||
@ -5,46 +5,93 @@ same_as = "../os-test"
|
||||
template = "custom"
|
||||
dev-dependencies = [
|
||||
"host:redoxer",
|
||||
# allows rebuilding relibc without updating prefix
|
||||
"relibc",
|
||||
"gnu-grep",
|
||||
"gnu-make",
|
||||
"libarchive",
|
||||
"sed",
|
||||
]
|
||||
script = """
|
||||
rsync -a "${COOKBOOK_SOURCE}/" ./
|
||||
case "$(echo "${TARGET}" | cut -d - -f3)" in
|
||||
os=$(echo "${TARGET}" | cut -d - -f3)
|
||||
case "$os" in
|
||||
linux) OS=Linux;;
|
||||
redox) OS=Redox;;
|
||||
esac
|
||||
|
||||
make OS=${OS} CC="${CC}" CFLAGS= CPPFLAGS= \
|
||||
# allows linking to relibc instead of prefix/host libc
|
||||
export CC="env LIBRARY_PATH=${COOKBOOK_SYSROOT}/lib ${GNU_TARGET}-gcc"
|
||||
export CFLAGS="\
|
||||
-nostdinc \
|
||||
-nostdlib \
|
||||
-isystem ${COOKBOOK_SYSROOT}/include \
|
||||
-static \
|
||||
--sysroot ${COOKBOOK_SYSROOT} \
|
||||
${COOKBOOK_SYSROOT}/lib/crt0.o \
|
||||
${COOKBOOK_SYSROOT}/lib/crti.o \
|
||||
${COOKBOOK_SYSROOT}/lib/crtn.o \
|
||||
${COOKBOOK_SYSROOT}/lib/libc.a \
|
||||
"
|
||||
|
||||
# allow retest without restesting successful ones
|
||||
mkdir -p out
|
||||
for file in $(grep -rL "good" out); do
|
||||
if [ -f "$file" ]; then
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
make OS=${OS} CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS= \
|
||||
LDFLAGS= EXTRA_LDFLAGS= \
|
||||
CC_FOR_BUILD="${CC_WRAPPER} cc" CFLAGS_FOR_BUILD= CPPFLAGS_FOR_BUILD= \
|
||||
LDFLAGS_FOR_BUILD= all
|
||||
LDFLAGS_FOR_BUILD= -j ${COOKBOOK_MAKE_JOBS} all
|
||||
|
||||
skips=(
|
||||
# Skip fputc_unlocked, hanging on Linux with relibc
|
||||
# Skip hanging tests on Linux/Redox with relibc
|
||||
basic/stdio/putc_unlocked
|
||||
)
|
||||
|
||||
if [ "$OS" = "Redox" ]; then
|
||||
skips+=(
|
||||
# Skip hanging tests on Redox with relibc
|
||||
# https://gitlab.redox-os.org/redox-os/redox/-/issues/1752
|
||||
basic/sys_socket/accept
|
||||
basic/sys_socket/recv
|
||||
basic/sys_socket/send
|
||||
basic/sys_socket/shutdown
|
||||
signal/ppoll-block-close
|
||||
signal/ppoll-block-close-raise
|
||||
signal/ppoll-block-raise
|
||||
signal/ppoll-block-sleep-raise-write
|
||||
signal/ppoll-block-sleep-raise
|
||||
signal/ppoll-block-sleep-write-raise
|
||||
)
|
||||
fi
|
||||
|
||||
for skip in "${skips[@]}"
|
||||
do
|
||||
mkdir -p out.known/{linux,redox}/"$(dirname "${skip}")"
|
||||
echo "skipped" > out.known/linux/"${skip}.out"
|
||||
echo "skipped" > out.known/redox/"${skip}.out"
|
||||
mkdir -p out.known/${os}/"$(dirname "${skip}")"
|
||||
echo "skipped" > out.known/${os}/"${skip}.out"
|
||||
done
|
||||
cp -t out -R out.known/linux
|
||||
cp -t out -R out.known/redox
|
||||
|
||||
cp -t out -R out.known/${os}
|
||||
|
||||
if [ "$TARGET" = "$COOKBOOK_HOST_TARGET" ]; then
|
||||
make test
|
||||
else
|
||||
redoxer exec --folder . --folder ${COOKBOOK_SYSROOT}/usr/:/usr --artifact . make test
|
||||
# bash: gnu-make crashes randomly but can continue
|
||||
redoxer exec --folder . --folder "${COOKBOOK_SYSROOT}/usr/:/usr" --artifact out:/root/out \
|
||||
bash -c "until make -j 4 test; do echo retrying; done"
|
||||
# html won't generated without this, not sure why
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
make html json jsonl
|
||||
make OS=${OS} CC_FOR_BUILD="${CC_WRAPPER} cc" \
|
||||
CFLAGS_FOR_BUILD= CPPFLAGS_FOR_BUILD= \
|
||||
LDFLAGS_FOR_BUILD= html json jsonl
|
||||
|
||||
mkdir -p ${COOKBOOK_STAGE}/share/os-test
|
||||
mv html ${COOKBOOK_STAGE}/share/os-test/html
|
||||
mv out ${COOKBOOK_STAGE}/share/os-test/out
|
||||
mv html ${COOKBOOK_STAGE}/share/os-test/html
|
||||
mv os-test.json ${COOKBOOK_STAGE}/share/os-test/os-test.json
|
||||
mv os-test.jsonl ${COOKBOOK_STAGE}/share/os-test/os-test.jsonl
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user