#59 tmt: Simplify test configuration
Merged 5 months ago by ngompa. Opened 5 months ago by ngompa.

file modified
+3 -24
@@ -1,28 +1,7 @@ 

  summary: Build GNOME image

- prepare:

-   - name: install packages

-     how: install

-     package:

-       - distribution-gpg-keys

-       - fatcat

-       - git-core

-       - kiwi

-       - libselinux-utils

-       - p7zip-plugins

-       - python3-boto3

-       - rpmdistro-repoquery

-       - zip

-       - zstd

  discover:

-     how: shell

-     tests:

-       - name: build image

-         test: |

-           setenforce 0

-           $TMT_TREE/builder.py build gnome

-           $TMT_TREE/builder.py package gnome

-           $TMT_TREE/builder.py tmt gnome

-           setenforce 1

- 

+     how: fmf

+ environment:

+     image_variant: gnome

  execute:

      how: tmt

file modified
+3 -24
@@ -1,28 +1,7 @@ 

  summary: Build KDE image

- prepare:

-   - name: install packages

-     how: install

-     package:

-       - distribution-gpg-keys

-       - fatcat

-       - git-core

-       - kiwi

-       - libselinux-utils

-       - p7zip-plugins

-       - python3-boto3

-       - rpmdistro-repoquery

-       - zip

-       - zstd

  discover:

-     how: shell

-     tests:

-       - name: build image

-         test: |

-           setenforce 0

-           $TMT_TREE/builder.py build kde

-           $TMT_TREE/builder.py package kde

-           $TMT_TREE/builder.py tmt kde

-           setenforce 1

- 

+     how: fmf

+ environment:

+     image_variant: kde

  execute:

      how: tmt

file modified
+3 -24
@@ -1,28 +1,7 @@ 

  summary: Build Minimal image

- prepare:

-   - name: install packages

-     how: install

-     package:

-       - distribution-gpg-keys

-       - fatcat

-       - git-core

-       - kiwi

-       - libselinux-utils

-       - p7zip-plugins

-       - python3-boto3

-       - rpmdistro-repoquery

-       - zip

-       - zstd

  discover:

-     how: shell

-     tests:

-       - name: build image

-         test: |

-           setenforce 0

-           $TMT_TREE/builder.py build minimal

-           $TMT_TREE/builder.py package minimal

-           $TMT_TREE/builder.py tmt minimal

-           setenforce 1

- 

+     how: fmf

+ environment:

+     image_variant: minimal

  execute:

      how: tmt

file modified
+3 -24
@@ -1,28 +1,7 @@ 

  summary: Build Server image

- prepare:

-   - name: install packages

-     how: install

-     package:

-       - distribution-gpg-keys

-       - fatcat

-       - git-core

-       - kiwi

-       - libselinux-utils

-       - p7zip-plugins

-       - python3-boto3

-       - rpmdistro-repoquery

-       - zip

-       - zstd

  discover:

-     how: shell

-     tests:

-       - name: build image

-         test: |

-           setenforce 0

-           $TMT_TREE/builder.py build server

-           $TMT_TREE/builder.py package server

-           $TMT_TREE/builder.py tmt server

-           setenforce 1

- 

+     how: fmf

+ environment:

+     image_variant: server

  execute:

      how: tmt

@@ -0,0 +1,21 @@ 

+ summary: Build image

+ require:

+   - distribution-gpg-keys

+   - fatcat

+   - git-core

+   - kiwi

+   - libselinux-utils

+   - p7zip-plugins

+   - python3-boto3

+   - rpmdistro-repoquery

+   - zip

+   - zstd

+ framework: shell

+ path: /

+ test: |

+   setenforce 0

+   ./builder.py build $image_variant

+   ./builder.py package $image_variant

+   ./builder.py tmt $image_variant

+   setenforce 1

+ duration: 60m

We are running the same test multiple times, so we can de-duplicate
the logic so that it is written only once and reused for each variant.

rebased onto 0327f67

5 months ago

rebased onto a8e290c

5 months ago

rebased onto 1c7d119

5 months ago

rebased onto 806f23b

5 months ago

Pull-Request has been merged by ngompa

5 months ago