1*171ec346SSteven Rostedt (VMware)# bootconfig.conf 2*171ec346SSteven Rostedt (VMware)# 3*171ec346SSteven Rostedt (VMware)# Tests to test some bootconfig scripts 4*171ec346SSteven Rostedt (VMware) 5*171ec346SSteven Rostedt (VMware)# List where on the target machine the initrd is used 6*171ec346SSteven Rostedt (VMware)INITRD := /boot/initramfs-test.img 7*171ec346SSteven Rostedt (VMware) 8*171ec346SSteven Rostedt (VMware)# Install bootconfig on the target machine and define the path here. 9*171ec346SSteven Rostedt (VMware)BOOTCONFIG := /usr/bin/bootconfig 10*171ec346SSteven Rostedt (VMware) 11*171ec346SSteven Rostedt (VMware)# Currenty we just build the .config in the BUILD_DIR 12*171ec346SSteven Rostedt (VMware)BUILD_TYPE := oldconfig 13*171ec346SSteven Rostedt (VMware) 14*171ec346SSteven Rostedt (VMware)# Helper macro to run bootconfig on the target 15*171ec346SSteven Rostedt (VMware)# SSH is defined in include/defaults.conf 16*171ec346SSteven Rostedt (VMware)ADD_BOOTCONFIG := ${SSH} "${BOOTCONFIG} -d ${INITRD} && ${BOOTCONFIG} -a /tmp/${BOOTCONFIG_FILE} ${INITRD}" 17*171ec346SSteven Rostedt (VMware) 18*171ec346SSteven Rostedt (VMware)# This copies a bootconfig script to the target and then will 19*171ec346SSteven Rostedt (VMware)# add it to the initrd. SSH_USER is defined in include/defaults.conf 20*171ec346SSteven Rostedt (VMware)# and MACHINE is defined in the example configs. 21*171ec346SSteven Rostedt (VMware)BOOTCONFIG_TEST_PREP = scp ${BOOTCONFIG_PATH}${BOOTCONFIG_FILE} ${SSH_USER}@${MACHINE}:/tmp && ${ADD_BOOTCONFIG} 22*171ec346SSteven Rostedt (VMware) 23*171ec346SSteven Rostedt (VMware)# When a test is complete, remove the bootconfig from the initrd. 24*171ec346SSteven Rostedt (VMware)CLEAR_BOOTCONFIG := ${SSH} "${BOOTCONFIG} -d ${INITRD}" 25*171ec346SSteven Rostedt (VMware) 26*171ec346SSteven Rostedt (VMware)# Run a verifier on the target after it had booted, to make sure that the 27*171ec346SSteven Rostedt (VMware)# bootconfig script did what it was expected to do 28*171ec346SSteven Rostedt (VMware)DO_TEST = scp ${BOOTCONFIG_PATH}${BOOTCONFIG_VERIFY} ${SSH_USER}@${MACHINE}:/tmp && ${SSH} /tmp/${BOOTCONFIG_VERIFY} 29*171ec346SSteven Rostedt (VMware) 30*171ec346SSteven Rostedt (VMware)# Comment this out to not run the boot configs 31*171ec346SSteven Rostedt (VMware)RUN_BOOTCONFIG := 1 32*171ec346SSteven Rostedt (VMware) 33*171ec346SSteven Rostedt (VMware)TEST_START IF DEFINED RUN_BOOTCONFIG 34*171ec346SSteven Rostedt (VMware)TEST_TYPE = test 35*171ec346SSteven Rostedt (VMware)TEST_NAME = bootconfig boottrace 36*171ec346SSteven Rostedt (VMware)# Just testing the bootconfig on initrd, no need to build the kernel 37*171ec346SSteven Rostedt (VMware)BUILD_TYPE = nobuild 38*171ec346SSteven Rostedt (VMware)BOOTCONFIG_FILE = boottrace.bconf 39*171ec346SSteven Rostedt (VMware)BOOTCONFIG_VERIFY = verify-boottrace.sh 40*171ec346SSteven Rostedt (VMware)ADD_CONFIG = ${ADD_CONFIG} ${BOOTCONFIG_PATH}/config-bootconfig 41*171ec346SSteven Rostedt (VMware)PRE_TEST = ${BOOTCONFIG_TEST_PREP} 42*171ec346SSteven Rostedt (VMware)PRE_TEST_DIE = 1 43*171ec346SSteven Rostedt (VMware)TEST = ${DO_TEST} 44*171ec346SSteven Rostedt (VMware)POST_TEST = ${CLEAR_BOOTCONFIG} 45*171ec346SSteven Rostedt (VMware) 46*171ec346SSteven Rostedt (VMware)TEST_START IF DEFINED RUN_BOOTCONFIG 47*171ec346SSteven Rostedt (VMware)TEST_TYPE = test 48*171ec346SSteven Rostedt (VMware)TEST_NAME = bootconfig function graph 49*171ec346SSteven Rostedt (VMware)BUILD_TYPE = nobuild 50*171ec346SSteven Rostedt (VMware)BOOTCONFIG_FILE = functiongraph.bconf 51*171ec346SSteven Rostedt (VMware)BOOTCONFIG_VERIFY = verify-functiongraph.sh 52*171ec346SSteven Rostedt (VMware)ADD_CONFIG = ${ADD_CONFIG} ${BOOTCONFIG_PATH}/config-bootconfig 53*171ec346SSteven Rostedt (VMware)PRE_TEST = ${BOOTCONFIG_TEST_PREP} 54*171ec346SSteven Rostedt (VMware)PRE_TEST_DIE = 1 55*171ec346SSteven Rostedt (VMware)TEST = ${DO_TEST} 56*171ec346SSteven Rostedt (VMware)POST_TEST = ${CLEAR_BOOTCONFIG} 57*171ec346SSteven Rostedt (VMware) 58*171ec346SSteven Rostedt (VMware)TEST_START IF DEFINED RUN_BOOTCONFIG 59*171ec346SSteven Rostedt (VMware)TEST_TYPE = test 60*171ec346SSteven Rostedt (VMware)TEST_NAME = bootconfig tracing 61*171ec346SSteven Rostedt (VMware)BUILD_TYPE = nobuild 62*171ec346SSteven Rostedt (VMware)BOOTCONFIG_FILE = tracing.bconf 63*171ec346SSteven Rostedt (VMware)BOOTCONFIG_VERIFY = verify-tracing.sh 64*171ec346SSteven Rostedt (VMware)ADD_CONFIG = ${ADD_CONFIG} ${BOOTCONFIG_PATH}/config-bootconfig 65*171ec346SSteven Rostedt (VMware)PRE_TEST = ${BOOTCONFIG_TEST_PREP} 66*171ec346SSteven Rostedt (VMware)PRE_TEST_DIE = 1 67*171ec346SSteven Rostedt (VMware)TEST = ${DO_TEST} 68*171ec346SSteven Rostedt (VMware)POST_TEST = ${CLEAR_BOOTCONFIG} 69*171ec346SSteven Rostedt (VMware) 70