From 3acaae277e79eea30e29aab72dc0fc458d3547c4 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 20 Mar 2014 19:40:26 -0700 Subject: [PATCH] add wheezy ignore test add empty logs add sources file add debbugs configuration for test spool --- t/05_wheezy_ignore.t | 34 +++++++++++++++++++++++ t/test_spool/db-h/57/710357.log | 0 t/test_spool/db-h/69/710069.log | 0 t/test_spool/sources | 3 +++ t/test_spool_debbugs_config | 48 +++++++++++++++++++++++++++++++++ 5 files changed, 85 insertions(+) create mode 100644 t/05_wheezy_ignore.t create mode 100644 t/test_spool/db-h/57/710357.log create mode 100644 t/test_spool/db-h/69/710069.log create mode 100644 t/test_spool/sources create mode 100644 t/test_spool_debbugs_config diff --git a/t/05_wheezy_ignore.t b/t/05_wheezy_ignore.t new file mode 100644 index 0000000..bacab08 --- /dev/null +++ b/t/05_wheezy_ignore.t @@ -0,0 +1,34 @@ +# -*- mode: cperl; -*- +use Test::More; + +BEGIN{ + $ENV{DEBBUGS_CONFIG_FILE}="t/test_spool_debbugs_config"; +} + +use Debbugs::Config qw(%config); +use Data::Dumper; + +use_ok('Debbugs::Config'); + +use_ok('bugcfg'); +use_ok('scanlib'); + +# scan all bugs; this should keep everything appropriately +scanlib::scanspool(); +ok(exists $scanlib::bugs{710069},'710069 is kept from scanlib'); +ok(exists $scanlib::bugs{710357},'710357 is kept from scanlib'); +use Data::Dumper; +ok(!scanlib::check_worry_stable($scanlib::bugs{710069}),'710069 does not concern stable'); +# this bug would concern testing, but the package isn't in testing... +# ok(scanlib::check_worry($scanlib::bugs{710069}),'710069 does concerns testing'); +ok(scanlib::check_worry_unstable($scanlib::bugs{710069}),'710069 concerns unstable'); +ok(!scanlib::check_worry_stable($scanlib::bugs{710357}),'710357 does not concern stable'); +ok(!scanlib::check_worry($scanlib::bugs{710357}),'710357 does not concern testing'); +ok(!scanlib::check_worry_unstable($scanlib::bugs{710357}),'710357 does not concern unstable'); + +# OK; things seem to work properly here, so why are these being counted? +ok(scanlib::get_taginfo($scanlib::bugs{710357}) =~ qr/I$/,'710357 has an I taginfo' ); +ok(scanlib::get_taginfo($scanlib::bugs{710069}) =~ qr/I$/,'710069 has an I taginfo' ); + +# done testing +done_testing(); diff --git a/t/test_spool/db-h/57/710357.log b/t/test_spool/db-h/57/710357.log new file mode 100644 index 0000000..e69de29 diff --git a/t/test_spool/db-h/69/710069.log b/t/test_spool/db-h/69/710069.log new file mode 100644 index 0000000..e69de29 diff --git a/t/test_spool/sources b/t/test_spool/sources new file mode 100644 index 0000000..edf79b4 --- /dev/null +++ b/t/test_spool/sources @@ -0,0 +1,3 @@ +cpu main cpu +bandwidthd main bandwidthd +bandwidthd-pgsq main bandwidthd diff --git a/t/test_spool_debbugs_config b/t/test_spool_debbugs_config new file mode 100644 index 0000000..080a6b7 --- /dev/null +++ b/t/test_spool_debbugs_config @@ -0,0 +1,48 @@ +# -*- mode: cperl-mode; -*- + +$gDefaultSeverity = "normal"; +$gShowSeverities = "critical, grave, serious, important, normal, minor, wishlist, fixed"; +@gStrongSeverities = ( "critical", "grave", "serious" ); +@gSeverityList = ( "critical", "grave", "serious", "important", "normal", + "minor", "wishlist", "fixed" + ); +%gObsoleteSeverities = ( fixed => 'Use the fixed tag instead.' ); +%gSeverityDisplay = ( "critical", "Critical bugs", + "grave", "Grave functionality bugs", + "serious", "Serious (policy violations or makes package unfit for release)", + "important", "Important bugs", + "normal", "Normal bugs", + "minor", "Minor bugs", + "fixed", "NMU Fixed bugs", + "wishlist", "Wishlist items" + ); + +@gDefaultArchitectures = qw(i386 powerpc mips mipsel sparc amd64 alpha m68k arm armel s390 ia64 kfreebsd-i386 kfreebsd-amd64 hppa); + +@gDistributions = qw(oldstable stable testing unstable experimental); + +%gDistributionAliases = (experimental => 'experimental', + unstable => 'unstable', + testing => 'testing', + stable => 'stable', + oldstable => 'oldstable', + sid => 'unstable', + jessie => 'testing', + wheezy => 'stable', + squeeze => 'oldstable', + #lenny => 'oldstable', + #etch => 'oldstable', + #sarge => 'oldstable', + ); + +$gPseudoMaintFile='/dev/null'; +$gPseudoDescFile='/dev/null'; +$gSpoolDir='t/test_spool'; +$gPackageSource='t/test_spool/sources'; +$gVersionPackagesDir='t/test_spool/versions/pkg'; +$gVersionTimeIndex='t/test_spool/versions/indices/versions_time.idx'; +$gVersionIndex='t/test_spool/versions/indices/versions.idx'; +$gBinarySourceMap='t/test_spool/versions/indices/binsrc.idx'; +$gSourceBinaryMap='t/test_spool/versions/indices/srcbin.idx'; + +1; -- 2.39.2