Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 640401 Details for
Bug 874180
The test suite fails in 110.CreateBrand.t and 920.WebSite.t
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch v2 fixing the test suite
fix-testsuite (text/plain), 5.45 KB, created by
Raphaël Hertzog
on 2012-11-07 21:30:24 UTC
(
hide
)
Description:
Patch v2 fixing the test suite
Filename:
MIME Type:
Creator:
Raphaël Hertzog
Created:
2012-11-07 21:30:24 UTC
Size:
5.45 KB
patch
obsolete
>Description: Fix test-suite > Fix the test suite to use in-tree files and not system-wide files so that > it works even if publican is not yet installed. >Author: Raphaël Hertzog <hertzog@debian.org> >Bug: https://bugzilla.redhat.com/show_bug.cgi?id=874180 > >--- a/t/110.CreateBrand.t >+++ b/t/110.CreateBrand.t >@@ -3,6 +3,10 @@ use warnings; > > use Test::More tests => 5; > use File::Path; >+use Cwd qw(abs_path); >+ >+my $common_content = abs_path('blib/datadir/Common_Content'); >+my $common_config = abs_path('blib/datadir'); > > BEGIN { > use_ok('Publican'); >@@ -24,6 +28,11 @@ eval { > > isa_ok( $creator, 'Publican::CreateBrand', > 'creating a Publican::CreateBrand' ); >+ >+# Override config to point to in-tree version >+$creator->{'config'}->param('common_content', $common_content); >+$creator->{'config'}->param('common_config', $common_config); >+ > eval { $creator->create(); }; > $e = $@; > ok( ( not $e ), "create the brand" ); >--- a/t/920.WebSite.t >+++ b/t/920.WebSite.t >@@ -17,6 +17,8 @@ diag("Testing build a website with publi > > my $common_content = abs_path('blib/datadir/Common_Content'); > my $common_config = abs_path('blib/datadir'); >+my $tmpl_path = abs_path('blib/templates'); >+my $web_path = abs_path('blib/web'); > my $cover_db = undef; > $cover_db = abs_path('cover_db') if ( -d 'cover_db' ); > my $coverdb = undef; >@@ -47,7 +49,8 @@ system("ln -s $flink $tlink") unless ( - > > $result = system( > @perl_args, $publican, 'create_site', '--site_config', 'foomaster.cfg', >- '--db_file', 'foomaster.db', '--toc_path', 'html/docs', @common_opts >+ '--db_file', 'foomaster.db', '--toc_path', 'html/docs', >+ '--tmpl_path', $tmpl_path, '--web_path', $web_path, @common_opts > ); > is( $result, 0, 'build the website structure' ); > >--- a/bin/publican >+++ b/bin/publican >@@ -30,8 +30,6 @@ use File::HomeDir; > > my $VERSION = "$Publican::VERSION"; > my $LANG_PATTERN = q|__LANG__|; >-## TODO Consider making these parameters >-my $WEB_TEMPLATE_PATH = '/usr/share/publican'; > > # Try to catch SRPMS created using outdated versions of publican in brew/koji/mock > if ( ( $ENV{RPM_BUILD_DIR} ) >@@ -129,6 +127,7 @@ my %options = ( > 'db_file=s' => maketext('Override default database file.'), > 'toc_path=s' => maketext('Override the default TOC path.'), > 'tmpl_path=s' => maketext('Override the default template path.'), >+ 'web_path=s' => maketext('Override the default website template path.'), > 'site_config=s' => > maketext('WebSite configuration file to use or create.'), > novalid => maketext('Do not run the DTD validation'), >@@ -249,7 +248,7 @@ my %actions = ( > 'create_site' => { > 'brief' => maketext('Create a new WebSite in the supplied location.'), > 'options' => >- [ 'site_config', 'db_file', 'toc_path', 'tmpl_path', 'lang' ], >+ [ 'site_config', 'db_file', 'toc_path', 'tmpl_path', 'web_path', 'lang' ], > }, > 'update_site' => { > 'brief' => maketext('Update an existing sites templates.'), >@@ -533,19 +532,19 @@ if ( $action eq 'create_site' ) { > mkpath($directories) unless -d $directories; > $config->param( 'db_file', abs_path($db_file) ) if ($db_file); > >- if ($toc_path) { >- mkpath($toc_path) unless -d $toc_path; >- $config->param( 'toc_path', abs_path($toc_path) ); >- rcopy( "$WEB_TEMPLATE_PATH/sitetemplate/*", "$toc_path/." ) >- || croak($!); >- } >+ mkpath($toc_path) unless -d $toc_path; >+ $config->param( 'toc_path', abs_path($toc_path) ); > > $config->param( 'tmpl_path', abs_path($tmpl_path) ) if ($tmpl_path); > $config->param( 'def_lang', $def_lang ) if ($def_lang); >+ $config->param( 'web_path', $opts{web_path} ) if ($opts{web_path}); > $config->write($site_config); > > my $ws = Publican::WebSite->new( > { create => 1, site_config => $site_config } ); >+ my $web_path = $ws->{web_path}; >+ rcopy( "$web_path/*", $ws->toc_path() . "/." ) >+ || croak($!); > $ws->regen_all_toc(); > > exit(0); >@@ -555,8 +554,9 @@ if ( $action eq 'update_site' ) { > my $site_config = $opts{site_config} || undef; > local $File::Copy::Recursive::RMTrgFil = 1; > my $ws = Publican::WebSite->new( { site_config => $site_config } ); >+ my $web_path = $ws->{web_path}; > >- rcopy( "$WEB_TEMPLATE_PATH/sitetemplate/*", $ws->toc_path() . "/." ) >+ rcopy( "$web_path/*", $ws->toc_path() . "/." ) > || croak($!); > $ws->regen_all_toc( { force => 1 } ); > >--- a/lib/Publican/WebSite.pm >+++ b/lib/Publican/WebSite.pm >@@ -26,6 +26,7 @@ my $DEFAULT_LANG = 'en-US'; > my $DEFAULT_TMPL_PATH = '/usr/share/publican/templates'; > my $DEFAULT_CONFIG_FILE = '/etc/publican-website.cfg'; > my $DEFAULT_DUMP_FILE = '/var/www/html/DUMP.xml'; >+my $DEFAULT_WEB_PATH = '/usr/share/publican/sitetemplate'; > > my %LANG_NAME = ( > 'ar-SA' => 'Ø§ÙØ¹Ø±Ø¨ÙØ©', >@@ -145,6 +146,7 @@ sub new { > ) > ); > my $tmpl_path = $config->param('tmpl_path') || $DEFAULT_TMPL_PATH; >+ my $web_path = $config->param('web_path') || $DEFAULT_WEB_PATH; > my $def_lang = $config->param('def_lang') || $DEFAULT_LANG; > my $db_file = $config->param('db_file') || croak( > maketext( >@@ -174,6 +176,7 @@ sub new { > $self->_load_db; > $self->{toc_path} = $toc_path; > $self->{tmpl_path} = $tmpl_path; >+ $self->{web_path} = $web_path; > $self->{def_lang} = $def_lang; > $self->{host} = $host; > $self->{search} = $search;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 874180
:
640176
| 640401