mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 13:54:19 +08:00
Support running cross compiled os-test
This commit is contained in:
parent
29bf516500
commit
fcb4bb0900
@ -31,6 +31,7 @@ RUN apt-get update \
|
||||
gtk-doc-tools \
|
||||
gtk-update-icon-cache \
|
||||
help2man \
|
||||
ipxe-qemu \
|
||||
intltool \
|
||||
itstool \
|
||||
libaudiofile-dev \
|
||||
@ -63,6 +64,9 @@ RUN apt-get update \
|
||||
pkg-config \
|
||||
po4a \
|
||||
protobuf-compiler \
|
||||
qemu-system-x86 \
|
||||
qemu-system-arm \
|
||||
qemu-efi-aarch64 \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-mako \
|
||||
|
||||
6
recipes/dev/redoxer/recipe.toml
Normal file
6
recipes/dev/redoxer/recipe.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/willnode/redoxer"
|
||||
branch = "artifact-opt"
|
||||
|
||||
[build]
|
||||
template = "cargo"
|
||||
@ -1,18 +1,50 @@
|
||||
# Must be run on host: "make r.host:os-test-result"
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/os-test-relibc"
|
||||
script = """
|
||||
# update automatically
|
||||
cd relibc && git pull origin master
|
||||
"""
|
||||
same_as = "../os-test"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dev-dependencies = [
|
||||
"host:redoxer",
|
||||
"gnu-grep",
|
||||
"gnu-make",
|
||||
"libarchive",
|
||||
"sed",
|
||||
]
|
||||
script = """
|
||||
rsync -a --delete "${COOKBOOK_SOURCE}/" ./
|
||||
mkdir -p {COOKBOOK_STAGE}/share/os-test
|
||||
./linux.sh
|
||||
mv os-test/html ${COOKBOOK_STAGE}/share/os-test/html
|
||||
mv os-test/out ${COOKBOOK_STAGE}/share/os-test/out
|
||||
mv os-test/os-test.json ${COOKBOOK_STAGE}/share/os-test/os-test.json
|
||||
rsync -a "${COOKBOOK_SOURCE}/" ./
|
||||
case "$(echo "${TARGET}" | cut -d - -f3)" in
|
||||
linux) OS=Linux;;
|
||||
redox) OS=Redox;;
|
||||
esac
|
||||
|
||||
make OS=${OS} CC="${CC}" CFLAGS= CPPFLAGS= \
|
||||
LDFLAGS= EXTRA_LDFLAGS= \
|
||||
CC_FOR_BUILD="${CC_WRAPPER} cc" CFLAGS_FOR_BUILD= CPPFLAGS_FOR_BUILD= \
|
||||
LDFLAGS_FOR_BUILD= all
|
||||
|
||||
skips=(
|
||||
# Skip fputc_unlocked, hanging on Linux with relibc
|
||||
basic/stdio/putc_unlocked
|
||||
)
|
||||
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"
|
||||
done
|
||||
cp -t out -R out.known/linux
|
||||
cp -t out -R out.known/redox
|
||||
|
||||
if [ "$TARGET" = "$COOKBOOK_HOST_TARGET" ]; then
|
||||
make test
|
||||
else
|
||||
redoxer exec --folder . --folder ${COOKBOOK_SYSROOT}/usr/:/usr --artifact . make test
|
||||
fi
|
||||
|
||||
make 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 os-test.json ${COOKBOOK_STAGE}/share/os-test/os-test.json
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user