diff --git a/helper/compare_dbs.pl b/helper/compare_dbs.pl index 6686eb9..3c03611 100755 --- a/helper/compare_dbs.pl +++ b/helper/compare_dbs.pl @@ -184,13 +184,13 @@ foreach my $schema ( split( / /, $argv->{schemes} ) ) { $struct2 = $dbh2->selectall_hashref( $queries->{$obj}, 'key_col' ); unless ( Compare($struct1, $struct2) ) { - $exit = 1; print_diff($struct1, $struct2, $obj, $res, $schema); } } } if ( $argv->{formatter} eq 'tap' ) { + $exit = 0; tap_output(); } else { @@ -316,6 +316,7 @@ sub tap_output { sub human_output { my $number = scalar(@{$res}); if ( $number > 0 ) { + $exit = 1; print "The following errors were found:\n\n"; foreach my $err ( @{$res} ) { print "$err\n"; diff --git a/sbin/ngcp-mysql-compare-dbs b/sbin/ngcp-mysql-compare-dbs index 04c3fc7..bf82541 100755 --- a/sbin/ngcp-mysql-compare-dbs +++ b/sbin/ngcp-mysql-compare-dbs @@ -62,4 +62,4 @@ if [[ -n "${FORMATTER}" ]]; then fi /usr/share/ngcp-system-tests/compare_dbs.pl \ --schemes="${NGCP_DB_BACKUP_FINAL_LIST[*]}" \ - "${opts[@]}" || true + "${opts[@]}"