Bug 1032354 - [RFE][rlImport] rlImport should not rely/depend rlJournalStart
[RFE][rlImport] rlImport should not rely/depend rlJournalStart
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: beakerlib (Show other bugs)
19
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Petr Muller
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-19 21:50 EST by Yin.JianHong
Modified: 2016-09-19 22:10 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-03 09:17:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yin.JianHong 2013-11-19 21:50:36 EST
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:
Comment 1 Petr Muller 2013-12-02 10:55:34 EST
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.

Note You need to log in before you can comment on or make changes to this bug.