Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Don't fail test when device not available.
Browse files Browse the repository at this point in the history
There is a design flaw in the require_tape and require_changer functions
in scripts/functions it exits with 1 when you don't have a tape or
changer device defined. This is wrong and it should just like the
require_linux function exit with a 0 and just skip the test when it
doesn't have the right config. This way you can always run scripts like
nightly-all and don't worry about tests failing due to missing tape or
changer devices.
  • Loading branch information
Marco van Wieringen committed Feb 24, 2013
1 parent 4e8c5d7 commit 8e07755
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/functions
Expand Up @@ -52,24 +52,24 @@ fi
require_tape_drive()
{
if test x${TAPE_DRIVE} = x/dev/null ; then
echo "$TestName test needs a tape drive, but has none."
exit 1
echo "This test $TestName needs a tape drive, but has none."
exit 0
fi
}

require_second_drive()
{
if test x${TAPE_DRIVE1} = x/dev/null ; then
echo "$JobName needs second drive, but has none."
exit 1
echo "This test $TestName has a Job $JobName which needs a second drive, but has none."
exit 0
fi
}

require_autochanger()
{
if test x${AUTOCHANGER} = x/dev/null ; then
echo "$TestName needs an autochanger, but has none."
exit 1
echo "This test $TestName needs an autochanger, but has none."
exit 0
fi
}

Expand Down

0 comments on commit 8e07755

Please sign in to comment.