Commit b9c3532 1 parent 159c16d commit b9c3532 Copy full SHA for b9c3532
File tree 4 files changed +71
-7
lines changed
4 files changed +71
-7
lines changed Original file line number Diff line number Diff line change @@ -8,28 +8,28 @@ consider to create image for interested test for easy reuse.
8
8
9
9
## Getting started
10
10
11
- ```
11
+ ``` bash
12
12
git clone https://github.com/intel/lkp-tests.git
13
13
14
14
cd lkp-tests
15
15
16
16
image=debian/buster
17
17
hostname=lkp-docker.${image// \/ / .}
18
18
19
- docker build -f docker/${image%%/*}/Dockerfile -t lkp-tests/${image} -t lkp-tests/${image}:$(git log -1 --pretty=%h) --build-arg hostname=$hostname --build-arg base_image=$(if [[ "$image" == opensuse/* ]]; then echo "$image" | sed 's|opensuse/\([^/]*\)/|opensuse/\1:|'; else echo ${image//\//:}; fi) .
19
+ docker build -f docker/${image%%/* } /Dockerfile -t lkp-tests/${image} -t lkp-tests/${image} :$( git log -1 --pretty=%h) --build-arg hostname=$hostname --build-arg base_image=$( if [[ " $image " == opensuse/* ]]; then echo " $image " | sed ' s|opensuse/\([^/]*\)/|opensuse/\1:|' ; elif [[ " $image " == redhat/ * ]] ; then echo " $image " | sed ' s|redhat/\([^/]*\)/|redhat/\1:| ' ; else echo ${image// \/ /: } ; fi) .
20
20
21
21
docker run --rm --entrypoint ' ' lkp-tests/${image} lkp help
22
22
```
23
23
24
24
The alternative method to build the image is
25
25
26
- ```
26
+ ``` bash
27
27
lkp docker build --image $image --hostname $hostname
28
28
```
29
29
30
30
## Run one atomic job
31
31
32
- ```
32
+ ``` bash
33
33
# Add --privileged option to allow privileged access like dmesg, sysctl. Use
34
34
# this with caution.
35
35
docker run -d -h $hostname --name $hostname \
@@ -56,13 +56,13 @@ docker exec -it $hostname bash
56
56
57
57
The alternative method to attach to a terminal in the docker container is
58
58
59
- ```
59
+ ``` bash
60
60
lkp docker attach --container $hostname
61
61
```
62
62
63
63
The alternative method to run the job is
64
64
65
- ```
65
+ ``` bash
66
66
lkp docker test -i $image -j hackbench.yaml -g pipe-8-process-1600 --hostname $hostname
67
67
68
68
# The flag --any can be set to let lkp randomly choose a job from the suite
@@ -76,7 +76,7 @@ lkp docker rt --container $hostname --options "hackbench"
76
76
77
77
## Test by lkp docker
78
78
79
- ```
79
+ ``` bash
80
80
image=debian/bookworm
81
81
hostname=lkp-docker.${image// \/ / .}
82
82
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ cd $LKP_SRC
60
60
# (example: opensuse/leap:latest -> opensuse/leap:latest)
61
61
if [[ " $opt_image " == opensuse/* ]]; then
62
62
base_image=$( echo " $opt_image " | sed ' s|opensuse/\([^/]*\)/|opensuse/\1:|' )
63
+ elif [[ " $opt_image " == redhat/* ]]; then
64
+ base_image=$( echo " $opt_image " | sed ' s|redhat/\([^/]*\)/|redhat/\1:|' )
63
65
else
64
66
base_image=${opt_image// \/ /: }
65
67
fi
Original file line number Diff line number Diff line change
1
+ [centos-vault]
2
+ name=CentOS Vault Repository - BaseOS
3
+ baseurl=https://vault.centos.org/8-stream/BaseOS/x86_64/os
4
+ enabled=1
5
+ gpgcheck=1
6
+ gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official-SHA256
7
+
8
+ [centos-vault-extras]
9
+ name=CentOS Vault Repository - Extras
10
+ baseurl=https://vault.centos.org/8-stream/extras/x86_64/os/
11
+ enabled=1
12
+ gpgcheck=1
13
+ gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official-SHA256
14
+
15
+ [centos-vault-powertools]
16
+ name=CentOS Vault Repository - PowerTools
17
+ baseurl=https://vault.centos.org/8-stream/PowerTools/x86_64/os/
18
+ enabled=1
19
+ gpgcheck=1
20
+ gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official-SHA256
21
+
22
+ [centos-vault-appstream]
23
+ name=CentOS Vault Repository - AppStream
24
+ baseurl=https://vault.centos.org/8-stream/AppStream/x86_64/os/
25
+ enabled=1
26
+ gpgcheck=1
27
+ gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official-SHA256
Original file line number Diff line number Diff line change
1
+ # base image can be redhat/ubi8 etc.
2
+ ARG base_image
3
+ FROM ${base_image}
4
+
5
+ # lkp install generates hosts/$HOSTNAME during create_host_config. Here it requires
6
+ # user to pass hostname arg to specify a consistent name instead of the container
7
+ # hostname when building the image.
8
+ ARG hostname=lkp-docker
9
+ ENV HOSTNAME=${hostname}
10
+
11
+ WORKDIR /lkp/lkp-tests
12
+
13
+ COPY . ./
14
+
15
+ # UBI8 repos do not have some packages, hence we have to download from CentOS Vault
16
+ RUN cp ./docker/redhat/CentOS-8-Vault.repo /etc/yum.repos.d/ && \
17
+ dnf config-manager --set-disabled ubi-8-*
18
+
19
+ # Force ignore error when running `dnf upgrade -y`
20
+ # Error: Problem: The operation would result in removing the following protected packages: redhat-release
21
+ RUN (dnf upgrade -y || true) && \
22
+ dnf install -y \
23
+ # kernel-tools installs turbostat
24
+ kernel-tools \
25
+ make \
26
+ # procps installs vmstat, sysctl, etc to partially persistent commonly used dependencies
27
+ procps \
28
+ perf \
29
+ # python3 required by libnuma
30
+ python3 \
31
+ hostname && \
32
+ make install && \
33
+ lkp install
34
+
35
+ ENTRYPOINT ["bash" , "-c" , "sleep infinity" ]
You can’t perform that action at this time.
0 commit comments