You've already forked pgbackrest
							
							
				mirror of
				https://github.com/pgbackrest/pgbackrest.git
				synced 2025-10-30 23:37:45 +02:00 
			
		
		
		
	Logging enhancements:
1) Show log output realtime when --max-process=1 or only 1 test is being run. 2) Dry run now shows test output when --vm-out is specified.
This commit is contained in:
		| @@ -46,6 +46,7 @@ sub BackRestTestBackup_Test | ||||
| { | ||||
|     my $strTest = shift; | ||||
|     my $iThreadMax = shift; | ||||
|     my $bVmOut = shift; | ||||
|  | ||||
|     # If no test was specified, then run them all | ||||
|     if (!defined($strTest)) | ||||
| @@ -75,8 +76,11 @@ sub BackRestTestBackup_Test | ||||
|     my $strArchiveTestFile2 = BackRestTestCommon_DataPathGet() . '/test.archive1.bin'; | ||||
|  | ||||
|     # Print test banner | ||||
|     if (!$bVmOut) | ||||
|     { | ||||
|         &log(INFO, 'BACKUP MODULE ******************************************************************'); | ||||
|         &log(INFO, "THREAD-MAX: ${iThreadMax}\n"); | ||||
|     } | ||||
|  | ||||
|     # Drop any existing cluster | ||||
|     BackRestTestBackup_Drop(true, true); | ||||
| @@ -114,7 +118,10 @@ sub BackRestTestBackup_Test | ||||
|         $bCreate = true; | ||||
|         my $oFile; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test ${strThisTest}\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = false; $bRemote <= true; $bRemote++) | ||||
|         { | ||||
| @@ -388,7 +395,10 @@ sub BackRestTestBackup_Test | ||||
|         $bCreate = true; | ||||
|         my $oFile; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test ${strThisTest}\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = false; $bRemote <= true; $bRemote++) | ||||
|         { | ||||
| @@ -529,7 +539,10 @@ sub BackRestTestBackup_Test | ||||
|         $bCreate = true; | ||||
|         my $oFile; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test ${strThisTest}\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = false; $bRemote <= true; $bRemote++) | ||||
|         { | ||||
| @@ -694,7 +707,10 @@ sub BackRestTestBackup_Test | ||||
|         $iRun = 0; | ||||
|         my $oFile; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test ${strThisTest}\n"); | ||||
|         } | ||||
|  | ||||
|         if (BackRestTestCommon_Run(++$iRun, | ||||
|                                     "local", | ||||
| @@ -793,7 +809,10 @@ sub BackRestTestBackup_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test ${strModule} - ${strThisTest}\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = false; $bRemote <= true; $bRemote++) | ||||
|         { | ||||
| @@ -1314,7 +1333,10 @@ sub BackRestTestBackup_Test | ||||
|         $iRun = 0; | ||||
|         $bCreate = true; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test Full Backup\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = false; $bRemote <= true; $bRemote++) | ||||
|         { | ||||
| @@ -1822,7 +1844,10 @@ sub BackRestTestBackup_Test | ||||
|         $iRun = 0; | ||||
|         my $iRunMax = 1000; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test Backup Collision\n"); | ||||
|         } | ||||
|  | ||||
|         # Create the file object | ||||
|         my $oFile = (BackRest::File->new | ||||
| @@ -1949,7 +1974,10 @@ sub BackRestTestBackup_Test | ||||
|         $iRun = 0; | ||||
|         my $iRunMax = 1000; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test Rsync Collision\n"); | ||||
|         } | ||||
|  | ||||
|         # Create the file object | ||||
|         my $oFile = (BackRest::File->new | ||||
|   | ||||
| @@ -68,6 +68,7 @@ sub new | ||||
|     $self->{bSuppressError} = defined($self->{bSuppressError}) ? $self->{bSuppressError} : false; | ||||
|     $self->{bSuppressStdErr} = defined($self->{bSuppressStdErr}) ? $self->{bSuppressStdErr} : false; | ||||
|     $self->{bShowOutput} = defined($self->{bShowOutput}) ? $self->{bShowOutput} : false; | ||||
|     $self->{bShowOutputAsync} = defined($self->{bShowOutputAsync}) ? $self->{bShowOutputAsync} : false; | ||||
|     $self->{iExpectedExitStatus} = defined($self->{iExpectedExitStatus}) ? $self->{iExpectedExitStatus} : 0; | ||||
|     $self->{iRetrySeconds} = defined($self->{iRetrySeconds}) ? $self->{iRetrySeconds} : undef; | ||||
|  | ||||
| @@ -169,9 +170,14 @@ sub endRetry | ||||
|         # Drain the stdout stream and look for test points | ||||
|         while (defined(my $strLine = $self->{oIO}->lineRead(0, true, false))) | ||||
|         { | ||||
|             $self->{strOutLog} .= "$strLine\n"; | ||||
|             $self->{strOutLog} .= "${strLine}\n"; | ||||
|             $bFound = true; | ||||
|  | ||||
|             if ($self->{bShowOutputAsync}) | ||||
|             { | ||||
|                 syswrite(*STDOUT, "    ${strLine}\n") | ||||
|             } | ||||
|  | ||||
|             if (defined($strTest) && testCheck($strLine, $strTest)) | ||||
|             { | ||||
|                 &log(DEBUG, "Found test ${strTest}"); | ||||
| @@ -196,13 +202,18 @@ sub endRetry | ||||
|     # Drain the stdout stream | ||||
|     while (defined(my $strLine = $self->{oIO}->lineRead(0, true, false))) | ||||
|     { | ||||
|         $self->{strOutLog} .= "$strLine\n"; | ||||
|         $self->{strOutLog} .= "${strLine}\n"; | ||||
|  | ||||
|         if ($self->{bShowOutputAsync}) | ||||
|         { | ||||
|             syswrite(*STDOUT, "    ${strLine}\n") | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     # Drain the stderr stream | ||||
|     while (defined(my $strLine = $self->{oIO}->lineRead(0, false, false))) | ||||
|     { | ||||
|         $self->{strErrorLog} .= "$strLine\n"; | ||||
|         $self->{strErrorLog} .= "${strLine}\n"; | ||||
|     } | ||||
|  | ||||
|     # Pass the log to the LogTest object | ||||
|   | ||||
| @@ -175,7 +175,7 @@ sub BackRestTestCommon_Run | ||||
|     } | ||||
|  | ||||
|     # Return if this test should not be run | ||||
|     if ((defined($iModuleTestRunOnly) && $iModuleTestRunOnly != $iRun) || $bDryRun) | ||||
|     if (defined($iModuleTestRunOnly) && $iModuleTestRunOnly != $iRun) | ||||
|     { | ||||
|         return false; | ||||
|     } | ||||
| @@ -183,6 +183,11 @@ sub BackRestTestCommon_Run | ||||
|     # Output information about test to run | ||||
|     &log(INFO, 'run ' . sprintf('%03d', $iRun) . ' - ' . $strLog); | ||||
|  | ||||
|     if ($bDryRun) | ||||
|     { | ||||
|         return false; | ||||
|     } | ||||
|  | ||||
|     # If the module is defined then create a LogTest object | ||||
|     if (defined($strModuleParam)) | ||||
|     { | ||||
|   | ||||
| @@ -239,6 +239,8 @@ our @EXPORT = qw(BackRestTestConfig_Test); | ||||
| sub BackRestTestConfig_Test | ||||
| { | ||||
|     my $strTest = shift; | ||||
|     my $iThreadMax = shift; | ||||
|     my $bVmOut = shift; | ||||
|  | ||||
|     # Setup test variables | ||||
|     my $iRun; | ||||
| @@ -252,7 +254,11 @@ sub BackRestTestConfig_Test | ||||
|     use constant BOGUS => 'bogus'; | ||||
|  | ||||
|     # Print test banner | ||||
|     if (!$bVmOut) | ||||
|     { | ||||
|         &log(INFO, 'CONFIG MODULE ******************************************************************'); | ||||
|     } | ||||
|  | ||||
|     BackRestTestCommon_Drop(); | ||||
|  | ||||
|     #------------------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -264,7 +270,10 @@ sub BackRestTestConfig_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test ${strThisTest}\n"); | ||||
|         } | ||||
|  | ||||
|         if (BackRestTestCommon_Run(++$iRun, 'backup with no stanza')) | ||||
|         { | ||||
| @@ -552,7 +561,10 @@ sub BackRestTestConfig_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test ${strThisTest}\n"); | ||||
|         } | ||||
|  | ||||
|         BackRestTestCommon_Create(); | ||||
|  | ||||
|   | ||||
| @@ -75,6 +75,8 @@ our @EXPORT = qw(BackRestTestFile_Test); | ||||
| sub BackRestTestFile_Test | ||||
| { | ||||
|     my $strTest = shift; | ||||
|     my $iThreadMax = shift; | ||||
|     my $bVmOut = shift; | ||||
|  | ||||
|     # If no test was specified, then run them all | ||||
|     if (!defined($strTest)) | ||||
| @@ -92,7 +94,10 @@ sub BackRestTestFile_Test | ||||
|     $strUserBackRest = BackRestTestCommon_UserBackRestGet(); | ||||
|  | ||||
|     # Print test banner | ||||
|     if (!$bVmOut) | ||||
|     { | ||||
|         &log(INFO, 'FILE MODULE ********************************************************************'); | ||||
|     } | ||||
|  | ||||
|     #------------------------------------------------------------------------------------------------------------------------------- | ||||
|     # Create remotes | ||||
| @@ -125,7 +130,10 @@ sub BackRestTestFile_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test File->pathCreate()\n"); | ||||
|         } | ||||
|  | ||||
|         # Loop through local/remote | ||||
|         for (my $bRemote = 0; $bRemote <= 1; $bRemote++) | ||||
| @@ -234,8 +242,10 @@ sub BackRestTestFile_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         &log(INFO, '--------------------------------------------------------------------------------'); | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test File->move()\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = 0; $bRemote <= 0; $bRemote++) | ||||
|         { | ||||
| @@ -333,8 +343,10 @@ sub BackRestTestFile_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         &log(INFO, '--------------------------------------------------------------------------------'); | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test File->compress()\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = 0; $bRemote <= 0; $bRemote++) | ||||
|         { | ||||
| @@ -425,8 +437,10 @@ sub BackRestTestFile_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         &log(INFO, '--------------------------------------------------------------------------------'); | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test File->wait()\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = 0; $bRemote <= 1; $bRemote++) | ||||
|         { | ||||
| @@ -482,8 +496,10 @@ sub BackRestTestFile_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         &log(INFO, '--------------------------------------------------------------------------------'); | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test File->manifest()\n"); | ||||
|         } | ||||
|  | ||||
|         my $strManifestCompare = | ||||
|             ".,d,${strUser},${strGroup},0770,,,,\n" . | ||||
| @@ -636,8 +652,10 @@ sub BackRestTestFile_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         &log(INFO, '--------------------------------------------------------------------------------'); | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test File->list()\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = false; $bRemote <= true; $bRemote++) | ||||
|         { | ||||
| @@ -763,8 +781,10 @@ sub BackRestTestFile_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         &log(INFO, '--------------------------------------------------------------------------------'); | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test File->remove()\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = 0; $bRemote <= 1; $bRemote++) | ||||
|         { | ||||
| @@ -866,8 +886,10 @@ sub BackRestTestFile_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         &log(INFO, '--------------------------------------------------------------------------------'); | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "test File->hash()\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = false; $bRemote <= true; $bRemote++) | ||||
|         { | ||||
| @@ -957,8 +979,10 @@ sub BackRestTestFile_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         &log(INFO, '--------------------------------------------------------------------------------'); | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "test File->exists()\n"); | ||||
|         } | ||||
|  | ||||
|         for (my $bRemote = 0; $bRemote <= 1; $bRemote++) | ||||
|         { | ||||
|   | ||||
| @@ -38,13 +38,18 @@ our @EXPORT = qw(BackRestTestHelp_Test); | ||||
| sub BackRestTestHelp_Test | ||||
| { | ||||
|     my $strTest = shift; | ||||
|     my $iThreadMax = shift; | ||||
|     my $bVmOut = shift; | ||||
|  | ||||
|     # Setup test variables | ||||
|     my $iRun; | ||||
|     my $strModule = 'help'; | ||||
|  | ||||
|     # Print test banner | ||||
|     if (!$bVmOut) | ||||
|     { | ||||
|         &log(INFO, 'HELP MODULE *****************************************************************'); | ||||
|     } | ||||
|  | ||||
|     #------------------------------------------------------------------------------------------------------------------------------- | ||||
|     # Test config | ||||
| @@ -55,7 +60,10 @@ sub BackRestTestHelp_Test | ||||
|     { | ||||
|         $iRun = 0; | ||||
|  | ||||
|         if (!$bVmOut) | ||||
|         { | ||||
|             &log(INFO, "Test help\n"); | ||||
|         } | ||||
|  | ||||
|         BackRestTestCommon_Drop(true); | ||||
|         BackRestTestCommon_Create(); | ||||
|   | ||||
							
								
								
									
										70
									
								
								test/test.pl
									
									
									
									
									
								
							
							
						
						
									
										70
									
								
								test/test.pl
									
									
									
									
									
								
							| @@ -379,8 +379,10 @@ eval | ||||
|                                 if ($iDbVersionIdx == -1 || $strDbVersion eq 'all' || | ||||
|                                     ($strDbVersion ne 'all' && $strDbVersion eq ${$$oyVm{$strTestOS}{db}}[$iDbVersionIdx])) | ||||
|                                 { | ||||
|                                     my $iTestRunMin = defined($iModuleTestRun) ? $iModuleTestRun : (defined($$oTest{total}) ? 1 : -1); | ||||
|                                     my $iTestRunMax = defined($iModuleTestRun) ? $iModuleTestRun : (defined($$oTest{total}) ? $$oTest{total} : -1); | ||||
|                                     my $iTestRunMin = defined($iModuleTestRun) ? | ||||
|                                                           $iModuleTestRun : (defined($$oTest{total}) ? 1 : -1); | ||||
|                                     my $iTestRunMax = defined($iModuleTestRun) ? | ||||
|                                                           $iModuleTestRun : (defined($$oTest{total}) ? $$oTest{total} : -1); | ||||
|  | ||||
|                                     if (defined($$oTest{total}) && $iTestRunMax > $$oTest{total}) | ||||
|                                     { | ||||
| @@ -431,7 +433,7 @@ eval | ||||
|         my $iTestFail = 0; | ||||
|         my $oyProcess = []; | ||||
|  | ||||
|         if (!$bDryRun) | ||||
|         if (!$bDryRun || $bVmOut) | ||||
|         { | ||||
|             for (my $iProcessIdx = 0; $iProcessIdx < 8; $iProcessIdx++) | ||||
|             { | ||||
| @@ -441,12 +443,17 @@ eval | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         if ($bDryRun) | ||||
|         { | ||||
|             $iProcessMax = 1; | ||||
|         } | ||||
|  | ||||
|         my $iTestIdx = 0; | ||||
|         my $iProcessTotal; | ||||
|         my $iTestMax = @{$oyTestRun}; | ||||
|         my $lStartTime = time(); | ||||
|         my $bShowOutputAsync = $bVmOut && (@{$oyTestRun} == 1 || $iProcessMax == 1) && ! $bDryRun ? true : false; | ||||
|  | ||||
|         # foreach my $oTest (@{$oyTestRun}) | ||||
|         do | ||||
|         { | ||||
|             do | ||||
| @@ -465,19 +472,25 @@ eval | ||||
|  | ||||
|                         if (defined($iExitStatus)) | ||||
|                         { | ||||
|                             if ($bShowOutputAsync) | ||||
|                             { | ||||
|                                 syswrite(*STDOUT, "\n"); | ||||
|                             } | ||||
|  | ||||
|                             my $fTestElapsedTime = ceil((gettimeofday() - $$oyProcess[$iProcessIdx]{start_time}) * 100) / 100; | ||||
|  | ||||
|                             if (!($iExitStatus == 0 || $iExitStatus == 255)) | ||||
|                             { | ||||
|                                 &log(ERROR, "${strTestDone} (err${iExitStatus}-${fTestElapsedTime}s)" . | ||||
|                                      (defined($oExecDone->{strOutLog}) ? ":\n\n" . trim($oExecDone->{strOutLog}) . "\n" : ''), | ||||
|                                      undef, undef, 4); | ||||
|                                      (defined($oExecDone->{strOutLog}) && !$bShowOutputAsync ? | ||||
|                                         ":\n\n" . trim($oExecDone->{strOutLog}) . "\n" : ''), undef, undef, 4); | ||||
|                                 $iTestFail++; | ||||
|                             } | ||||
|                             else | ||||
|                             { | ||||
|                                 &log(INFO, "${strTestDone} (${fTestElapsedTime}s)". | ||||
|                                             ($bVmOut ? ":\n\n" . trim($oExecDone->{strOutLog}) . "\n" : ''), undef, undef, 4); | ||||
|                                      ($bVmOut && !$bShowOutputAsync ? | ||||
|                                          ":\n\n" . trim($oExecDone->{strOutLog}) . "\n" : ''), undef, undef, 4); | ||||
|                             } | ||||
|  | ||||
|                             if (!$bNoCleanup) | ||||
| @@ -517,9 +530,10 @@ eval | ||||
|  | ||||
|                     my $strImage = 'test-' . $iProcessIdx; | ||||
|  | ||||
|                     &log($bDryRun ? INFO : DEBUG, $strTest); | ||||
|                     &log($bDryRun && !$bVmOut || $bShowOutputAsync ? INFO : DEBUG, "${strTest}" . | ||||
|                          ($bVmOut || $bShowOutputAsync ? "\n" : '')); | ||||
|  | ||||
|                     if (!$bDryRun) | ||||
|                     if (!$bDryRun || $bVmOut) | ||||
|                     { | ||||
|                         executeTest("docker run -itd -h $$oTest{os}-test --name=${strImage}" . | ||||
|                                     " -v /backrest:/backrest backrest/$$oTest{os}-test"); | ||||
| @@ -537,14 +551,17 @@ eval | ||||
|                                      (defined($$oTest{run}) ? " --run=$$oTest{run}" : '') . | ||||
|                                      (defined($$oTest{thread}) ? " --thread-max=$$oTest{thread}" : '') . | ||||
|                                      (defined($$oTest{db}) ? " --db-version=$$oTest{db}" : '') . | ||||
|                                      " --no-cleanup"; | ||||
|                                      ($bDryRun ? " --dry-run" : '') . | ||||
|                                      " --no-cleanup --vm-out"; | ||||
|  | ||||
|                     &log(DEBUG, $strCommand); | ||||
|  | ||||
|                     if (!$bDryRun) | ||||
|                     if (!$bDryRun || $bVmOut) | ||||
|                     { | ||||
|                         my $fTestStartTime = gettimeofday(); | ||||
|                         my $oExec = new BackRestTest::Common::ExecuteTest($strCommand, {bSuppressError => true}); | ||||
|                         my $oExec = new BackRestTest::Common::ExecuteTest( | ||||
|                             $strCommand, | ||||
|                             {bSuppressError => true, bShowOutputAsync => $bShowOutputAsync}); | ||||
|  | ||||
|                         $oExec->begin(); | ||||
|  | ||||
| @@ -565,8 +582,15 @@ eval | ||||
|         } | ||||
|         while ($iProcessTotal > 0); | ||||
|  | ||||
|         if ($bDryRun) | ||||
|         { | ||||
|             &log(INFO, 'DRY RUN COMPLETED'); | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             &log(INFO, 'TESTS COMPLETED ' . ($iTestFail == 0 ? 'SUCCESSFULLY' : "WITH ${iTestFail} FAILURE(S)") . | ||||
|                        ' (' . (time() - $lStartTime) . 's)'); | ||||
|         } | ||||
|  | ||||
|         exit 0; | ||||
|     } | ||||
| @@ -600,7 +624,7 @@ eval | ||||
|  | ||||
|                     if (-e "${strVersionPath}/initdb") | ||||
|                     { | ||||
|                         &log(INFO, "FOUND pgsql-bin at ${strVersionPath}"); | ||||
|                         &log(DEBUG, "FOUND pgsql-bin at ${strVersionPath}"); | ||||
|                         push @stryTestVersion, $strVersionPath; | ||||
|                     } | ||||
|                 } | ||||
| @@ -640,8 +664,14 @@ eval | ||||
|     { | ||||
|         if (BackRestTestCommon_Setup($strExe, $strTestPath, $stryTestVersion[0], $iModuleTestRun, | ||||
|                                      $bDryRun, $bNoCleanup, $bLogForce)) | ||||
|         { | ||||
|             if (!$bVmOut && | ||||
|                 ($strModule eq 'all' || | ||||
|                  $strModule eq 'backup' && $strModuleTest eq 'all' || | ||||
|                  $strModule eq 'backup' && $strModuleTest eq 'full')) | ||||
|             { | ||||
|                 &log(INFO, "TESTING psql-bin = $stryTestVersion[0]\n"); | ||||
|             } | ||||
|  | ||||
|             if ($bInfinite) | ||||
|             { | ||||
| @@ -656,29 +686,29 @@ eval | ||||
|  | ||||
|             if ($strModule eq 'all' || $strModule eq 'help') | ||||
|             { | ||||
|                 BackRestTestHelp_Test($strModuleTest); | ||||
|                 BackRestTestHelp_Test($strModuleTest, undef, $bVmOut); | ||||
|             } | ||||
|  | ||||
|             if ($strModule eq 'all' || $strModule eq 'config') | ||||
|             { | ||||
|                 BackRestTestConfig_Test($strModuleTest); | ||||
|                 BackRestTestConfig_Test($strModuleTest, undef, $bVmOut); | ||||
|             } | ||||
|  | ||||
|             if ($strModule eq 'all' || $strModule eq 'file') | ||||
|             { | ||||
|                 BackRestTestFile_Test($strModuleTest); | ||||
|                 BackRestTestFile_Test($strModuleTest, undef, $bVmOut); | ||||
|             } | ||||
|  | ||||
|             if ($strModule eq 'all' || $strModule eq 'backup') | ||||
|             { | ||||
|                 if (!defined($iThreadMax) || $iThreadMax == 1) | ||||
|                 { | ||||
|                     BackRestTestBackup_Test($strModuleTest, 1); | ||||
|                     BackRestTestBackup_Test($strModuleTest, 1, $bVmOut); | ||||
|                 } | ||||
|  | ||||
|                 if (!defined($iThreadMax) || $iThreadMax > 1) | ||||
|                 { | ||||
|                     BackRestTestBackup_Test($strModuleTest, defined($iThreadMax) ? $iThreadMax : 4); | ||||
|                     BackRestTestBackup_Test($strModuleTest, defined($iThreadMax) ? $iThreadMax : 4, $bVmOut); | ||||
|                 } | ||||
|  | ||||
|                 if (@stryTestVersion > 1 && ($strModuleTest eq 'all' || $strModuleTest eq 'full')) | ||||
| @@ -688,7 +718,7 @@ eval | ||||
|                         BackRestTestCommon_Setup($strExe, $strTestPath, $stryTestVersion[$iVersionIdx], | ||||
|                                                  $iModuleTestRun, $bDryRun, $bNoCleanup); | ||||
|                         &log(INFO, "TESTING psql-bin = $stryTestVersion[$iVersionIdx] for backup/full\n"); | ||||
|                         BackRestTestBackup_Test('full', defined($iThreadMax) ? $iThreadMax : 4); | ||||
|                         BackRestTestBackup_Test('full', defined($iThreadMax) ? $iThreadMax : 4, $bVmOut); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
| @@ -717,7 +747,7 @@ if ($@) | ||||
|     exit 250; | ||||
| } | ||||
|  | ||||
| if (!$bDryRun) | ||||
| if (!$bDryRun && !$bVmOut) | ||||
| { | ||||
|     &log(INFO, 'TESTS COMPLETED SUCCESSFULLY (DESPITE ANY ERROR MESSAGES YOU SAW)'); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user