- if ( $config{'RUN_DATABASE_TESTS'} eq 'yes' ) {
- if ( open( my $confhandle, '>', 't/test-config.txt' ) ) {
- print $confhandle "# This configuration file lets the t/Makefile prepare a test koha-conf.xml file.\n";
- print $confhandle "# It is generated by the top-level Makefile.PL.\n";
- print $confhandle "# It is separate from the standard koha-conf.xml so that you can edit this by hand and test with different configurations.\n";
-
- # these directories will be relocated to the 't' directory
- foreach my $dirname ( keys %$target_directories ) {
- my $dir = main::_strip_destdir( $target_directories->{$dirname} );
- if ( exists $test_suite_override_dirs{$dirname} ) {
- $dir = main::get_test_dir($dirname);
- }
- print $confhandle "$dirname = $dir\n"
- }
- print $confhandle "\n";
-
- print $confhandle join( "\n", map { "$_ = $config{$_}" } keys( %config ) ), "\n";
- close( $confhandle );
- } else {
- warn 'unable to open conf file for database dependent tests: $!';
- }
-
- }