11summary: Run anaconda tests granurally on CentOS stream images
2+ description: |
3+ Execute TMT test each test alone, without running whole testsuire.
4+ example how to run it:
5+ tmt -vv run \
6+ -e ISO_URL=https://composes.stream.centos.org/stream-10/production/latest-CentOS-Stream/compose/BaseOS/x86_64/iso/CentOS-Stream-10-20251003.0-x86_64-boot.iso \
7+ -e PLATFORM_PARAM="--platform rhel10"
8+ plan --name granular test --name keyboard
9+ possible to pass
10+
211provision:
312 hardware:
413 virtualization:
514 is-supported: true
615 memory: '>= 8 GB'
716
17+ environment:
18+ DATA_DIR: /opt/anaconda_data_dir
19+ ISO_URL: https://composes.stream.centos.org/stream-10/production/latest-CentOS-Stream/compose/BaseOS/x86_64/iso/CentOS-Stream-10-20251003.0-x86_64-boot.iso
20+ # PLATFORM_PARAM is passed to TMT tests for launch script. It could be empty in case of fedora.
21+ PLATFORM_PARAM: "--platform rhel10"
22+
823discover:
924 - how: fmf
1025 filter: "tag: -knownfailure & tag: -manual & tag:-skip-on-rhel"
@@ -20,9 +35,22 @@ prepare:
2035 - qemu-kvm
2136 - libvirt
2237 - git
23- # - how: shell
24- # script:
25- # - curl --insecure -o ./data/images/boot-rhel10.iso http://ftp.sh.cvut.cz/centos-stream/10-stream/BaseOS/x86_64/iso/CentOS-Stream-10-20250707.0-x86_64-boot.iso
38+ - how: shell
39+ name: prepare directory structure
40+ script:
41+ - mkdir -p $DATA_DIR/{logs,images}
42+ - chmod a+rwx $DATA_DIR
43+ - how: shell
44+ name: download image to proper location
45+ script: |
46+ FILE_NAME=$(basename $ISO_URL)
47+ IMAGE_DEST="$DATA_DIR/images/$FILE_NAME"
48+ TARGET_FILE="boot-${PLATFORM_PARAM##* }.iso"
49+ if [ ! -e $IMAGE_DEST ]; then
50+ curl --insecure -o "$IMAGE_DEST" "$ISO_URL"
51+ fi
52+ # file has to be hardlink or direct file, symlink does not work well here.
53+ ln -f "$IMAGE_DEST" "$(dirname $IMAGE_DEST)/$TARGET_FILE"
2654
2755report:
2856 how: html
0 commit comments