X-Git-Url: https://git.gag.com/?p=debian%2Famanda;a=blobdiff_plain;f=installcheck%2FInstallcheck%2FRun.pm;h=5bf1b1067ec260090ce11e3a036fcac3b113688b;hp=f87e85b770e1ae79311f50ea766664b68f925d54;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e diff --git a/installcheck/Installcheck/Run.pm b/installcheck/Installcheck/Run.pm index f87e85b..5bf1b10 100644 --- a/installcheck/Installcheck/Run.pm +++ b/installcheck/Installcheck/Run.pm @@ -189,10 +189,15 @@ our $taperoot = "$Installcheck::TMP/vtapes"; our $holdingdir ="$Installcheck::TMP/holding"; sub setup { + my $new_vtapes = shift; my $testconf = Installcheck::Config->new(); (-d $diskname) or setup_backmeup(); - setup_vtapes($testconf, 3); + if ($new_vtapes) { + setup_new_vtapes($testconf, 3); + } else { + setup_vtapes($testconf, 3); + } setup_holding($testconf, 25); setup_disklist($testconf); @@ -289,6 +294,32 @@ sub setup_vtapes { ]); } +sub setup_new_vtapes { + my ($testconf, $ntapes) = @_; + if (-d $taperoot) { + rmtree($taperoot); + } + + # make each of the tape directories + for (my $i = 1; $i < $ntapes+1; $i++) { + my $tapepath = "$taperoot/slot$i"; + mkpath("$tapepath"); + } + + load_vtape(1); + + # set up the appropriate configuration + $testconf->add_param("tpchanger", "\"chg-disk:$taperoot\""); + $testconf->add_param("labelstr", "\"TESTCONF[0-9][0-9]\""); + $testconf->add_param("tapecycle", "$ntapes"); + + # this overwrites the existing TEST-TAPE tapetype + $testconf->add_tapetype('TEST-TAPE', [ + 'length' => '30 mbytes', + 'filemark' => '4 kbytes', + ]); +} + sub setup_holding { my ($testconf, $mbytes) = @_;