]> git.sur5r.net Git - openldap/commitdiff
problems: asort() is not available in all awk implementations
authorPierangelo Masarati <ando@openldap.org>
Wed, 25 Aug 2004 11:43:21 +0000 (11:43 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 25 Aug 2004 11:43:21 +0000 (11:43 +0000)
tests/scripts/acfiltersort.sh [deleted file]
tests/scripts/defines.sh
tests/scripts/ldifsort.awk [deleted file]
tests/scripts/sql-test900-write

diff --git a/tests/scripts/acfiltersort.sh b/tests/scripts/acfiltersort.sh
deleted file mode 100755 (executable)
index fe7b947..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh
-# $OpenLDAP$
-## This work is part of OpenLDAP Software <http://www.openldap.org/>.
-##
-## Copyright 1998-2004 The OpenLDAP Foundation.
-## All rights reserved.
-##
-## Redistribution and use in source and binary forms, with or without
-## modification, are permitted only as authorized by the OpenLDAP
-## Public License.
-##
-## A copy of this license is available in the file LICENSE in the
-## top-level directory of the distribution or, alternatively, at
-## <http://www.OpenLDAP.org/license.html>.
-#
-# Strip comments
-#
-egrep -iv '^#' | awk -f $LDIFSORT
index ec2c62f8a95044c708c183a9554cc136d687e045..2a4aca3887cb29b5c5474df2f72df1e061709ca6 100755 (executable)
@@ -93,8 +93,6 @@ CLIENTDIR=../clients/tools
 
 LDIFFILTER=$SRCDIR/scripts/acfilter.sh
 CONFFILTER=$SRCDIR/scripts/conf.sh
-LDIFFILTERSORT=$SRCDIR/scripts/acfiltersort.sh
-LDIFSORT=$SRCDIR/scripts/ldifsort.awk
 
 SLAPADD="../servers/slapd/slapd -Ta $LDAP_VERBOSE"
 SLAPCAT="../servers/slapd/slapd -Tc $LDAP_VERBOSE"
diff --git a/tests/scripts/ldifsort.awk b/tests/scripts/ldifsort.awk
deleted file mode 100644 (file)
index 5e8f9f6..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-# Parses LDIF files, eliminating contnuations, and sorts
-# Author: Pierangelo Masarati <ando@sys-net.it>
-
-func parse_line( line ) {
-       getline;
-
-       while ($0 != "") {
-               c = substr($0, 1, 1);
-               if (c == "#") {
-                       continue;
-               }
-               if (c != " ") {
-                       break;
-               }
-
-               line = line substr($0, 2, length($0));
-
-               getline;
-       }
-
-       return line;
-}
-
-/^dn: / {
-       /* FIXME: works only if DN is on one line... */
-       dn = $0;
-       dn = parse_line(dn);
-
-       while (1) {
-               if ($0 == "") {
-                       break;
-               }
-               line = $0;
-               line = parse_line(line);
-               attrs[line] = line
-       }
-
-       entry[dn] = dn "\n";
-       n = asort(attrs);
-       for (i = 1; i <= n; i++) {
-               entry[dn] = entry[dn] attrs[i] "\n"
-       }
-       delete attrs
-}
-
-END {
-       n = asort(entry);
-       for (i = 1; i <= n; i++) {
-               print entry[i];
-       }
-}
index bb85af0f83a1eb4b89a2d56a7314b9b89d061d68..37e8eefa781d809e8a17e66d69eb00b85d885492 100755 (executable)
@@ -304,7 +304,7 @@ EOMODS
        fi
 
        echo "Using ldapsearch to retrieve all the entries..."
-       $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
+       $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT1 -b "$BASEDN" \
                 "objectClass=*" > $SEARCHOUT 2>&1
 
        RC=$?
@@ -315,9 +315,9 @@ EOMODS
        fi
 
        echo "Filtering ldapsearch results..."
-       . $LDIFFILTERSORT < $SEARCHOUT > $SEARCHFLT
+       . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
        echo "Filtering modified ldif..."
-       . $LDIFFILTERSORT < $SQLWRITE > $LDIFFLT
+       . $LDIFFILTER < $SQLWRITE > $LDIFFLT
        echo "Comparing filter output..."
        $CMP $SEARCHFLT $LDIFFLT > $CMPOUT