Skip to content

Commit

Permalink
Rename mktree.podman to mktree.oci
Browse files Browse the repository at this point in the history
This name is a better fit as it puts more emphasis on the format of the
resulting tree, not as much on the actual container engine used (which
can be swapped, and currently is in the CI where we use docker instead
of podman).

Also drop the awkward .docker symlink now and instead pass the container
engine through the MKTREE_ENGINE environment variable.
  • Loading branch information
dmnks authored and pmatilai committed Oct 31, 2023
1 parent 15897bc commit 05c3b37
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build the Fedora testing environment
run: ./mktree.docker build
run: ./mktree.oci build
working-directory: ./tests
- name: Run the test suite
run: ./mktree.docker check --interactive=false -j$(nproc)
run: ./mktree.oci check --interactive=false -j$(nproc)
working-directory: ./tests

env:
MKTREE_ENGINE: docker
8 changes: 4 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ if (nproc GREATER 1)
endif()

# Set up mktree
set(MKTREE_BACKEND podman CACHE STRING "Mktree backend to use")
set(MKTREE_BACKEND oci CACHE STRING "Mktree backend to use")
set(DOCKERFILE ${CMAKE_CURRENT_SOURCE_DIR}/Dockerfile.${OS_NAME})
if (MKTREE_BACKEND STREQUAL podman)
if (MKTREE_BACKEND STREQUAL oci)
find_program(PODMAN podman)
find_program(DOCKER docker)
mark_as_advanced(PODMAN DOCKER)
if (PODMAN AND EXISTS ${DOCKERFILE})
set(MKTREE_NATIVE yes)
configure_file(${DOCKERFILE} Dockerfile COPYONLY)
add_custom_target(ci
COMMAND ./mktree.podman build
COMMAND ./mktree.podman check ${JOBS} $(TESTOPTS)
COMMAND ./mktree.oci build
COMMAND ./mktree.oci check ${JOBS} $(TESTOPTS)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
else()
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The mode is selected automatically during cmake configuration based on the host
distribution and the container engine installed, with native mode being
preferred whenever possible, and is reported in the cmake output as follows:

-- Using mktree backend: podman (native: <yes|no>)
-- Using mktree backend: oci (native: <yes|no>)

Then run the command

Expand Down
1 change: 0 additions & 1 deletion tests/mktree.docker

This file was deleted.

2 changes: 1 addition & 1 deletion tests/mktree.podman → tests/mktree.oci
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
# Running from source directory
CMAKE=no
NATIVE=no
PODMAN=$(echo $PROGRAM | cut -d'.' -f2)
PODMAN=${MKTREE_ENGINE:-podman}
CONTEXT=..
fi

Expand Down

0 comments on commit 05c3b37

Please sign in to comment.