Add dir removal as beakerlib command

This commit is contained in:
Zdenek Dohnal 2023-09-01 10:54:44 +02:00
commit e42e4adb08
2 changed files with 6 additions and 1 deletions

View file

@ -85,7 +85,11 @@ rlJournalStart
rlRun "mkdir BUILD" 0 "Creating BUILD directory"
rlRun "rpmbuild --nodeps --define '_topdir $TmpDir' -bp $TmpDir/SPECS/*spec" \
0 "Preparing sources"
rm -rf BUILD/*SPECPARTS
if rlIsFedora || rlIsRHELLike '>9'
then
rlRun "rm -rf BUILD/*SPECPARTS &> /dev/null" 0,1 "Remove the additional directory if exists"
fi
rlRun "ls -lah BUILD"
rlRun "cd BUILD/vim*"
rlRun "chown -R $TESTER.$TESTER $TmpDir" 0 "Setting permissions"
rlRun "export LANG=en_US.UTF-8" 0 "Setting \$LANG to US locale"

View file

@ -62,6 +62,7 @@ rlJournalStart
rlRun "rpmbuild --nodeps --define '_topdir $TmpDir' -bp $TmpDir/SPECS/*spec" \
0 "Preparing sources"
rm -rf BUILD/*SPECPARTS
ls -lahR BUILD/
rlRun "cd BUILD/vim*"
rlRun "chown -R $TESTER.$TESTER $TmpDir" 0 "Setting permissions"
rlRun "export LANG=en_US.UTF-8" 0 "Setting \$LANG to US locale"