Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test suite #874

Merged
merged 1 commit into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
34 changes: 17 additions & 17 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down
File renamed without changes.
27 changes: 6 additions & 21 deletions t/Message.t → t/Message_urlize.t
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#!/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);

Expand All @@ -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';
Expand All @@ -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 => '',
Expand All @@ -47,26 +40,18 @@ 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);

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 = (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.