From 69317f388137ccd24ef9880fe48558fb039c7149 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 29 Jun 2022 20:36:59 -0700 Subject: [PATCH] make IPA tests runnable, lamp disabled for now --- func/ipa.sh | 59 +++++++++++++++++++++++ func/stacks/ipa/00-ipa-pregame.sh | 0 func/stacks/ipa/10-install-ipa.sh | 0 func/stacks/ipa/11-configure-ipa.sh | 0 func/stacks/ipa/12-verify-ipa.sh | 0 func/stacks/ipa/20-ipa-user.sh | 0 func/stacks/ipa/21-ipa-service.sh | 0 func/stacks/ipa/22-ipa-dns.sh | 0 func/stacks/ipa/23-ipa-sudo.sh | 0 func/stacks/ipa/50-cleanup-ipa.sh | 0 func/stacks/lamp/00-install-lamp.sh | 0 func/stacks/lamp/01-verification.sh | 0 func/stacks/lamp/10-test-lamp.sh | 0 iso/empanadas/empanadas/util/dnf_utils.py | 10 ++++ 14 files changed, 69 insertions(+) create mode 100644 func/ipa.sh mode change 100644 => 100755 func/stacks/ipa/00-ipa-pregame.sh mode change 100644 => 100755 func/stacks/ipa/10-install-ipa.sh mode change 100644 => 100755 func/stacks/ipa/11-configure-ipa.sh mode change 100644 => 100755 func/stacks/ipa/12-verify-ipa.sh mode change 100644 => 100755 func/stacks/ipa/20-ipa-user.sh mode change 100644 => 100755 func/stacks/ipa/21-ipa-service.sh mode change 100644 => 100755 func/stacks/ipa/22-ipa-dns.sh mode change 100644 => 100755 func/stacks/ipa/23-ipa-sudo.sh mode change 100644 => 100755 func/stacks/ipa/50-cleanup-ipa.sh mode change 100755 => 100644 func/stacks/lamp/00-install-lamp.sh mode change 100755 => 100644 func/stacks/lamp/01-verification.sh mode change 100755 => 100644 func/stacks/lamp/10-test-lamp.sh diff --git a/func/ipa.sh b/func/ipa.sh new file mode 100644 index 0000000..19086c1 --- /dev/null +++ b/func/ipa.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Release Engineering Core Functionality Testing +# Louis Abel @nazunalika + +################################################################################ +# Settings and variables + +# Exits on any non-zero exit status - Disabled for now. +#set -e +# Undefined variables will cause an exit +set -u + +COMMON_EXPORTS='./common/exports.sh' +COMMON_IMPORTS='./common/imports.sh' +SELINUX=$(getenforce) + +# End +################################################################################ + +# shellcheck source=/dev/null disable=SC2015 +[ -f $COMMON_EXPORTS ] && source $COMMON_EXPORTS || { echo -e "\n[-] $(date): Variables cannot be sourced."; exit 1; } +# shellcheck source=/dev/null disable=SC2015 +[ -f $COMMON_IMPORTS ] && source $COMMON_IMPORTS || { echo -e "\n[-] $(date): Functions cannot be sourced."; exit 1; } +# Init log +# shellcheck disable=SC2015 +[ -e "$LOGFILE" ] && m_recycleLog || touch "$LOGFILE" +# SELinux check +if [ "$SELINUX" != "Enforcing" ]; then + echo -e "\n[-] $(date): SELinux is not enforcing." + exit 1 +fi + +r_log "internal" "Starting Release Engineering Core Tests" + +################################################################################ +# Script Work + +# Skip tests in a list - some tests are already -x, so it won't be an issue +if [ -e skip.list ]; then + r_log "internal" "Disabling tests" + # shellcheck disable=SC2162 + grep -E "^${RL_VER}" skip.list | while read line; do + # shellcheck disable=SC2086 + testFile="$(echo $line | cut -d '|' -f 2)" + r_log "internal" "SKIP ${testFile}" + chmod -x "${testFile}" + done + r_log "internal" "WARNING: Tests above were disabled." +fi + +# TODO: should we let $1 judge what directory is ran? +# TODO: get some stacks and lib in there + +#r_processor <(/usr/bin/find ./core -type f | sort -t'/') +#r_processor <(/usr/bin/find ./lib -type f | sort -t'/') +r_processor <(/usr/bin/find ./stacks/ipa -type f | sort -t'/') + +r_log "internal" "Core Tests completed" +exit 0 diff --git a/func/stacks/ipa/00-ipa-pregame.sh b/func/stacks/ipa/00-ipa-pregame.sh old mode 100644 new mode 100755 diff --git a/func/stacks/ipa/10-install-ipa.sh b/func/stacks/ipa/10-install-ipa.sh old mode 100644 new mode 100755 diff --git a/func/stacks/ipa/11-configure-ipa.sh b/func/stacks/ipa/11-configure-ipa.sh old mode 100644 new mode 100755 diff --git a/func/stacks/ipa/12-verify-ipa.sh b/func/stacks/ipa/12-verify-ipa.sh old mode 100644 new mode 100755 diff --git a/func/stacks/ipa/20-ipa-user.sh b/func/stacks/ipa/20-ipa-user.sh old mode 100644 new mode 100755 diff --git a/func/stacks/ipa/21-ipa-service.sh b/func/stacks/ipa/21-ipa-service.sh old mode 100644 new mode 100755 diff --git a/func/stacks/ipa/22-ipa-dns.sh b/func/stacks/ipa/22-ipa-dns.sh old mode 100644 new mode 100755 diff --git a/func/stacks/ipa/23-ipa-sudo.sh b/func/stacks/ipa/23-ipa-sudo.sh old mode 100644 new mode 100755 diff --git a/func/stacks/ipa/50-cleanup-ipa.sh b/func/stacks/ipa/50-cleanup-ipa.sh old mode 100644 new mode 100755 diff --git a/func/stacks/lamp/00-install-lamp.sh b/func/stacks/lamp/00-install-lamp.sh old mode 100755 new mode 100644 diff --git a/func/stacks/lamp/01-verification.sh b/func/stacks/lamp/01-verification.sh old mode 100755 new mode 100644 diff --git a/func/stacks/lamp/10-test-lamp.sh b/func/stacks/lamp/10-test-lamp.sh old mode 100755 new mode 100644 diff --git a/iso/empanadas/empanadas/util/dnf_utils.py b/iso/empanadas/empanadas/util/dnf_utils.py index 8291a8f..1c17c7b 100644 --- a/iso/empanadas/empanadas/util/dnf_utils.py +++ b/iso/empanadas/empanadas/util/dnf_utils.py @@ -947,6 +947,16 @@ class RepoSync: if repo and not self.fullrun: repos_to_tree = [repo] + # If a treeinfo or discinfo file exists, it should be skipped. + + def run_compose_closeout(self): + """ + Closes out a compose as file. This ensures kickstart repositories are + made, the treeinfo is modifed for the primary repository, syncs + work/isos to compose/isos, and combines all checksum files per arch + into a final CHECKSUM file. + """ + class SigRepoSync: """