Skip to content

Commit b05206d

Browse files
committed
tests/cstrans-df-run: cover the --shell-form option
Related: https://issues.redhat.com/browse/KFLUXBUGS-1943 Related: https://issues.redhat.com/browse/OSH-809 Closes: #217
1 parent b87e7a4 commit b05206d

13 files changed

+336
-5
lines changed
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM openshift/golang-builder:1.11 AS builder
2+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
3+
4+
ARG ALERTMANAGER_GOPATH=/go/src/github.com/prometheus/alertmanager
5+
ARG BUILD_PROMU=false
6+
COPY . ${ALERTMANAGER_GOPATH}
7+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'cd ${ALERTMANAGER_GOPATH} && yum install -y prometheus-promu && make build && yum clean all'
8+
9+
FROM ubi7:7.6-159
10+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
11+
12+
ARG ALERTMANAGER_GOPATH=/go/src/github.com/prometheus/alertmanager
13+
COPY --from=builder ${ALERTMANAGER_GOPATH}/amtool /bin/amtool
14+
COPY --from=builder ${ALERTMANAGER_GOPATH}/alertmanager /bin/alertmanager
15+
COPY --from=builder ${ALERTMANAGER_GOPATH}/examples/ha/alertmanager.yml /etc/alertmanager/alertmanager.yml
16+
17+
EXPOSE 9093
18+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'mkdir -p /alertmanager'
19+
VOLUME [ "/alertmanager" ]
20+
WORKDIR /etc/alertmanager
21+
ENTRYPOINT [ "/bin/alertmanager" ]
22+
CMD [ "--storage.path=/alertmanager" ]
23+
24+
LABEL \
25+
io.k8s.description="This is the Prometheus Alert Manager image." \
26+
com.redhat.component="golang-github-prometheus-alertmanager-container" \
27+
maintainer="OpenShift Development <[email protected]>" \
28+
name="openshift/ose-prometheus-alertmanager" \
29+
License="ASL 2.0" \
30+
io.k8s.display-name="Prometheus Alert Manager" \
31+
io.openshift.build.source-location="https://github.com/openshift/prometheus-alertmanager" \
32+
io.openshift.build.commit.url="https://github.com/openshift/prometheus-alertmanager/commit/39c2c111ea818cd16dbd11e31cc682cf2b4042d3" \
33+
version="v4.1.0" \
34+
io.openshift.build.commit.id="39c2c111ea818cd16dbd11e31cc682cf2b4042d3" \
35+
release="201905191700" \
36+
vendor="Red Hat" \
37+
io.openshift.tags="openshift,prometheus"
38+
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM openshift/golang-builder:1.11 AS builder
2+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
3+
COPY . ${ALERTMANAGER_GOPATH}
4+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'cd ${ALERTMANAGER_GOPATH} && yum install -y prometheus-promu && make build && yum clean all'
5+
FROM ubi7:7.6-159
6+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
7+
8+
CMD [ "--storage.path=/alertmanager" ]
9+
10+
LABEL \
11+
io.k8s.description="This is the Prometheus Alert Manager image." \
12+
com.redhat.component="golang-github-prometheus-alertmanager-container" \
13+
maintainer="OpenShift Development <[email protected]>"
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM openshift/golang-builder:1.11 AS builder
2+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
3+
COPY . ${ALERTMANAGER_GOPATH}
4+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'make'
5+
FROM ubi7:7.6-159
6+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
7+
8+
CMD [ "--storage.path=/alertmanager" ]
9+
10+
LABEL \
11+
io.k8s.description="This is the Prometheus Alert Manager image." \
12+
com.redhat.component="golang-github-prometheus-alertmanager-container" \
13+
maintainer="OpenShift Development <[email protected]>"
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM openshift/golang-builder:1.11 AS builder
2+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
3+
COPY . ${ALERTMANAGER_GOPATH}
4+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'go' 'build' '--verbose'
5+
FROM ubi7:7.6-159
6+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
7+
8+
CMD [ "--storage.path=/alertmanager" ]
9+
10+
LABEL \
11+
io.k8s.description="This is the Prometheus Alert Manager image." \
12+
com.redhat.component="golang-github-prometheus-alertmanager-container" \
13+
maintainer="OpenShift Development <[email protected]>"
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM openshift/golang-builder:1.11 AS builder
2+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
3+
COPY . ${ALERTMANAGER_GOPATH}
4+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' $'echo \"OK\"'
5+
FROM ubi7:7.6-159
6+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
7+
8+
CMD [ "--storage.path=/alertmanager" ]
9+
10+
LABEL \
11+
io.k8s.description="This is the Prometheus Alert Manager image." \
12+
com.redhat.component="golang-github-prometheus-alertmanager-container" \
13+
maintainer="OpenShift Development <[email protected]>"
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM openshift/golang-builder:1.11 AS builder
2+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
3+
COPY . ${ALERTMANAGER_GOPATH}
4+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' $'echo \"OK\"'
5+
FROM ubi7:7.6-159
6+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
7+
8+
CMD [ "--storage.path=/alertmanager" ]
9+
10+
LABEL \
11+
io.k8s.description="This is the Prometheus Alert Manager image." \
12+
com.redhat.component="golang-github-prometheus-alertmanager-container" \
13+
maintainer="OpenShift Development <[email protected]>"
+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#
2+
# This is the OpenShift ovn overlay network image.
3+
# it provides an overlay network using ovs/ovn/ovn-kube
4+
#
5+
# The standard name for this image is ovn-kube
6+
7+
# Notes:
8+
# This is for a build where the ovn-kubernetes utilities
9+
# are built in this Dockerfile and included in the image (instead of the rpm)
10+
#
11+
12+
FROM openshift/golang-builder:1.10 AS builder
13+
ENV SOURCE_GIT_COMMIT=674977b1fdf0f966970179b9fae338f8347b2dfe SOURCE_GIT_TAG=674977b
14+
15+
WORKDIR /go-controller
16+
COPY go-controller/ .
17+
18+
# build the binaries
19+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'make'
20+
21+
FROM openshift/ose-cli:v4.1.0-201905191700 AS cli
22+
ENV SOURCE_GIT_COMMIT=674977b1fdf0f966970179b9fae338f8347b2dfe SOURCE_GIT_TAG=674977b
23+
24+
FROM openshift/ose-base:v4.1.0-201905191700
25+
ENV SOURCE_GIT_COMMIT=674977b1fdf0f966970179b9fae338f8347b2dfe SOURCE_GIT_TAG=674977b
26+
27+
USER root
28+
29+
ENV PYTHONDONTWRITEBYTECODE yes
30+
31+
# install needed rpms - openvswitch must be 2.9.2 or higher
32+
# install selinux-policy first to avoid a race
33+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' $'yum install -y \tselinux-policy && \tyum clean all'
34+
35+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' $'yum install -y \tPyYAML bind-utils \topenssl \tnumactl-libs \tfirewalld-filesystem \tlibpcap \thostname \t\"openvswitch2.11\" \t\"openvswitch2.11-ovn-common\" \t\"openvswitch2.11-ovn-central\" \t\"openvswitch2.11-ovn-host\" \t\"openvswitch2.11-ovn-vtep\" \t\"openvswitch2.11-devel\" \tcontainernetworking-plugins \tiproute strace socat && \tyum clean all'
36+
37+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'rm -rf /var/cache/yum'
38+
39+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'mkdir -p /var/run/openvswitch && mkdir -p /etc/cni/net.d && mkdir -p /opt/cni/bin && mkdir -p /usr/libexec/cni/'
40+
41+
COPY --from=builder /go-controller/_output/go/bin/ovnkube /usr/bin/
42+
COPY --from=builder /go-controller/_output/go/bin/ovn-kube-util /usr/bin/
43+
COPY --from=builder /go-controller/_output/go/bin/ovn-k8s-cni-overlay /usr/libexec/cni/ovn-k8s-cni-overlay
44+
45+
COPY --from=cli /usr/bin/oc /usr/bin
46+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'ln -s /usr/bin/oc /usr/bin/kubectl'
47+
48+
# copy git commit number into image
49+
COPY .git/HEAD /root/.git/HEAD
50+
COPY .git/refs/heads/ /root/.git/refs/heads/
51+
52+
# ovnkube.sh is the entry point. This script examines environment
53+
# variables to direct operation and configure ovn
54+
COPY dist/images/ovnkube.sh /root/
55+
COPY dist/images/ovn-debug.sh /root/
56+
# override the rpm's ovn_k8s.conf with this local copy
57+
COPY dist/images/ovn_k8s.conf /etc/openvswitch/ovn_k8s.conf
58+
59+
60+
61+
WORKDIR /root
62+
ENTRYPOINT /root/ovnkube.sh
63+
64+
LABEL \
65+
io.k8s.description="This is a component of OpenShift Container Platform that provides an overlay network using ovn." \
66+
com.redhat.component="ose-ovn-kubernetes-container" \
67+
maintainer="Phil Cameron <[email protected]>" \
68+
name="openshift/ose-ovn-kubernetes" \
69+
License="GPLv2+" \
70+
io.k8s.display-name="ovn kubernetes" \
71+
io.openshift.build.source-location="https://github.com/openshift/ovn-kubernetes" \
72+
summary="This is a component of OpenShift Container Platform that provides an overlay network using ovn." \
73+
io.openshift.build.commit.url="https://github.com/openshift/ovn-kubernetes/commit/674977b1fdf0f966970179b9fae338f8347b2dfe" \
74+
version="v4.1.0" \
75+
io.openshift.build.commit.id="674977b1fdf0f966970179b9fae338f8347b2dfe" \
76+
release="201905231545" \
77+
vendor="Red Hat" \
78+
io.openshift.tags="openshift"
79+
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM openshift/golang-builder:1.11 AS builder
2+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
3+
COPY . ${ALERTMANAGER_GOPATH}
4+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' $'echo \tOK\n'
5+
FROM ubi7:7.6-159
6+
ENV SOURCE_GIT_COMMIT=39c2c111ea818cd16dbd11e31cc682cf2b4042d3 SOURCE_GIT_TAG=golang-github-prometheus-alertmanager-4.0.0-0.100.0-115-g39c2c11
7+
8+
CMD [ "--storage.path=/alertmanager" ]
9+
10+
LABEL \
11+
io.k8s.description="This is the Prometheus Alert Manager image." \
12+
com.redhat.component="golang-github-prometheus-alertmanager-container" \
13+
maintainer="OpenShift Development <[email protected]>"
+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
FROM ubi8/s2i-core:rhel8.1
2+
3+
# RHSCL rh-nginx114 image.
4+
5+
EXPOSE 8080
6+
EXPOSE 8443
7+
8+
ENV NAME=nginx \
9+
NGINX_VERSION=1.14 \
10+
NGINX_SHORT_VER=114 \
11+
VERSION=0
12+
13+
ENV SUMMARY="Platform for running nginx $NGINX_VERSION or building nginx-based application" \
14+
DESCRIPTION="Nginx is a web server and a reverse proxy server for HTTP, SMTP, POP3 and IMAP \
15+
protocols, with a strong focus on high concurrency, performance and low memory usage. The container \
16+
image provides a containerized packaging of the nginx $NGINX_VERSION daemon. The image can be used \
17+
as a base image for other applications based on nginx $NGINX_VERSION web server. \
18+
Nginx server image can be extended using source-to-image tool."
19+
20+
LABEL summary="${SUMMARY}" \
21+
description="${DESCRIPTION}" \
22+
io.k8s.description="${DESCRIPTION}" \
23+
io.k8s.display-name="Nginx ${NGINX_VERSION}" \
24+
io.openshift.expose-services="8080:http" \
25+
io.openshift.expose-services="8443:https" \
26+
io.openshift.tags="builder,${NAME},${NAME}-${NGINX_SHORT_VER}" \
27+
com.redhat.component="${NAME}-${NGINX_SHORT_VER}-container" \
28+
name="rhel8/${NAME}-${NGINX_SHORT_VER}" \
29+
version="1" \
30+
maintainer="SoftwareCollections.org <[email protected]>" \
31+
help="For more information visit https://github.com/sclorg/${NAME}-container" \
32+
usage="s2i build <SOURCE-REPOSITORY> rhel8/${NAME}-${NGINX_SHORT_VER}:latest <APP-NAME>"
33+
34+
ENV NGINX_CONFIGURATION_PATH=${APP_ROOT}/etc/nginx.d \
35+
NGINX_CONF_PATH=/etc/nginx/nginx.conf \
36+
NGINX_DEFAULT_CONF_PATH=${APP_ROOT}/etc/nginx.default.d \
37+
NGINX_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/nginx \
38+
NGINX_APP_ROOT=${APP_ROOT} \
39+
NGINX_LOG_PATH=/var/log/nginx
40+
41+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' $'yum -y module enable nginx:$NGINX_VERSION && INSTALL_PKGS=\"nss_wrapper bind-utils gettext hostname nginx\" && yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && rpm -V $INSTALL_PKGS && yum clean all'
42+
43+
# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
44+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
45+
46+
# Copy extra files to the image.
47+
COPY ./root/ /
48+
49+
# In order to drop the root user, we have to make some directories world
50+
# writeable as OpenShift default security model is to run the container under
51+
# random UID.
52+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'sed -i -f ${NGINX_APP_ROOT}/nginxconf-fed.sed ${NGINX_CONF_PATH} && chmod a+rwx ${NGINX_CONF_PATH} && mkdir -p ${NGINX_APP_ROOT}/etc/nginx.d/ && mkdir -p ${NGINX_APP_ROOT}/etc/nginx.default.d/ && mkdir -p ${NGINX_APP_ROOT}/src/nginx-start/ && mkdir -p ${NGINX_CONTAINER_SCRIPTS_PATH}/nginx-start && mkdir -p ${NGINX_LOG_PATH} && chmod -R a+rwx ${NGINX_APP_ROOT}/etc && chmod -R a+rwx /var/lib/nginx && chmod -R a+rwx ${NGINX_CONTAINER_SCRIPTS_PATH}/nginx-start && chown -R 1001:0 ${NGINX_APP_ROOT} && chown -R 1001:0 /var/lib/nginx && chown -R 1001:0 ${NGINX_CONTAINER_SCRIPTS_PATH}/nginx-start && chmod -R a+rwx /var/run && chown -R 1001:0 /var/run && rpm-file-permissions'
53+
54+
USER 1001
55+
56+
# Not using VOLUME statement since it's not working in OpenShift Online:
57+
# https://github.com/sclorg/httpd-container/issues/30
58+
# VOLUME ["/usr/share/nginx/html"]
59+
# VOLUME ["/var/log/nginx/"]
60+
61+
CMD $STI_SCRIPTS_PATH/usage
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#@follow_tag(registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:v1.19.10-202306161322.el8.g42c8e14)
2+
FROM registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:v1.19.10-202306161322.el8.g42c8e14 AS builder
3+
4+
COPY $REMOTE_SOURCE $REMOTE_SOURCE_DIR
5+
WORKDIR $REMOTE_SOURCE_DIR/app
6+
USER root
7+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'dnf install -y --setopt=tsflags=nodocs git'
8+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' $'sed -i \'s/CGO_ENABLED=0 //;s/containers_image_openpgp/& strictfipsruntime/\' Makefile'
9+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'go mod vendor && GOEXPERIMENT=strictfipsruntime make build VERSION=${CI_CONTAINER_VERSION}'
10+
11+
#@follow_tag(registry.redhat.io/ubi8/podman)
12+
FROM registry.redhat.io/ubi8/podman:8.8-14.1697647490
13+
14+
LABEL com.redhat.component="quay-builder-container"
15+
LABEL name="quay/quay-builder-rhel8"
16+
LABEL version=${CI_CONTAINER_VERSION}
17+
LABEL io.k8s.display-name="Red Hat Quay - Builder"
18+
LABEL io.k8s.description="Red Hat Quay image builder"
19+
LABEL summary="Red Hat Quay image builder"
20+
LABEL maintainer "[email protected]"
21+
22+
COPY --from=builder $REMOTE_SOURCE_DIR/app/bin/quay-builder /usr/local/bin/quay-builder
23+
COPY --from=builder $REMOTE_SOURCE_DIR/app/buildpack/ssh-git.sh /ssh-git.sh
24+
COPY --from=builder $REMOTE_SOURCE_DIR/app/entrypoint.sh /home/podman/entrypoint.sh
25+
26+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' $'set -ex\t; dnf install -y --setopt=tsflags=nodocs --setopt=skip_missing_names_on_install=False git wget \t; dnf -y update && dnf -y -q clean all'
27+
28+
# Rootless/unprivileged buildah configurations
29+
# https://github.com/containers/buildah/blob/main/docs/tutorials/05-openshift-rootless-build.md
30+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' $'touch /etc/subgid /etc/subuid && chmod g=u /etc/subgid /etc/subuid /etc/passwd && echo \'podman:100000:65536\' > /etc/subuid && echo \'podman:100000:65536\' > /etc/subgid && \tmkdir -p /home/podman/.config/containers && (echo \'[storage]\';echo \'driver = \"vfs\"\') > /home/podman/.config/containers/storage.conf && sed -i \'s/short-name-mode=\"enforcing\"/short-name-mode=\"permissive\"/g\' /etc/containers/registries.conf && \tmkdir /certs /home/podman/.config/cni && chown podman:podman /certs /home/podman/.config/cni'
31+
32+
VOLUME ["/tmp", "/certs"]
33+
34+
WORKDIR /home/podman
35+
36+
USER podman
37+
38+
ENTRYPOINT ["sh", "/home/podman/entrypoint.sh"]
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Python cuda base #################################################################
2+
FROM cuda-base AS python-cuda-base
3+
4+
ENV VIRTUAL_ENV=/opt/vllm
5+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
6+
7+
# install cuda and common dependencies
8+
RUN --mount=type=cache,target=/root/.cache/pip --mount=type=bind,source=requirements-common.txt,target=requirements-common.txt --mount=type=bind,source=requirements-cuda.txt,target=requirements-cuda.txt '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'pip install -r requirements-cuda.txt'
9+
10+
## Development #################################################################
11+
FROM python-cuda-base AS dev
12+
13+
# install build and runtime dependencies
14+
RUN --mount=type=cache,target=/root/.cache/pip --mount=type=bind,source=requirements-common.txt,target=requirements-common.txt --mount=type=bind,source=requirements-cuda.txt,target=requirements-cuda.txt --mount=type=bind,source=requirements-dev.txt,target=requirements-dev.txt --mount=type=bind,source=requirements-lint.txt,target=requirements-lint.txt --mount=type=bind,source=requirements-test.txt,target=requirements-test.txt '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'pip3 install -r requirements-cuda.txt -r requirements-dev.txt'
15+
16+
## Builder #####################################################################
17+
FROM dev AS build
18+
19+
# install build dependencies
20+
RUN --mount=type=cache,target=/root/.cache/pip --mount=type=bind,source=requirements-build.txt,target=requirements-build.txt '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'pip install -r requirements-build.txt'
21+
22+
# install compiler cache to speed up compilation leveraging local or remote caching
23+
# git is required for the cutlass kernels
24+
RUN '/opt/cov-sa-2019.09/bin/cov-build' '--dir=/cov' '--append-log' 'sh' '-c' 'rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && rpm -ql epel-release && microdnf install -y git ccache && microdnf clean all'

