Install sctrace in Docker image
This commit is contained in:
parent
02abae8d61
commit
d1e74d744e
|
|
@ -72,6 +72,9 @@ RUN apt update && apt-get install -y --no-install-recommends \
|
||||||
# Clean apt cache
|
# Clean apt cache
|
||||||
RUN apt clean && rm -rf /var/lib/apt/lists/*
|
RUN apt clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install sctrace
|
||||||
|
RUN ln -s /root/asterinas/tools/sctrace.sh /usr/local/bin/sctrace
|
||||||
|
|
||||||
# Copy the gvisor syscall test binaries
|
# Copy the gvisor syscall test binaries
|
||||||
COPY --from=build-gvisor /root/gvisor/build/syscall_test_bins /root/syscall_test_bins
|
COPY --from=build-gvisor /root/gvisor/build/syscall_test_bins /root/syscall_test_bins
|
||||||
ENV GVISOR_PREBUILT_DIR=/root/syscall_test_bins
|
ENV GVISOR_PREBUILT_DIR=/root/syscall_test_bins
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Get the script directory
|
||||||
|
SCRIPT_PATH="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||||
|
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
|
||||||
|
ASTERINAS_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||||
|
|
||||||
|
# Search all SCML files
|
||||||
|
scml_files=$(find "$ASTERINAS_ROOT/book/src/kernel/linux-compatibility" -type f -name "*.scml" | tr '\n' ' ')
|
||||||
|
|
||||||
|
# Run sctrace with all arguments passed to this script
|
||||||
|
cargo run -q --manifest-path "$ASTERINAS_ROOT/tools/sctrace/Cargo.toml" -- $scml_files "$@"
|
||||||
Loading…
Reference in New Issue