mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
test pkg/dummy
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
parent
0cb96dcfa0
commit
857f53cdff
9
pkg/dummy/Dockerfile
Normal file
9
pkg/dummy/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM linuxkit/alpine:5d89cd05a567f9bfbe4502be1027a422d46f4a75 AS build
|
||||
RUN apk add --no-cache --initdb make
|
||||
|
||||
FROM scratch
|
||||
ENTRYPOINT []
|
||||
CMD []
|
||||
WORKDIR /
|
||||
COPY --from=build /usr/bin/make /usr/bin/
|
||||
COPY infile infile
|
1
pkg/dummy/build.yml
Normal file
1
pkg/dummy/build.yml
Normal file
@ -0,0 +1 @@
|
||||
image: dummy
|
1
pkg/dummy/infile
Normal file
1
pkg/dummy/infile
Normal file
@ -0,0 +1 @@
|
||||
This is a silly input file for testing.
|
23
test/cases/040_packages/001_dummy/test.sh
Normal file
23
test/cases/040_packages/001_dummy/test.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that the dummy pkg exists
|
||||
# LABELS:
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
NAME=dummy
|
||||
|
||||
clean_up() {
|
||||
rm -rf ${NAME}-*
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
linuxkit build -format kernel+initrd -name "${NAME}" test.yml
|
||||
# all we are checking is that we can build using the dummy package, which
|
||||
# was not pushed out
|
||||
|
||||
exit 0
|
12
test/cases/040_packages/001_dummy/test.yml
Normal file
12
test/cases/040_packages/001_dummy/test.yml
Normal file
@ -0,0 +1,12 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:5.10.104
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:8f1e6a0747acbbb4d7e24dc98f97faa8d1c6cec7
|
||||
- linuxkit/runc:f01b88c7033180d50ae43562d72707c6881904e4
|
||||
onboot:
|
||||
- name: dummy
|
||||
image: linuxkit/dummy:611bf5a6f37a3f508c3b8c7be5fb57fd70132c3e
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:39d99e5909b6f8faccedc78d6d2646cdb6c9ed9c
|
||||
command: ["/bin/sh", "/poweroff.sh", "10"]
|
Loading…
Reference in New Issue
Block a user