b12d395039
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/coreutils#f4b85e63ba4ad4457596bf9181b39e7831c9e701
40 lines
1.1 KiB
Bash
Executable File
40 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# Checks that touch ls rm and foo work
|
|
# https://www.mankier.com/1/beakerlib#Examples
|
|
. /usr/share/beakerlib/beakerlib.sh
|
|
|
|
# Set the full test name
|
|
TEST="/examples/beakerlib/Sanity/phases"
|
|
|
|
# Package being tested
|
|
PACKAGE="coreutils"
|
|
|
|
rlJournalStart
|
|
# Setup phase: Prepare test directory
|
|
rlPhaseStartSetup
|
|
rlAssertRpm $PACKAGE
|
|
rlRun 'TmpDir=$(mktemp -d)' 0 'Creating tmp directory' # no-reboot
|
|
rlRun "pushd $TmpDir"
|
|
rlPhaseEnd
|
|
|
|
# Test phase: Testing touch, ls and rm commands
|
|
rlPhaseStartTest
|
|
rlRun "touch foo" 0 "Creating the foo test file"
|
|
rlAssertExists "foo"
|
|
rlRun "ls -l foo" 0 "Listing the foo test file"
|
|
rlRun "rm foo" 0 "Removing the foo test file"
|
|
rlAssertNotExists "foo"
|
|
rlRun "ls -l foo" 2 "Listing foo should now report an error"
|
|
rlPhaseEnd
|
|
|
|
# Cleanup phase: Remove test directory
|
|
rlPhaseStartCleanup
|
|
rlRun "popd"
|
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
|
rlPhaseEnd
|
|
rlJournalEnd
|
|
|
|
# Print the test report
|
|
rlJournalPrintText
|