Changeset 50080 in webkit


Ignore:
Timestamp:
Oct 26, 2009 11:57:21 AM (15 years ago)
Author:
Csaba Osztrogonác
Message:

Unification of using null device in perl scripts.
https://bugs.webkit.org/show_bug.cgi?id=30572

Patch by Csaba Osztrogonác <Csaba Osztrogonác> on 2009-10-26
Reviewed by Darin Adler.

  • Scripts/VCSUtils.pm:
  • Scripts/bisect-builds:
  • Scripts/resolve-ChangeLogs:
  • Scripts/run-iexploder-tests:
  • Scripts/run-jsc:
  • Scripts/run-mangleme-tests:
  • Scripts/run-webkit-tests:
  • Scripts/webkitdirs.pm:

Using File::Spec->devnull() instead of hard coded /dev/null.

Location:
trunk/WebKitTools
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r50078 r50080  
     12009-10-26  Csaba Osztrogonác  <ossy@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Unification of using null device in perl scripts.
     6        https://bugs.webkit.org/show_bug.cgi?id=30572
     7
     8        * Scripts/VCSUtils.pm:
     9        * Scripts/bisect-builds:
     10        * Scripts/resolve-ChangeLogs:
     11        * Scripts/run-iexploder-tests:
     12        * Scripts/run-jsc:
     13        * Scripts/run-mangleme-tests:
     14        * Scripts/run-webkit-tests:
     15        * Scripts/webkitdirs.pm:
     16        Using File::Spec->devnull() instead of hard coded /dev/null.
     17
    1182009-10-26  Eric Seidel  <eric@webkit.org>
    219
  • trunk/WebKitTools/Scripts/VCSUtils.pm

    r48793 r50080  
    7171{
    7272    my ($dir) = @_;
    73     return system("cd $dir && git rev-parse > /dev/null 2>&1") == 0;
     73    return system("cd $dir && git rev-parse > " . File::Spec->devnull() . " 2>&1") == 0;
    7474}
    7575
     
    160160sub determineSVNRoot()
    161161{
    162     my $devNull = File::Spec->devnull();
    163162    my $last = '';
    164163    my $path = '.';
     
    170169        my $thisUUID;
    171170        # Ignore error messages in case we've run past the root of the checkout.
    172         open INFO, "svn info '$path' 2> $devNull |" or die;
     171        open INFO, "svn info '$path' 2> " . File::Spec->devnull() . " |" or die;
    173172        while (<INFO>) {
    174173            if (/^Repository Root: (.+)/) {
  • trunk/WebKitTools/Scripts/bisect-builds

    r48353 r50080  
    369369        $i++;
    370370        usleep 100 if $i > 1;
    371         `hdiutil detach '$mountPath' 2> /dev/null`;
     371        exec "hdiutil", "detach '$mountPath' 2> " . File::Spec->devnull();
    372372        die "Could not unmount $diskImage at $mountPath" if $i > 100;
    373373    }
     
    394394    `DYLD_FRAMEWORK_PATH=$frameworkPath WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES $safari $tempFile`;
    395395
    396     `hdiutil detach '$mountPath' 2> /dev/null`;
     396    exec "hdiutil", "detach '$mountPath' 2> " . File::Spec->devnull();
    397397}
    398398
  • trunk/WebKitTools/Scripts/resolve-ChangeLogs

    r47970 r50080  
    409409
    410410        # Apply the new patch
    411         open(PATCH, "| patch -p1 $file > /dev/null") or die $!;
     411        open(PATCH, "| patch -p1 $file > " . File::Spec->devnull()) or die $!;
    412412        print PATCH $newPatch;
    413413        close(PATCH) or die $!;
     
    461461    unlink("${fileNewer}.rej");
    462462
    463     open(PATCH, "| patch --fuzz=3 --binary $fileNewer > /dev/null") or die $!;
     463    open(PATCH, "| patch --fuzz=3 --binary $fileNewer > " . File::Spec->devnull()) or die $!;
    464464    print PATCH fixChangeLogPatch($patch);
    465465    close(PATCH);
  • trunk/WebKitTools/Scripts/run-iexploder-tests

    r34201 r50080  
    3333
    3434use Cwd;
     35use File::Spec;
    3536use FindBin;
    3637use Getopt::Long;
     
    150151
    151152    my $retryCount = 20;
    152     while (system("/usr/bin/curl -q --silent --stderr - --output /dev/null $listen") && $retryCount) {
     153    while (system("/usr/bin/curl -q --silent --stderr - --output " . File::Spec->devnull() . " $listen") && $retryCount) {
    153154        sleep 1;
    154155        --$retryCount;
  • trunk/WebKitTools/Scripts/run-jsc

    r49476 r50080  
    3131use strict;
    3232use warnings;
     33use File::Spec;
    3334use FindBin;
    3435use lib $FindBin::Bin;
     
    4546
    4647my $jsc = jscProductDir() . "/jsc @ARGV";
    47 $jsc .= " 2> /dev/null" unless $verbose;
     48$jsc .= " 2> " . File::Spec->devnull() unless $verbose;
    4849
    4950my $dyld = jscProductDir();
  • trunk/WebKitTools/Scripts/run-mangleme-tests

    r34201 r50080  
    3333
    3434use Cwd;
     35use File::Spec;
    3536use FindBin;
    3637use Getopt::Long;
     
    153154
    154155    my $retryCount = 20;
    155     while (system("/usr/bin/curl -q --silent --stderr - --output /dev/null $listen") && $retryCount) {
     156    while (system("/usr/bin/curl -q --silent --stderr - --output " . File::Spec->devnull() . " $listen") && $retryCount) {
    156157        sleep 1;
    157158        --$retryCount;
  • trunk/WebKitTools/Scripts/run-webkit-tests

    r49243 r50080  
    322322    my ($childIn, $childOut, $childErr);
    323323    if ($quiet) {
    324         open(DEVNULL, ">", File::Spec->devnull) or die "Failed to open /dev/null";
     324        open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null";
    325325        $childOut = ">&DEVNULL";
    326326        $childErr = ">&DEVNULL";
     
    13521352
    13531353    my $retryCount = 20;
    1354     while (system("/usr/bin/curl -q --silent --stderr - --output /dev/null $listen") && $retryCount) {
     1354    while (system("/usr/bin/curl -q --silent --stderr - --output " . File::Spec->devnull() . " $listen") && $retryCount) {
    13551355        sleep 1;
    13561356        --$retryCount;
  • trunk/WebKitTools/Scripts/webkitdirs.pm

    r49543 r50080  
    118118        }
    119119
    120         open PRODUCT, "defaults read com.apple.Xcode PBXApplicationwideBuildSettings 2> /dev/null |" or die;
     120        open PRODUCT, "defaults read com.apple.Xcode PBXApplicationwideBuildSettings 2> " . File::Spec->devnull() . " |" or die;
    121121        $baseProductDir = join '', <PRODUCT>;
    122122        close PRODUCT;
     
    126126
    127127        if (!defined($baseProductDir)) {
    128             open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> /dev/null |" or die;
     128            open PRODUCT, "defaults read com.apple.Xcode PBXProductDirectory 2> " . File::Spec->devnull() . " |" or die;
    129129            $baseProductDir = <PRODUCT>;
    130130            close PRODUCT;
Note: See TracChangeset for help on using the changeset viewer.