You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Remove code to generate .travis.yml.
Most of the logic has been moved to test/travis.pl so there wasn't much purpose to this code anymore.
This commit is contained in:
@@ -1587,10 +1587,6 @@ test/lib/pgBackRestTest/Common/BuildTest.pm:
|
||||
class: test/harness
|
||||
type: perl
|
||||
|
||||
test/lib/pgBackRestTest/Common/CiTest.pm:
|
||||
class: test/harness
|
||||
type: perl
|
||||
|
||||
test/lib/pgBackRestTest/Common/CodeCountTest.pm:
|
||||
class: test/harness
|
||||
type: perl
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
####################################################################################################################################
|
||||
# CiTest.pm - Create Travis configuration file for continuous integration testing
|
||||
####################################################################################################################################
|
||||
package pgBackRestTest::Common::CiTest;
|
||||
|
||||
####################################################################################################################################
|
||||
# Perl includes
|
||||
####################################################################################################################################
|
||||
use strict;
|
||||
use warnings FATAL => qw(all);
|
||||
use Carp qw(confess);
|
||||
use English '-no_match_vars';
|
||||
|
||||
use Cwd qw(abs_path);
|
||||
use Exporter qw(import);
|
||||
our @EXPORT = qw();
|
||||
use File::Basename qw(dirname);
|
||||
use POSIX qw(ceil);
|
||||
use Time::HiRes qw(gettimeofday);
|
||||
|
||||
use pgBackRest::DbVersion;
|
||||
use pgBackRest::Common::Exception;
|
||||
use pgBackRest::Common::Log;
|
||||
use pgBackRest::Common::String;
|
||||
use pgBackRest::Version;
|
||||
|
||||
use pgBackRestTest::Common::BuildTest;
|
||||
use pgBackRestTest::Common::ContainerTest;
|
||||
use pgBackRestTest::Common::DefineTest;
|
||||
use pgBackRestTest::Common::ExecuteTest;
|
||||
use pgBackRestTest::Common::ListTest;
|
||||
use pgBackRestTest::Common::VmTest;
|
||||
|
||||
####################################################################################################################################
|
||||
# new
|
||||
####################################################################################################################################
|
||||
sub new
|
||||
{
|
||||
my $class = shift; # Class name
|
||||
|
||||
# Create the class hash
|
||||
my $self = {};
|
||||
bless $self, $class;
|
||||
|
||||
# Assign function parameters, defaults, and log debug info
|
||||
(
|
||||
my $strOperation,
|
||||
$self->{oStorage},
|
||||
) =
|
||||
logDebugParam
|
||||
(
|
||||
__PACKAGE__ . '->new', \@_,
|
||||
{name => 'oStorage'},
|
||||
);
|
||||
|
||||
# Return from function and log return values if any
|
||||
return logDebugReturn
|
||||
(
|
||||
$strOperation,
|
||||
{name => 'self', value => $self, trace => true}
|
||||
);
|
||||
}
|
||||
|
||||
####################################################################################################################################
|
||||
# process
|
||||
####################################################################################################################################
|
||||
sub process
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
# Assign function parameters, defaults, and log debug info
|
||||
(my $strOperation) = logDebugParam (__PACKAGE__ . '->process', \@_,);
|
||||
|
||||
# Configure environment
|
||||
my $strConfig =
|
||||
"branches:\n" .
|
||||
" only:\n" .
|
||||
" - integration\n" .
|
||||
" - /-ci\$/\n" .
|
||||
"\n" .
|
||||
"dist: trusty\n" .
|
||||
"sudo: required\n" .
|
||||
"\n" .
|
||||
"language: c\n" .
|
||||
"\n" .
|
||||
"services:\n" .
|
||||
" - docker\n" .
|
||||
"\n" .
|
||||
"matrix:\n" .
|
||||
" include:\n";
|
||||
|
||||
# Iterate each OS
|
||||
foreach my $strVm (VM_LIST)
|
||||
{
|
||||
$strConfig .= " - env: PGB_CI=\"--vm=${strVm} test\"\n";
|
||||
}
|
||||
|
||||
$strConfig .=
|
||||
" - env: PGB_CI=\"--vm=u18 doc\"\n" .
|
||||
" - dist: bionic\n" .
|
||||
" env: PGB_CI=\"--vm=none test\"\n" .
|
||||
" env: PGB_CI=\"--vm=f30 test\"\n" .
|
||||
" - env: PGB_CI=\"--vm=co7 doc\"\n" .
|
||||
" - env: PGB_CI=\"--vm=co6 doc\"\n";
|
||||
|
||||
# Configure install and script
|
||||
$strConfig .=
|
||||
"\n" .
|
||||
"install:\n" .
|
||||
" - umask 0022\n" .
|
||||
" - cd ~ && pwd && whoami && umask && groups\n" .
|
||||
"\n" .
|
||||
"script:\n" .
|
||||
" - \${TRAVIS_BUILD_DIR?}/test/travis.pl \${PGB_CI?}\n";
|
||||
|
||||
buildPutDiffers($self->{oStorage}, '.travis.yml', $strConfig);
|
||||
|
||||
# Return from function and log return values if any
|
||||
return logDebugReturn($strOperation);
|
||||
}
|
||||
|
||||
1;
|
||||
@@ -46,7 +46,6 @@ use pgBackRestTest::Common::BuildTest;
|
||||
use pgBackRestTest::Common::CodeCountTest;
|
||||
use pgBackRestTest::Common::ContainerTest;
|
||||
use pgBackRestTest::Common::CoverageTest;
|
||||
use pgBackRestTest::Common::CiTest;
|
||||
use pgBackRestTest::Common::DefineTest;
|
||||
use pgBackRestTest::Common::ExecuteTest;
|
||||
use pgBackRestTest::Common::HostGroupTest;
|
||||
@@ -87,7 +86,6 @@ test.pl [options]
|
||||
--code-count generate code counts
|
||||
--smart perform libc/package builds only when source timestamps have changed
|
||||
--no-package do not build packages
|
||||
--no-ci-config don't overwrite the current continuous integration config
|
||||
--dev --smart --no-package --no-optimize
|
||||
--dev-test --no-package
|
||||
--expect --no-package --vm=co7 --db=9.6 --log-force
|
||||
@@ -158,7 +156,6 @@ my $bNoGen = false;
|
||||
my $bCodeCount = false;
|
||||
my $bSmart = false;
|
||||
my $bNoPackage = false;
|
||||
my $bNoCiConfig = false;
|
||||
my $bDev = false;
|
||||
my $bDevTest = false;
|
||||
my $bBackTrace = false;
|
||||
@@ -197,7 +194,6 @@ GetOptions ('q|quiet' => \$bQuiet,
|
||||
'build-only' => \$bBuildOnly,
|
||||
'build-max=s' => \$iBuildMax,
|
||||
'no-package' => \$bNoPackage,
|
||||
'no-ci-config' => \$bNoCiConfig,
|
||||
'coverage-only' => \$bCoverageOnly,
|
||||
'coverage-summary' => \$bCoverageSummary,
|
||||
'no-coverage' => \$bNoCoverage,
|
||||
@@ -641,13 +637,6 @@ eval
|
||||
}
|
||||
}
|
||||
|
||||
# Build CI config
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
if (!$bNoCiConfig)
|
||||
{
|
||||
(new pgBackRestTest::Common::CiTest($oStorageBackRest))->process();
|
||||
}
|
||||
|
||||
# Check Perl version against release notes and update version in C code if needed
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
my $bVersionDev = true;
|
||||
|
||||
+1
-1
@@ -219,7 +219,7 @@ eval
|
||||
|
||||
processBegin(($strVm eq VM_NONE ? "no container" : $strVm) . ' test');
|
||||
processExec(
|
||||
"${strTestExe} --no-gen --no-ci-config --vm-host=${strVmHost} --vm=${strVm}${strParam}",
|
||||
"${strTestExe} --no-gen --vm-host=${strVmHost} --vm=${strVm}${strParam}",
|
||||
{bShowOutputAsync => true, bOutLogOnError => false});
|
||||
processEnd();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user