Backed out changeset ac9450e70e57
authorKyle Huey <khuey@kylehuey.com>
Fri, 24 Jun 2011 10:16:42 -0700
changeset 71752 3242878c355dd9c9452cd49725017beffbbafcbe
parent 71748 ac9450e70e57361cba13477b64c86da192b8a733
child 71753 61e9e59c8cca554805063cbdea12dbfcffd4cd3a
push id20605
push userkhuey@mozilla.com
push dateSat, 25 Jun 2011 17:13:33 +0000
treeherdermozilla-central@82b9558a9eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone7.0a1
backs outac9450e70e57361cba13477b64c86da192b8a733
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset ac9450e70e57
build/unix/Makefile.in
build/unix/test/Makefile.in
build/unix/test/runtest
build/unix/test/uniq.tpl
build/unix/uniq.pl
--- a/build/unix/Makefile.in
+++ b/build/unix/Makefile.in
@@ -1,9 +1,8 @@
-# -*- makefile -*-
 #
 # ***** BEGIN LICENSE BLOCK *****
 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
 #
 # The contents of this file are subject to the Mozilla Public License Version
 # 1.1 (the "License"); you may not use this file except in compliance with
 # the License. You may obtain a copy of the License at
 # http://www.mozilla.org/MPL/
@@ -17,17 +16,16 @@
 # March 31, 1998.
 #
 # The Initial Developer of the Original Code is
 # Netscape Communications Corporation.
 # Portions created by the Initial Developer are Copyright (C) 1998
 # the Initial Developer. All Rights Reserved.
 #
 # Contributor(s):
-#   Joey Armstrong <joey@mozilla.com>
 #
 # Alternatively, the contents of this file may be used under the terms of
 # either of the GNU General Public License Version 2 or later (the "GPL"),
 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 # in which case the provisions of the GPL or the LGPL are applicable instead
 # of those above. If you wish to allow use of your version of this file only
 # under the terms of either the GPL or the LGPL, and not to allow others to
 # use your version of this file under the terms of the MPL, indicate your
@@ -46,20 +44,12 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE       = build
 
 ifdef USE_ELF_HACK
 DIRS = elfhack
 endif
 
-ifdef ENABLE_TESTS
-  ifeq (,$(filter WINNT OS2,$(OS_ARCH)))
-    DIRS += test
-  endif # WIN
-endif # ENABLE_TESTS
-
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(srcdir)/run-mozilla.sh
 	$(INSTALL) $< $(DIST)/bin
