~ubuntu-branches/ubuntu/utopic/curl/utopic-proposed

« back to all changes in this revision

Viewing changes to tests/runtests.pl

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-04-30 13:34:14 UTC
  • mfrom: (76.1.1 utopic)
  • Revision ID: package-import@ubuntu.com-20140430133414-lal4vsnldlvsue7n
Tags: 7.36.0-2ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2349
2349
               $has_darwinssl=1;
2350
2350
               $ssllib="DarwinSSL";
2351
2351
           }
2352
 
           elsif ($libcurl =~ /ares/i) {
 
2352
           if ($libcurl =~ /ares/i) {
2353
2353
               $has_cares=1;
2354
2354
               $resolver="c-ares";
2355
2355
           }
2403
2403
            if($feat =~ /NTLM/i) {
2404
2404
                # NTLM enabled
2405
2405
                $has_ntlm=1;
 
2406
                # Use this as a proxy for any cryptographic authentication
 
2407
                $has_crypto=1;
2406
2408
            }
2407
2409
            if($feat =~ /NTLM_WB/i) {
2408
2410
                # NTLM delegation to winbind daemon ntlm_auth helper enabled
2513
2515
    $has_shared = `sh $CURLCONFIG --built-shared`;
2514
2516
    chomp $has_shared;
2515
2517
 
2516
 
    # curl doesn't list cryptographic support separately, so assume it's
2517
 
    # always available
2518
 
    $has_crypto=1;
2519
 
 
2520
2518
    my $hostname=join(' ', runclientoutput("hostname"));
2521
2519
    my $hosttype=join(' ', runclientoutput("uname -a"));
2522
2520
 
3147
3145
    my @reply = getpart("reply", "data");
3148
3146
    my @replycheck = getpart("reply", "datacheck");
3149
3147
 
 
3148
    my %replyattr = getpartattr("reply", "data");
 
3149
    my %replycheckattr = getpartattr("reply", "datacheck");
 
3150
 
3150
3151
    if (@replycheck) {
3151
3152
        # we use this file instead to check the final output against
3152
3153
 
3153
 
        my %hash = getpartattr("reply", "datacheck");
3154
 
        if($hash{'nonewline'}) {
 
3154
        if($replycheckattr{'nonewline'}) {
3155
3155
            # Yes, we must cut off the final newline from the final line
3156
3156
            # of the datacheck
3157
3157
            chomp($replycheck[$#replycheck]);
3158
3158
        }
 
3159
        if($replycheckattr{'mode'}) {
 
3160
            $replyattr{'mode'} = $replycheckattr{'mode'};
 
3161
        }
3159
3162
 
3160
3163
        @reply=@replycheck;
3161
3164
    }
3329
3332
        $DBGCURL=$CMDLINE;
3330
3333
    }
3331
3334
 
 
3335
    if($gdbthis) {
 
3336
        # gdb is incompatible with valgrind, so disable it when debugging
 
3337
        # Perhaps a better approach would be to run it under valgrind anyway
 
3338
        # with --db-attach=yes or --vgdb=yes.
 
3339
        $disablevalgrind=1;
 
3340
    }
 
3341
 
3332
3342
    if($fail_due_event_based) {
3333
3343
        logmsg "This test cannot run event based\n";
3334
3344
        return -1;
3363
3373
            $valgrindcmd .= "$valgrind_tool " if($valgrind_tool);
3364
3374
            $valgrindcmd .= "--leak-check=yes ";
3365
3375
            $valgrindcmd .= "--suppressions=$srcdir/valgrind.supp ";
 
3376
           # $valgrindcmd .= "--gen-suppressions=all ";
3366
3377
            $valgrindcmd .= "--num-callers=16 ";
3367
3378
            $valgrindcmd .= "${valgrind_logfile}=$LOGDIR/valgrind$testnum";
3368
3379
            $CMDLINE = "$valgrindcmd $CMDLINE";
3616
3627
        my $filemode=$hash{'mode'};
3617
3628
        if($filemode && ($filemode eq "text") && $has_textaware) {
3618
3629
            # text mode when running on windows: fix line endings
3619
 
            map s/\r\n/\n/g, @actual;
 
3630
            map s/\r\n/\n/g, @validstdout;
 
3631
            map s/\n/\r\n/g, @validstdout;
3620
3632
        }
3621
3633
 
3622
3634
        if($hash{'nonewline'}) {
3635
3647
        $ok .= "-"; # stdout not checked
3636
3648
    }
3637
3649
 
3638
 
    my %replyattr = getpartattr("reply", "data");
3639
3650
    if(!$replyattr{'nocheck'} && (@reply || $replyattr{'sendzero'})) {
3640
3651
        # verify the received data
3641
3652
        my @out = loadarray($CURLOUT);
3642
 
        my %hash = getpartattr("reply", "data");
3643
3653
        # get the mode attribute
3644
 
        my $filemode=$hash{'mode'};
 
3654
        my $filemode=$replyattr{'mode'};
3645
3655
        if($filemode && ($filemode eq "text") && $has_textaware) {
3646
3656
            # text mode when running on windows: fix line endings
3647
 
            map s/\r\n/\n/g, @out;
 
3657
            map s/\r\n/\n/g, @reply;
 
3658
            map s/\n/\r\n/g, @reply;
3648
3659
        }
3649
3660
 
3650
3661
        $res = compare($testnum, $testname, "data", \@out, \@reply);
3788
3799
 
3789
3800
            my $filemode=$hash{'mode'};
3790
3801
            if($filemode && ($filemode eq "text") && $has_textaware) {
3791
 
                # text mode when running on windows means adding an extra
3792
 
                # strip expression
3793
 
                push @stripfile, "s/\r\n/\n/";
 
3802
                # text mode when running on windows: fix line endings
 
3803
                map s/\r\n/\n/g, @outfile;
 
3804
                map s/\n/\r\n/g, @outfile;
3794
3805
            }
3795
3806
 
3796
3807
            my $strip;
3797
3808
            for $strip (@stripfile) {
3798
3809
                chomp $strip;
 
3810
                my @newgen;
3799
3811
                for(@generated) {
3800
3812
                    eval $strip;
 
3813
                    if($_) {
 
3814
                        push @newgen, $_;
 
3815
                    }
3801
3816
                }
 
3817
                # this is to get rid of array entries that vanished (zero
 
3818
                # length) because of replacements
 
3819
                @generated = @newgen;
3802
3820
            }
3803
3821
 
3804
3822
            @outfile = fixarray(@outfile);
4883
4901
        $TESTCASES .= " $n";
4884
4902
    }
4885
4903
}
 
4904
else {
 
4905
    my $verified="";
 
4906
    map {
 
4907
        if (-e "$TESTDIR/test$_") {
 
4908
            $verified.="$_ ";
 
4909
        }
 
4910
    } split(" ", $TESTCASES);
 
4911
    if($verified eq "") {
 
4912
        print "No existing test cases were specified\n";
 
4913
        exit;
 
4914
    }
 
4915
    $TESTCASES = $verified;
 
4916
}
4886
4917
 
4887
4918
#######################################################################
4888
4919
# Start the command line log