Skip to content

Commit

Permalink
chore: fix permission on test_results directory
Browse files Browse the repository at this point in the history
test_results contains files from failed tests from debugging, but the
directory is created inside of a privileged docker container. Thus after
finishing a test run, fix up the permissions so that it can easily be
dealt with.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
  • Loading branch information
roypat committed Sep 13, 2024
1 parent d78fb96 commit 09e558a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/devtool
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ CTR_FC_ROOT_DIR="/firecracker"

# Full path to the build dir, as bind-mounted in the container.
CTR_FC_BUILD_DIR="${CTR_FC_ROOT_DIR}/build"
CTR_TEST_RESULTS_DIR="${CTR_FC_ROOT_DIR}/test_results"

# Full path to the cargo target dir, as bind-mounted in the container.
CTR_CARGO_TARGET_DIR="$CTR_FC_BUILD_DIR/cargo_target"
Expand Down Expand Up @@ -230,7 +231,7 @@ cmd_fix_perms() {
run_devctr \
--workdir "$CTR_FC_ROOT_DIR" \
-- \
chown -R "$(id -u):$(id -g)" "$CTR_FC_BUILD_DIR"
chown -R "$(id -u):$(id -g)" "$CTR_FC_BUILD_DIR" "$CTR_TEST_RESULTS_DIR"
}

# Builds the development container from its Dockerfile.
Expand Down

0 comments on commit 09e558a

Please sign in to comment.