Hide Forgot
Description of problem: when we use the rlImport some lib in the head of runtest.sh always got "BEAKERLIB_JOURNAL not defined in the environment"; so we hope rlImport not depend the rlJournalStart; then we can write runtest.sh as follow clear format: # Load beakerlib you needed rlImport xxx/base <<<- Hide . beakerlib.sh in Makefile and use rlImport as a "keyword", like import in python #-------------------------------------------------------------------------- envinfo $PACKAGE rlJournalStart rlPhaseStartSetup ${TEST}-$role-Setup rlFileBackup /etc/sysconfig/nfs /etc/exports rlPhaseEnd rlPhaseStartTest ${TEST}-$role-Test rlRun "ls" rlPhaseEnd rlPhaseStartCleanup ${TEST}-$role-Cleanup rlFileRestore rlPhaseEnd #rlJournalPrintText rlJournalEnd Test log: --------------------------------------------------- test -x runtest.sh || chmod a+x runtest.sh ( set +o posix; . /usr/bin/rhts_environment.sh; \ . /usr/share/beakerlib/beakerlib.sh; \ . runtest.sh ) :: [ 07:44:13 ] :: [ INFO ] :: rlImport: Found 'kernel/base' in /mnt/tests BEAKERLIB_JOURNAL not defined in the environment :: [ 07:44:13 ] :: [ INFO ] :: rlImport: Will try to import kernel/base from /mnt/tests/kernel/Library/base/lib.sh BEAKERLIB_JOURNAL not defined in the environment <<<---Nasty output ---------------------------------------------------- Version-Release number of selected component (if applicable): all version How reproducible: always Steps to Reproduce: 1. use rlImport without pre runing rlJournalStart; 2. 3. Actual results: output "BEAKERLIB_JOURNAL not defined in the environment" Expected results: not depend rlJournalStart; not output the log "BEAKERLIB_JOURNAL not defined..." Additional info:
No. This is not Python, and there's no reason to mimic it. We need some infrastructure in place when running rlImport, and rlJournalStart sets up that infrastructure.