-
-# EOF
deleted file mode 100644
--- a/build/unix/test/Makefile.in
+++ /dev/null
@@ -1,76 +0,0 @@
-# -*- makefile -*-
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is Mozilla Foundation.
-# Portions created by the Initial Developer are Copyright (C) 2011
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#   Joey Armstrong <joey@mozilla.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either of the GNU General Public License Version 2 or later (the "GPL"),
-# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-include $(topsrcdir)/config/rules.mk
-
-##################################################
-## Gather a list of tests, generate timestamp deps
-##################################################
-TS=.ts
-ifneq (,$(findstring check,$(MAKECMDGOALS)))
-          allsrc = $(wildcard $(srcdir)/*)
-       tests2run = $(notdir $(filter %.tpl,$(allsrc)))
-  check_targets += $(addprefix $(TS)/,$(tests2run))
-endif
-
-check:: $(TS) $(check_targets)
-
-#############################################
-# Only invoke tests when sources have changed
-#############################################
-$(TS)/%: $(srcdir)/%
-	$(PERL) $(srcdir)/runtest $<
-	@touch $@
-
-#####################################################
-## Extra dep needed to synchronize parallel execution
-#####################################################
-$(TS): $(TS)/.done
-$(TS)/.done:
-	$(MKDIR) -p $(dir $@)
-	touch $@
-
-GARBAGE_DIRS += $(TS)
-
-# EOF
deleted file mode 100755
--- a/build/unix/test/runtest
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env perl
-###########################################################################
-## Intent:
-##   Test::Harness is a testing wrapper that will process output
-##   from Test.pm module tests.  Sumarize results, report stats
-##   and exit with overall status for the testing suites.
-##
-## Run testing suite:
-##   % make clean test
-##   % perl runtest
-##
-## Run Individual tests
-##   % perl tUtils0
-###########################################################################
-
-##----------------------------##
-##---] CORE/CPAN INCLUDES [---##
-##----------------------------##
-use strict;
-use warnings;
-use Getopt::Long;
-
-use Test::Harness;
-
-##-------------------##
-##---]  EXPORTS  [---##
-##-------------------##
-our $VERSION = qw(1.0);
-use FindBin;
-
-##-------------------##
-##---]  GLOBALS  [---##
-##-------------------##
-my %argv;
-
-##----------------##
-##---]  MAIN  [---##
-##----------------##
-unless(GetOptions(\%argv,
-		  qw(debug|d:1)
-		 ))
-{
-    print "Usage: $0\n";
-    print "  --debug  Enable debug mode\n";
-    exit 1;
-}
-
-
-my @tests;
-
-########################################
-## Gather a list of tests if none passed
-########################################
-unless (@tests = @ARGV)
-{
-  local *D;
-    opendir(D, '.');
-    while($_ = readdir(D)) {
-	next unless /.t\S+$/;
-	next if (/\.ts$/);
-	push(@tests, $_);
-    }
-    closedir(D);
-}
-
-###############################################
-## Glob a list of tests when directories passed
-###############################################
-my @tmp;
-foreach (@tests)
-{
-  local *D;
-    if (-d $_ && (my $dir = $_))
-    {
-        opendir(D, $_) || die "opendir(D) failed: $!";
-	my @tests = grep(/\.t[^\.\s]+/o, readdir(D));
-	closedir(D);
-	push(@tmp, map{ join('/', $dir, $_); } @tests);
-    } else {
-        push(@tmp, $_);
-    }
-}
-@tests = @tmp;
-
-print "$0: @ARGV\n" if ($argv{debug});
-runtests(@tests);
-
-# EOF
deleted file mode 100755
--- a/build/unix/test/uniq.tpl
+++ /dev/null
@@ -1,151 +0,0 @@
-#!/usr/bin/env perl
-###########################################################################
-## Intent: Unit test to verify uniq.pl
-###########################################################################
-
-##----------------------------##
-##---] CORE/CPAN INCLUDES [---##
-##----------------------------##
-use strict;
-use warnings;
-use Cwd;
-use Getopt::Long;  # GetOptions
-
-use Test;
-sub BEGIN { plan tests => 12 }
-
-##-------------------##
-##---]  EXPORTS  [---##
-##-------------------##
-our $VERSION = qw(1.0);
-
-##------------------##
-##---] INCLUDES [---##
-##------------------##
-use FindBin;
-
-##-------------------##
-##---]  GLOBALS  [---##
-##-------------------##
-my %argv;
-
-
-###########################################################################
-## Intent: Run the arch command for output
-##
-## Returns:
-##    0   on success
-##    $?  command shell exit status
-###########################################################################
-sub uniq_pl
-{
-    my $cmd = "perl $FindBin::RealBin/../uniq.pl @_";
-    print "Running: $cmd\n" if ($argv{debug});
-    my @tmp = `$cmd 2>&1`;
-    my @output = map{ split(/\s+/o); } @tmp;
-    wantarray ? @output : "@output";
-} # uniq_pl
-
-###########################################################################
-## Intent:
-##
-## Returns:
-##    0 on success
-###########################################################################
-sub check_uniq
-{
-    print STDERR "Running test: check_uniq\n" if ($argv{debug});
-
-    # TODO: improve test, uniq.pl regexpr handling not quite right
-
-    my @todo =
-      (
-       [ '', qw(a a/b a/b/c) ] => [  qw(a a/b a/b/c) ],
-       [ '', qw(a/b a a/b/c) ] => [ qw(a/b a a/b/c) ],
-       [ '', qw(a/b/c a/b a) ] => [ qw(a/b/c a/b a) ],
-
-       [ '', qw(a a/b a/b/c a/b a) ] => [  qw(a a/b a/b/c) ], # dup removal
-
-       [ '-s', qw(a a/b a/b/c) ] => [ qw(a a/b a/b/c)  ],
-       [ '-s', qw(a/b a a/b/c) ] => [ qw(a a/b a/b/c) ],
-       [ '-s', qw(a/b/c a/b a) ] => [ qw(a a/b a/b/c) ],
-
-       [ '-r', qw(a a/b a/b/c) ] => [ qw(a) ],
-       [ '-r', qw(a/b a a/b/c) ] => [ qw(a/b a) ],
-       [ '-r', qw(a/b/c a/b a) ] => [ qw(a/b/c a/b a) ],
-
-       [ '-r', qw(. .. a/b ../a aa/bb) ] => [ qw(. .. a/b aa/bb) ],
-       [ '-r', qw(.. a/b ../a . aa/bb) ] => [ qw(.. a/b . aa/bb) ],
-      );
-
-    my $ct=1;
-    while (@todo)
-    {
-        my ($a, $b) = splice(@todo, 0, 2);
-	my @args = @{ $a };
-	my @exp = @{ $b };
-
-	my @out = uniq_pl(@args);
-#	compareExp(\@out, \@exp, 'Failed on line ' . __LINE__ . ", dataset $ct");
-	if (0 && 7 == $ct)
-	  {
-	    print STDERR "\n";
-	    print STDERR map{ "args> $_\n" }@args;
-	    print STDERR "\n";
-	    print STDERR map{ "exp> $_\n" }@exp;
-	    print STDERR "\n";
-	    print STDERR map{ "out> $_\n" }@out;
-	  }
-
-	ok("@out", "@exp", 'Failed on line ' . __LINE__ . ", dataset $ct");
-	$ct++;
-    }
-
-} # check_uniq
-
-###########################################################################
-## Intent: Smoke tests for the unittests module
-###########################################################################
-sub smoke
-{
-    print STDERR "Running test: smoke()\n" if ($argv{debug});
-} # smoke()
-
-###########################################################################
-## Intent: Intitialize global test objects and consts
-###########################################################################
-sub init
-{
-    print "Running: init()\n" if ($argv{debug});
-#    testplan(24, 0);
-} # init()
-
-##----------------##
-##---]  MAIN  [---##
-##----------------##
-unless(GetOptions(\%argv,
-		  qw(
-		     debug|d
-                     manual
-		     test=s@
-		     verbose
-		     )))
-{
-    print "USAGE: $0\n";
-    print "  --debug    Enable script debug mode\n";
-    print "  --fail     Force a testing failure condition\n";
-    print "  --manual   Also run disabled tests\n";
-    print "  --smoke    Run smoke tests then exit\n";
-    print "  --test     Run a list of tests by function name\n";
-    print "  --verbose  Enable script verbose mode\n";
-    exit 1;
-}
-
-init();
-testbyname(@{ $argv{test} }) if ($argv{test});
-smoke();
-
-check_uniq();
-ok(1, 0, 'Forced failure by command line arg --fail') if ($argv{fail});
-
-# EOF
--- a/build/unix/uniq.pl
+++ b/build/unix/uniq.pl
@@ -17,82 +17,47 @@
 #
 # The Initial Developer of the Original Code is
 # Netscape Communications Corporation.
 # Portions created by the Initial Developer are Copyright (C) 2000
 # the Initial Developer. All Rights Reserved.
 #
 # Contributor(s):
 #   Christopher Seawood <cls@seawood.org>
-#   Joey Armstrong <joey@mozilla.com>
 #
 # Alternatively, the contents of this file may be used under the terms of
 # either of the GNU General Public License Version 2 or later (the "GPL"),
 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 # in which case the provisions of the GPL or the LGPL are applicable instead
 # of those above. If you wish to allow use of your version of this file only
 # under the terms of either the GPL or the LGPL, and not to allow others to
 # use your version of this file under the terms of the MPL, indicate your
 # decision by deleting the provisions above and replace them with the notice
 # and other provisions required by the GPL or the LGPL. If you do not delete
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
-##----------------------------##
-##---] CORE/CPAN INCLUDES [---##
-##----------------------------##
-use strict;
-use warnings;
-use Getopt::Long;
+use Getopt::Std;
 
-##-------------------##
-##---]  EXPORTS  [---##
-##-------------------##
-our $VERSION = qw(1.1);
-
-##-------------------##
-##---]  GLOBALS  [---##
-##-------------------##
-my %argv;
+getopts('rs');
+$regexp = 1 if (defined($opt_r));
+$sort = 1 if (defined($opt_s));
 
-unless(GetOptions(\%argv,
-		  qw(debug|d:1
-		     regex|r:1
-		     sort|s:1)))
-{
-    print "Usage: $0\n";
-    print "  --sort   Sort list elements early\n";
-    print "  --regex  Exclude subdirs by pattern\n";
+undef @out;
+if ($sort) {
+    @in = sort @ARGV;
+} else {
+    @in = @ARGV;
 }
-
-my $debug = $argv{debug} || 0;
-
-my %seen;
-my @out;
-my @in = ($argv{sort}) ? sort @ARGV : @ARGV;
-
-foreach my $d (@in)
-{
-    next if ($seen{$d}++);
-
-    print "   arg is $d\n" if ($debug);
-
-    if ($argv{regex})
-    {
-        my $found = 0;
-        foreach my $dir (@out)
-	{
-	    my $dirM = quotemeta($dir);
-            $found++, last if ($d eq $dir || $d =~ m!^${dirM}\/!);
+foreach $d (@in) { 
+    if ($regexp) {
+        $found = 0; 
+        foreach $dir (@out) {
+            $found++, last if ($d =~ m/^$dir\// || $d eq $dir);
         }
-	print "Adding $d\n" if ($debug && !$found);
         push @out, $d if (!$found);
     } else {
-	print "Adding: $d\n" if ($debug);
-        push(@out, $d);
+        push @out, $d if (!grep(/^$d$/, @out));
     }
 }
-
 print "@out\n"
-
-# EOF