mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-05 19:18:43 +08:00
Merge branch 'posix-bins-2' into 'master'
Draft: Second attempt to add redox-posix-tests bins recipe See merge request redox-os/redox!2139
This commit is contained in:
commit
76529e30c7
59
recipes/tests/redox-posix-tests-bins/recipe.toml
Normal file
59
recipes/tests/redox-posix-tests-bins/recipe.toml
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
[source]
|
||||||
|
same_as = "../redox-posix-tests"
|
||||||
|
|
||||||
|
[build]
|
||||||
|
#dependencies = [
|
||||||
|
# "gettext",
|
||||||
|
# "libarchive",
|
||||||
|
# "libiconv",
|
||||||
|
#]
|
||||||
|
template = "custom"
|
||||||
|
script = """
|
||||||
|
DYNAMIC_INIT
|
||||||
|
|
||||||
|
# Copy source to /usr/share/redox-posix-tests
|
||||||
|
mkdir -p "${COOKBOOK_STAGE}/usr/share/redox-posix-tests"
|
||||||
|
cd "${COOKBOOK_STAGE}/usr/share/redox-posix-tests"
|
||||||
|
rsync -a "${COOKBOOK_SOURCE}/" "./"
|
||||||
|
|
||||||
|
# Pre-compile tests for Redox
|
||||||
|
make OS=Redox \
|
||||||
|
CC="${CC_WRAPPER} ${GNU_TARGET}-gcc" \
|
||||||
|
CFLAGS="-I${COOKBOOK_SYSROOT}/include" \
|
||||||
|
CPPFLAGS="-I${COOKBOOK_SYSROOT}/include" \
|
||||||
|
LDFLAGS="-L${COOKBOOK_SYSROOT}/lib" \
|
||||||
|
EXTRA_LDFLAGS= \
|
||||||
|
CC_FOR_BUILD="${CC_WRAPPER} cc" \
|
||||||
|
CFLAGS_FOR_BUILD= \
|
||||||
|
CPPFLAGS_FOR_BUILD= \
|
||||||
|
LDFLAGS_FOR_BUILD= \
|
||||||
|
-j "${COOKBOOK_MAKE_JOBS}" \
|
||||||
|
all
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Create runner script
|
||||||
|
mkdir -p "${COOKBOOK_STAGE}/usr/bin"
|
||||||
|
cat > "${COOKBOOK_STAGE}/usr/bin/redox-posix-tests-runner" <<EOF
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
cd /usr/share/redox-posix-tests
|
||||||
|
|
||||||
|
echo "Ensuring executables are newer than sources"
|
||||||
|
find . -type f -perm /111 -exec touch '{}' ';'
|
||||||
|
|
||||||
|
make run_anyway
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x "${COOKBOOK_STAGE}/usr/bin/redox-posix-tests-runner"
|
||||||
|
"""
|
||||||
|
|
||||||
|
[package]
|
||||||
|
dependencies = [
|
||||||
|
"gnu-binutils",
|
||||||
|
"gnu-grep",
|
||||||
|
"gnu-make",
|
||||||
|
"libarchive",
|
||||||
|
"sed",
|
||||||
|
]
|
||||||
Loading…
Reference in New Issue
Block a user