Commit c58a6c06 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub

Merge pull request #874 from ikedas/sympa-6.2

Update test suite
parents 776328f2 17834b2a
......@@ -7,13 +7,13 @@
- . ~/bashrc
- coverage-install
- coverage-setup
- cpanm --quiet --notest --installdeps --with-develop --with-feature=ldap --with-feature=safe-unicode --with-feature=soap --with-feature=sqlite .
- cpanm --quiet --notest --installdeps --with-develop --with-feature=Data::Password --with-feature=ldap --with-feature=safe-unicode --with-feature=smime --with-feature=soap --with-feature=sqlite .
- cpanm --notest --quiet Unicode::CaseFold
- autoreconf -i
- ./configure
- cd src; make; cd ..
- make check-local TEST_FILES='xt/perltidy.t' || true
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/Message.t t/Message_smime.t t/compile_scenarios.t t/parse_templates.t t/pod-syntax.t'
- make check-local
- coverage-report
- make clean
......
......@@ -28,7 +28,7 @@ before_install:
install:
- cpan-install --coverage
- cpanm --installdeps --notest --with-develop --with-feature=ldap --with-feature=safe-unicode --with-feature=soap --with-feature=sqlite .
- cpanm --installdeps --notest --with-develop --with-feature=Data::Password --with-feature=ldap --with-feature=safe-unicode --with-feature=smime --with-feature=soap --with-feature=sqlite .
- cpanm --notest --quiet Unicode::CaseFold
before_script:
......@@ -39,7 +39,7 @@ script:
- ./configure
- cd src; make; cd ..
- make check-local TEST_FILES='xt/perltidy.t' || true
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/Message.t t/Message_smime.t t/compile_scenarios.t t/parse_templates.t t/pod-syntax.t'
- make check-local
after_success:
- coverage-report
......
......@@ -27,26 +27,30 @@ SUBDIRS = src default doc po www
check_SCRIPTS = \
t/01_Conf.t \
t/02_Sympa_DatabaseManager.t \
t/Config_XML.t \
t/DatabaseManager.t \
t/Database_LDAP.t \
t/Language.t \
t/LockedFile.t \
t/Message.t \
t/Message_smime.t \
t/Message_urlize.t \
t/Regexps.t \
t/compile_modules.t \
t/compile_executables.t \
t/compile_scenarios.t \
t/Config_XML.t \
t/Database_LDAP.t \
t/parse_templates.t \
t/pod-syntax.t \
t/tools_data.t \
t/tools_file.t \
t/Tools_Data.t \
t/Tools_File.t \
t/Tools_Password.t \
t/Tools_SMIME.t \
t/Tools_Text.t \
t/tools_time.t
t/Tools_Time.t \
t/compile_executables.t \
t/compile_modules.t \
t/compile_scenarios.t \
t/parse_templates.t \
t/pod-syntax.t
check_DATA = \
t/data/list_data/test/config \
t/data/sympa.conf \
t/data/sympa.sqlite \
t/data/etc/auth.conf \
t/locale/cs/LC_MESSAGES/sympa.mo \
t/locale/cs/LC_MESSAGES/web_help.mo \
t/locale/zh_TW/LC_MESSAGES/sympa.mo \
......@@ -65,13 +69,9 @@ check_DATA = \
t/samples/urlize-nested-mutiple-attachments.eml \
t/samples/urlize-simple-mutiple-attachments.eml \
t/samples/urlize-simple.eml \
t/stub/Sympa/Constants.pm \
t/data/list_data/test/config \
t/data/sympa.conf \
t/data/sympa.sqlite \
t/data/etc/auth.conf \
t/samples/signed.eml \
t/samples/unsigned.eml \
t/stub/Sympa/Constants.pm \
xt/perlcriticrc
noinst_SCRIPTS = \
xt/critic.t \
......
#!/usr/bin/perl
# -*- indent-tabs-mode: nil; -*-
# vim:ft=perl:et:sw=4
# $Id: tools_data.t 8606 2013-02-06 08:44:02Z rousse $
use strict;
use warnings;
use Data::Dumper;
use English;
use English qw(-no_match_vars);
use File::Path qw(make_path rmtree);
use File::Copy::Recursive qw(fcopy rcopy dircopy fmove rmove dirmove);
......@@ -21,7 +18,6 @@ BEGIN {
}
my $tmp_dir = 't/tmp';
my $db_dir = $tmp_dir.'/db';
my $home_dir = $tmp_dir.'/list_data';
my $etc_dir = $tmp_dir.'/etc';
my $test_list_name = 'test';
......@@ -32,9 +28,6 @@ my $test_list_name = 'test';
lang => 'en-US',
sender_headers => 'From',
tmpdir => $tmp_dir,
db_type => 'SQLite',
db_name => $db_dir.'/message-test-db.sqlite',
update_db_field_types => 'auto',
home => $home_dir,
etc => $etc_dir,
cache_list_config => '',
......@@ -47,7 +40,6 @@ if (-d $tmp_dir) {
rmtree($tmp_dir);
}
make_path($tmp_dir);
make_path($db_dir);
make_path($home_dir);
dircopy('t/data/list_data/', $home_dir);
make_path($etc_dir);
......@@ -55,18 +47,11 @@ make_path($etc_dir);
my $log = Sympa::Log->instance;
$log->{log_to_stderr} = 'err';
if (-f $Conf::Conf{db_name}) {
unlink $Conf::Conf{db_name};
}
open my $fileHandle, ">", "$Conf::Conf{db_name}" or die "Can't create '$Conf::Conf{db_name}'\n";
close $fileHandle;
my $sdm = Sympa::DatabaseManager->instance;
Sympa::DatabaseManager::probe_db();
my $list = Sympa::List->new($test_list_name, '*');
$list->_update_list_db;
my $list = bless {
dir => "$home_dir/$test_list_name",
name => $test_list_name,
domain => $Conf::Conf{domain},
} => 'Sympa::List';
my $root_url = '/attach/test/';
my @to_urlize = (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment