Skip to content

Commit

Permalink
Ignore non-zero return code in make (at)shell
Browse files Browse the repository at this point in the history
We want these to always be 0 so that cmake doesn't print an "error" when
leaving the shell (if the last command happened to fail).

However, since it's a cmake thing, handle that in cmake instead of
mktree backends.

No functional change, just cosmetic.
  • Loading branch information
dmnks committed Oct 5, 2023
1 parent 4e65a7a commit 79fbd5a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ configure_file(atlocal.in atlocal @ONLY)
configure_file(package.m4.in package.m4 @ONLY)

add_custom_target(atshell
COMMAND ./mktree atshell
COMMAND ./mktree atshell ||:
DEPENDS tree
)

add_custom_target(shell
COMMAND ./mktree shell
COMMAND ./mktree shell ||:
DEPENDS tree
)

Expand Down
2 changes: 0 additions & 2 deletions tests/mktree.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,10 @@ case $CMD in

echo "$ATSHELL_MOTD"
$SHELL
exit 0
;;
shell)
mount_tree $SANDBOX_DIR
snapshot shell "$@"
exit 0
;;
check)
mount_tree
Expand Down
1 change: 0 additions & 1 deletion tests/mktree.podman
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ case $CMD in
fi
$PODMAN run --privileged -it --name $NAME --hostname sandbox \
-e ROOTLESS=$ROOTLESS -v $PWD:/srv:z $IMAGE "$@"
exit 0
;;
check)
# Pass select options to $PODMAN
Expand Down

0 comments on commit 79fbd5a

Please sign in to comment.