tests/cstrans-df-run/CMakeLists.txt

+11-3
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,23 @@
1616
# along with csdiff. If not, see <http://www.gnu.org/licenses/>.
1717

1818
# a generic template for cstrans-df-run tests
19-
macro(test_cstrans_df_run tst)
19+
macro(test_cstrans_df_run_core tst opt tag)
2020
set(test_data_prefix "${CMAKE_CURRENT_SOURCE_DIR}/${tst}")
2121
set(cmd "${CMAKE_BINARY_DIR}/src/cstrans-df-run")
22-
set(cmd "${cmd} -- /opt/cov-sa-2019.09/bin/cov-build --dir=/cov --append-log")
22+
set(cmd "${cmd} ${opt} -- /opt/cov-sa-2019.09/bin/cov-build --dir=/cov --append-log")
2323
set(cmd "${cmd} <${test_data_prefix}-stdin.txt")
24-
set(cmd "${cmd} | ${diffcmd} ${test_data_prefix}-stdout.txt -")
24+
set(cmd "${cmd} | ${diffcmd} ${test_data_prefix}${tag}-stdout.txt -")
2525
add_test_wrap("cstrans-df-run-${tst}" "${cmd}")
2626
endmacro()
2727

28+
macro(test_cstrans_df_run tst)
29+
# add default test using exec form
30+
test_cstrans_df_run_core(${tst} "" "")
31+
32+
# add another test using shell form
33+
test_cstrans_df_run_core(${tst} "--shell-form" "-sf")
34+
endmacro()
35+
2836
# cstrans-df-run tests
2937
test_cstrans_df_run(0001)
3038
test_cstrans_df_run(0002)

0 commit comments

Comments
 (0)