[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.10-20-g2b065d3



The following commit has been merged in the master branch:
commit a5410c9694928ea9767fe53aa4eff5f456605a54
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Fri May 8 09:37:05 2009 -0500

    Move static lab test to a separate test script
    
    The script will eventually be rewritten so that it tests the internal methods
    instead of relying on the exit status code of lintian.

diff --git a/t/scripts/static-lab.t b/t/scripts/static-lab.t
new file mode 100644
index 0000000..489ba73
--- /dev/null
+++ b/t/scripts/static-lab.t
@@ -0,0 +1,14 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use File::Temp qw(tempdir);
+use Test::Simple tests => 4;
+
+my $lintian_path = "$ENV{LINTIAN_ROOT}/frontend/lintian";
+my $labdir = tempdir(CLEANUP => 1);
+
+ok(system("$lintian_path --lab $labdir --setup-lab") == 0, "Create");
+ok(system("$lintian_path --lab $labdir --setup-lab") == 0, "Renew");
+ok(system("$lintian_path --lab $labdir --remove-lab") == 0, "Remove");
+ok(system("rmdir $labdir") == 0, "Rmdir");
diff --git a/testset/runtests b/testset/runtests
index 705577b..6a456de 100755
--- a/testset/runtests
+++ b/testset/runtests
@@ -207,30 +207,6 @@ if ($testok) {
     exit 1 unless $run_all_tests;
 }
 
-# can I make a lab?
-print "Running static lab test ... create ... ";
-$testok = runsystem_ok("$lintian_path --lab $rundir/test_lab --setup-lab");
-# can I renew a lab?
-print " renew ... ";
-$testok = runsystem_ok("$lintian_path --lab $rundir/test_lab --setup-lab")
-    if $testok;
-# can I remove a lab?
-print " remove ...";
-$testok = runsystem_ok("$lintian_path --lab $rundir/test_lab --remove-lab")
-    if $testok;
-# should be empty now
-print " rmdir ...";
-$testok = runsystem_ok("rmdir $rundir/test_lab")
-    if $testok;
-# cleanup
-runsystem("rm -r $rundir/test_lab") if -d "$rundir/test_lab";
-if ($testok) {
-    print "done.\n";
-} else {
-    print "FAILED!\n";
-    exit 1 unless $run_all_tests;
-}
-
 # ok, I can make a static lab, now let's test the package checks
 # in temporary labs
 my @tests;

-- 
Debian package checker


Reply to: