Changeset 947 for trunk


Ignore:
Timestamp:
12/24/25 12:51:48 (5 hours ago)
Author:
Kris Deugau
Message:

/trunk/t

Rejig psql drop/reload to better suppress output unless debugging the test
framework itself; it's too noisy for regular use. Neither diag or note
seem to actually suppress it.
See #88

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/DNSTest.pm

    r946 r947  
    3636our $dnsdb;
    3737our $dbh;
     38our $debug;
    3839
    3940sub new {
     
    6566  # drop all tables etc
    6667  $ENV{PGPASSWORD} = $dnsdb->{dbpass};
    67   diag qx( psql -h $dnsdb->{dbhost} -U $dnsdb->{dbuser} $dnsdb->{dbname} < t/dropall.sql );
     68# neither diag or note seem to suppress output from qx
     69  my $dropdata = qx( psql -h $dnsdb->{dbhost} -U $dnsdb->{dbuser} $dnsdb->{dbname} 2>&1 < t/dropall.sql );
     70  diag( $dropdata ) if $debug;
    6871  # load some standard test data
    69   diag qx( psql -h $dnsdb->{dbhost} -U $dnsdb->{dbuser} $dnsdb->{dbname} < t/dns-unitbase.sql );
    70 
    71 }
     72  my $reload = qx( psql -h $dnsdb->{dbhost} -U $dnsdb->{dbuser} $dnsdb->{dbname} < t/dns-unitbase.sql );
     73  diag( $reload ) if $debug;
     74  undef $ENV{PGPASSWORD};
     75} # new()
    7276
    7377sub DESTROY {
Note: See TracChangeset for help on using the changeset viewer.