Bug 1032354 - [RFE][rlImport] rlImport should not rely/depend rlJournalStart
Summary: [RFE][rlImport] rlImport should not rely/depend rlJournalStart
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: 19
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Petr Muller
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-20 02:50 UTC by JianHong Yin
Modified: 2016-09-20 02:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-03 14:17:17 UTC
Type: Bug


Attachments (Terms of Use)

Description JianHong Yin 2013-11-20 02:50:36 UTC
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 15:55:34 UTC
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.