Compare commits
9 commits
rawhide
...
private-mo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d743d78502 |
||
|
|
7a22a385d3 |
||
|
|
375bdd9f74 |
||
|
|
b015376901 |
||
|
|
255459586b |
||
|
|
aeaa4965de |
||
|
|
cc53b84c4b |
||
|
|
a52dfc677d | ||
|
|
5323da2528 |
7 changed files with 1318 additions and 1018 deletions
|
|
@ -1 +0,0 @@
|
|||
1
|
||||
161
.gitignore
vendored
161
.gitignore
vendored
|
|
@ -114,157 +114,12 @@
|
|||
/lorax-27.8.tar.gz
|
||||
/lorax-27.9.tar.gz
|
||||
/lorax-27.10.tar.gz
|
||||
/lorax-templates-gitdcac902.tar.gz
|
||||
/lorax-templates-git619e686.tar.gz
|
||||
/lorax-templates-git4e7dd97.tar.gz
|
||||
/lorax-27.11.tar.gz
|
||||
/lorax-28.0.tar.gz
|
||||
/lorax-28.1.tar.gz
|
||||
/lorax-28.2.tar.gz
|
||||
/lorax-28.3.tar.gz
|
||||
/lorax-28.4.tar.gz
|
||||
/lorax-28.5.tar.gz
|
||||
/lorax-28.6.tar.gz
|
||||
/lorax-28.7.tar.gz
|
||||
/lorax-28.8.tar.gz
|
||||
/lorax-29.0.tar.gz
|
||||
/lorax-29.1.tar.gz
|
||||
/lorax-29.2.tar.gz
|
||||
/lorax-29.3.tar.gz
|
||||
/lorax-29.4.tar.gz
|
||||
/lorax-29.5.tar.gz
|
||||
/lorax-29.6.tar.gz
|
||||
/lorax-29.7.tar.gz
|
||||
/lorax-29.8.tar.gz
|
||||
/lorax-29.9.tar.gz
|
||||
/lorax-29.10.tar.gz
|
||||
/lorax-29.11.tar.gz
|
||||
/lorax-29.12.tar.gz
|
||||
/lorax-29.13.tar.gz
|
||||
/lorax-29.14.tar.gz
|
||||
/lorax-29.15.tar.gz
|
||||
/lorax-30.0.tar.gz
|
||||
/lorax-30.1.tar.gz
|
||||
/lorax-30.2.tar.gz
|
||||
/lorax-30.3.tar.gz
|
||||
/lorax-30.4.tar.gz
|
||||
/lorax-30.5.tar.gz
|
||||
/lorax-30.6.tar.gz
|
||||
/lorax-30.7.tar.gz
|
||||
/lorax-30.8.tar.gz
|
||||
/lorax-30.9.tar.gz
|
||||
/lorax-30.10.tar.gz
|
||||
/lorax-30.12.tar.gz
|
||||
/lorax-30.13.tar.gz
|
||||
/lorax-30.14.tar.gz
|
||||
/lorax-30.15.tar.gz
|
||||
/lorax-30.16.tar.gz
|
||||
/lorax-31.0.tar.gz
|
||||
/lorax-31.1.tar.gz
|
||||
/lorax-31.2.tar.gz
|
||||
/lorax-31.3.tar.gz
|
||||
/lorax-31.4.tar.gz
|
||||
/lorax-31.5.tar.gz
|
||||
/lorax-31.6.tar.gz
|
||||
/lorax-31.7.tar.gz
|
||||
/lorax-31.8.tar.gz
|
||||
/lorax-31.9.tar.gz
|
||||
/lorax-31.10.tar.gz
|
||||
/lorax-32.0.tar.gz
|
||||
/lorax-32.1.tar.gz
|
||||
/lorax-32.2.tar.gz
|
||||
/lorax-32.3.tar.gz
|
||||
/lorax-32.4.tar.gz
|
||||
/lorax-32.5.tar.gz
|
||||
/lorax-32.6.tar.gz
|
||||
/lorax-32.7.tar.gz
|
||||
/lorax-33.0.tar.gz
|
||||
/lorax-33.1.tar.gz
|
||||
/lorax-33.2.tar.gz
|
||||
/lorax-33.3.tar.gz
|
||||
/lorax-33.4.tar.gz
|
||||
/lorax-33.5.tar.gz
|
||||
/lorax-33.6.tar.gz
|
||||
/lorax-33.7.tar.gz
|
||||
/lorax-33.8.tar.gz
|
||||
/lorax-33.9.tar.gz
|
||||
/lorax-34.0.tar.gz
|
||||
/lorax-34.1.tar.gz
|
||||
/lorax-34.2.tar.gz
|
||||
/lorax-34.3.tar.gz
|
||||
/lorax-34.4.tar.gz
|
||||
/lorax-34.5.tar.gz
|
||||
/lorax-34.6.tar.gz
|
||||
/lorax-34.7.tar.gz
|
||||
/lorax-34.8.tar.gz
|
||||
/lorax-34.9.tar.gz
|
||||
/lorax-35.0.tar.gz
|
||||
/lorax-35.1.tar.gz
|
||||
/lorax-35.2.tar.gz
|
||||
/lorax-35.3.tar.gz
|
||||
/lorax-35.4.tar.gz
|
||||
/lorax-35.5.tar.gz
|
||||
/lorax-35.6.tar.gz
|
||||
/lorax-35.7.tar.gz
|
||||
/lorax-36.0.tar.gz
|
||||
/lorax-36.1.tar.gz
|
||||
/lorax-36.2.tar.gz
|
||||
/lorax-36.3.tar.gz
|
||||
/lorax-36.4.tar.gz
|
||||
/lorax-36.5.tar.gz
|
||||
/lorax-36.6.tar.gz
|
||||
/lorax-36.7.tar.gz
|
||||
/lorax-36.8.tar.gz
|
||||
/lorax-36.9.tar.gz
|
||||
/lorax-37.0.tar.gz
|
||||
/lorax-37.1.tar.gz
|
||||
/lorax-37.2.tar.gz
|
||||
/lorax-37.3.tar.gz
|
||||
/lorax-37.4.tar.gz
|
||||
/lorax-37.5.tar.gz
|
||||
/lorax-37.6.tar.gz
|
||||
/lorax-37.7.tar.gz
|
||||
/lorax-37.8.tar.gz
|
||||
/lorax-38.0.tar.gz
|
||||
/lorax-38.1.tar.gz
|
||||
/lorax-38.2.tar.gz
|
||||
/lorax-38.3.tar.gz
|
||||
/lorax-38.4.tar.gz
|
||||
/lorax-38.5.tar.gz
|
||||
/lorax-38.6.tar.gz
|
||||
/lorax-39.0.tar.gz
|
||||
/lorax-39.1.tar.gz
|
||||
/lorax-39.2.tar.gz
|
||||
/lorax-39.3.tar.gz
|
||||
/lorax-39.4.tar.gz
|
||||
/lorax-39.5.tar.gz
|
||||
/lorax-40.0.tar.gz
|
||||
/lorax-40.1.tar.gz
|
||||
/lorax-40.2.tar.gz
|
||||
/lorax-40.3.tar.gz
|
||||
/lorax-40.4.tar.gz
|
||||
/lorax-40.5.tar.gz
|
||||
/lorax-40.6.tar.gz
|
||||
/lorax-41.0.tar.gz
|
||||
/lorax-41.1.tar.gz
|
||||
/lorax-41.2.tar.gz
|
||||
/lorax-41.3.tar.gz
|
||||
/lorax-42.0.tar.gz
|
||||
/lorax-42.1.tar.gz
|
||||
/lorax-42.2.tar.gz
|
||||
/lorax-42.3.tar.gz
|
||||
/lorax-42.4.tar.gz
|
||||
/lorax-42.5.tar.gz
|
||||
/lorax-43.0.tar.gz
|
||||
/lorax-43.1.tar.gz
|
||||
/lorax-43.2.tar.gz
|
||||
/lorax-43.3.tar.gz
|
||||
/lorax-43.4.tar.gz
|
||||
/lorax-43.5.tar.gz
|
||||
/lorax-43.6.tar.gz
|
||||
/lorax-43.7.tar.gz
|
||||
/lorax-43.8.tar.gz
|
||||
/lorax-43.9.tar.gz
|
||||
/lorax-43.10.tar.gz
|
||||
/lorax-44.0.tar.gz
|
||||
/lorax-44.1.tar.gz
|
||||
/lorax-44.2.tar.gz
|
||||
/lorax-44.3.tar.gz
|
||||
/lorax-44.4.tar.gz
|
||||
/lorax-templates-gitd580bf2.tar.gz
|
||||
/lorax-27.11.boltron.7.tar.gz
|
||||
/lorax-27.11.boltron.8.tar.gz
|
||||
/lorax-27.11.boltron.9.tar.gz
|
||||
/lorax-27.11.boltron.10.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts: [bodhi_update_push_stable]
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
1888
lorax.spec
1888
lorax.spec
File diff suppressed because it is too large
Load diff
|
|
@ -1,3 +0,0 @@
|
|||
summary: Run Lorax tests (build an iso, run mkksiso on it)
|
||||
execute:
|
||||
script: ./tests/scripts/run_tests.sh
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (lorax-44.4.tar.gz) = e2be9a13a0aec657bfe9a32dbd51e9024dfcb89471dbc57b8206dccdcd71cf5561fb25f97a7fdaca2b0279a2966b142ddf4e4544577ac2b47171f19648742577
|
||||
SHA512 (lorax-27.11.boltron.10.tar.gz) = 687d57ab6f986dfd96b84e521bfd929826915119b6696aa3199dbe49e650a5a680ae99e89206006e6a259d0c327c6e57372fb44f88d8d2ea3be1bb3beae97102
|
||||
|
|
|
|||
|
|
@ -1,274 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
FAILANY=0
|
||||
BOOTISO=/var/tmp/lorax-fedora-iso/images/boot.iso
|
||||
KSNAME=fedora-minimal.ks
|
||||
KS="/usr/share/doc/lorax/$KSNAME"
|
||||
OUTISO=/var/tmp/out.iso
|
||||
ISODIR=/var/tmp/iso
|
||||
## Functions for testing mkkiso
|
||||
|
||||
|
||||
function fail {
|
||||
echo -e "\n\n#### ERROR: $1\n"
|
||||
FAIL=1
|
||||
FAILANY=1
|
||||
}
|
||||
|
||||
function status {
|
||||
if [ "$FAIL" -eq 0 ]; then
|
||||
echo -e "\n\n#### PASS: $1\n"
|
||||
else
|
||||
echo -e "\n\n#### FAIL: $1\n"
|
||||
fi
|
||||
}
|
||||
|
||||
function running {
|
||||
FAIL=0
|
||||
echo -e "\n\n#### RUN: $1\n"
|
||||
}
|
||||
|
||||
# unmount the dirs lazily because sometimes some outside thing is still touching them
|
||||
function umount_dirs {
|
||||
umount --lazy "$ISODIR"
|
||||
rm -f "$OUTISO"
|
||||
}
|
||||
|
||||
[ -e "$ISODIR" ] || mkdir "$ISODIR"
|
||||
|
||||
# Only add kickstart
|
||||
function ks_only {
|
||||
running "Add kickstart to iso using --ks"
|
||||
|
||||
mkksiso --ks $KS $BOOTISO $OUTISO || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_ks
|
||||
|
||||
status "Add kickstart to iso using --ks"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
# Only add kickstart
|
||||
function ks_pos_only {
|
||||
running "Add kickstart to iso using positional argument"
|
||||
|
||||
mkksiso $KS $BOOTISO $OUTISO || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_ks
|
||||
|
||||
status "Add kickstart to iso using positional argument"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
function test_ks {
|
||||
## This all needs to be another function
|
||||
# Is there a kickstart in / of the iso?
|
||||
[ -e "$ISODIR/$KSNAME" ] || fail "Missing kickstart"
|
||||
|
||||
# Is the kickstart in the GRUB2 BIOS config?
|
||||
grep "inst.ks=.*$KSNAME" "$ISODIR/boot/grub2/grub.cfg" || fail "Missing BIOS grub.cfg kickstart entry"
|
||||
|
||||
# Is the kickstart in the UEFI config?
|
||||
grep "inst.ks=.*$KSNAME" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry"
|
||||
}
|
||||
|
||||
# Add ks and cmdline
|
||||
function ks_serial {
|
||||
running "Add kickstart and serial cmdline"
|
||||
|
||||
mkksiso -c "console=ttyS0,115200n8" --ks $KS $BOOTISO $OUTISO || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_ks
|
||||
test_serial
|
||||
|
||||
status "Add kickstart and serial cmdline"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
# Only add serial console to cmdline
|
||||
function only_serial {
|
||||
running "Add serial cmdline (no ks)"
|
||||
|
||||
mkksiso -c "console=ttyS0,115200n8" $BOOTISO $OUTISO || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_serial
|
||||
|
||||
status "Add kickstart and serial cmdline"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
function test_serial {
|
||||
|
||||
# Is the serial in the BIOS config?
|
||||
grep "console=ttyS0,115200n8" "$ISODIR/boot/grub2/grub.cfg" || fail "Missing BIOS grub.cfg cmdline entry"
|
||||
|
||||
# Is the serial in the UEFI config?
|
||||
grep "console=ttyS0,115200n8" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg cmdline entry"
|
||||
}
|
||||
|
||||
# New VOLID
|
||||
function new_volid {
|
||||
running "Use a new VOLID"
|
||||
|
||||
mkksiso -V "mkksiso-test" --ks $KS $BOOTISO $OUTISO || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_ks
|
||||
test_volid
|
||||
|
||||
status "Use a new VOLID"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
function test_volid {
|
||||
# Is the VOLID in the BIOS config?
|
||||
grep "hd:LABEL=mkksiso-test" "$ISODIR/boot/grub2/grub.cfg" || fail "Missing BIOS grub.cfg kickstart entry"
|
||||
|
||||
# Is the VOLID in the UEFI config?
|
||||
grep "hd:LABEL=mkksiso-test" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry"
|
||||
}
|
||||
|
||||
# Add extra files
|
||||
function add_files {
|
||||
running "Add files"
|
||||
|
||||
mkksiso -a /etc/services --ks $KS $BOOTISO $OUTISO || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_ks
|
||||
test_files
|
||||
|
||||
status "Add files"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
# Remove quiet from the cmdline
|
||||
function remove_quiet {
|
||||
running "remove quiet from cmdline (no ks)"
|
||||
|
||||
mkksiso --rm "quiet" $BOOTISO $OUTISO || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_quiet
|
||||
|
||||
status "Remove quiet from cmdline"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
function test_quiet {
|
||||
# Is quiet in the BIOS config?
|
||||
! grep "append.*quiet" "$ISODIR/boot/grub2/grub.cfg" || fail "quiet not removed from BIOS grub.cfg cmdline entry"
|
||||
|
||||
# Is quiet in the UEFI config?
|
||||
! grep "linux.*quiet" "$ISODIR/EFI/BOOT/grub.cfg" || fail "quiet not removed from UEFI grub.cfg cmdline entry"
|
||||
}
|
||||
|
||||
# Test error if passing both --ks FILE and 3 arguments
|
||||
function test_two_kickstarts {
|
||||
running "Test two kickstart error"
|
||||
|
||||
mkksiso --ks $KS $KS $BOOTISO $OUTISO && fail "No error using --ks and positional argument"
|
||||
|
||||
status "Test two kickstart error"
|
||||
}
|
||||
|
||||
function test_files {
|
||||
[ -e "$ISODIR/services" ] || fail "Missing file from iso"
|
||||
}
|
||||
|
||||
# Test adding an updates.img file
|
||||
function add_updatesimg {
|
||||
running "Add updates.img"
|
||||
|
||||
# nothing in the file, just test that it is there
|
||||
touch /tmp/updates.img
|
||||
mkksiso -u /tmp/updates.img $BOOTISO $OUTISO || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_updatesimg
|
||||
|
||||
status "Add updates.img"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
function test_updatesimg {
|
||||
[ -e "$ISODIR/updates.img" ] || fail "Missing updates.img file from iso"
|
||||
grep "inst.updates=.*updates.img" "$ISODIR/boot/grub2/grub.cfg" || fail "Missing BIOS grub.cfg inst.updates entry"
|
||||
grep "inst.updates=.*updates.img" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg inst.updates entry"
|
||||
}
|
||||
|
||||
# All of the changes
|
||||
function run_all {
|
||||
running "Use all the options"
|
||||
|
||||
touch /tmp/updates.img
|
||||
mkksiso -u /tmp/updates.img -a /etc/services -V "mkksiso-test" -c "console=ttyS0,115200n8" --rm "quiet" --ks $KS $BOOTISO $OUTISO || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_ks
|
||||
test_serial
|
||||
test_volid
|
||||
test_files
|
||||
test_updatesimg
|
||||
test_quiet
|
||||
|
||||
status "Use all the options"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
# All of the changes as a user (lorax-ted) with --skip-mkefiboot
|
||||
function run_as_user {
|
||||
running "Use all the options as a user"
|
||||
|
||||
[ ! -e "/home/lorax-ted" ] && useradd -m lorax-ted
|
||||
touch /tmp/updates.img
|
||||
su - lorax-ted -c "mkksiso --skip-mkefiboot -u /tmp/updates.img -a /etc/services -V "mkksiso-test" -c "console=ttyS0,115200n8" --rm "quiet" --ks $KS $BOOTISO $OUTISO" || exit 1
|
||||
mount $OUTISO $ISODIR || exit 1
|
||||
|
||||
test_ks
|
||||
test_serial
|
||||
test_volid
|
||||
test_files
|
||||
test_updatesimg
|
||||
test_quiet
|
||||
|
||||
status "Use all the options as a user with --skip-mkefiboot"
|
||||
umount_dirs
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Gather up the list of system repo files and use them for lorax
|
||||
REPOS=$(for f in /etc/yum.repos.d/*repo; do echo -n "--repo $f "; done)
|
||||
if [ -z "$REPOS" ]; then
|
||||
echo "No system repos found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# NOTE: We must use --nomacboot because the test system doesn't have the hfsplus fs available
|
||||
# Run lorax using the host's repository configuration file
|
||||
if [ ! -e "$BOOTISO" ]; then
|
||||
running "Build boot.iso with lorax"
|
||||
lorax --product="Fedora" --version=rawhide --release=rawhide --volid="Fedora-rawhide-test" \
|
||||
$REPOS --isfinal --nomacboot /var/tmp/lorax-fedora-iso/ || exit 1
|
||||
fi
|
||||
|
||||
# Test mkksiso on the new boot.iso
|
||||
ks_only
|
||||
ks_pos_only
|
||||
ks_serial
|
||||
only_serial
|
||||
new_volid
|
||||
add_files
|
||||
remove_quiet
|
||||
test_two_kickstarts
|
||||
add_updatesimg
|
||||
run_all
|
||||
run_as_user
|
||||
|
||||
exit $FAILANY
|
||||
Loading…
Add table
Add a link
Reference in a new issue