Export all SCML file paths via environment variable in Docker image
This commit is contained in:
parent
b042ca1115
commit
246fbafa20
|
|
@ -77,6 +77,10 @@ RUN apt clean && rm -rf /var/lib/apt/lists/*
|
||||||
# Install sctrace
|
# Install sctrace
|
||||||
RUN ln -s /root/asterinas/tools/sctrace.sh /usr/local/bin/sctrace
|
RUN ln -s /root/asterinas/tools/sctrace.sh /usr/local/bin/sctrace
|
||||||
|
|
||||||
|
# Set the `ASTER_SCML` env var to make sctrace easier to use for Asterinas developers.
|
||||||
|
# For more information, check out the README of sctrace.
|
||||||
|
RUN echo 'export ASTER_SCML=$(find /root/asterinas/book/src/kernel/linux-compatibility/ -name "*.scml")' >> /root/.bashrc
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,5 @@ SCRIPT_PATH="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||||
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
|
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
|
||||||
ASTERINAS_ROOT="$(dirname "$SCRIPT_DIR")"
|
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
|
# Run sctrace with all arguments passed to this script
|
||||||
cargo run -q --manifest-path "$ASTERINAS_ROOT/tools/sctrace/Cargo.toml" -- $scml_files "$@"
|
cargo run -q --manifest-path "$ASTERINAS_ROOT/tools/sctrace/Cargo.toml" -- "$@"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue