Testsuite: MySQL portability
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 16 Jan 2018 23:14:49 +0000 (23:14 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Tue, 16 Jan 2018 23:59:30 +0000 (23:59 +0000)
Community-mysql has no mysqld-safe script, and mysqld has varying locations.

test/Makefile.in
test/bin/locate.sh
test/scripts/2610-MySQL/2610

index 546766e41df2717e883ec8d383878c771212dc54..f67f8d1f590de1f2512ca05655ba88bc6f25f747 100644 (file)
@@ -27,7 +27,7 @@ all:            binaries sysbinaries
 binaries:      $(BINARIES)
 
 sysbinaries:   FRC
-               bin/locate.sh initdb postgres pg_ctl
+               sh -x bin/locate.sh initdb postgres pg_ctl mysqld
                ls -la bin.sys
 
 # Compile and link the programs:
index 19c3a5fda99e451999c1ec3748adef8b13c7877a..95f0cea7b0217ce3daa7a8c9e5e76eba6a67d583 100755 (executable)
@@ -3,23 +3,30 @@
 [ -d bin.sys ] || mkdir bin.sys
 cd bin.sys
 
-while read d
+while [ $# -gt 0 ]
 do
-  if [ -x $d/$1 ]
-  then
-    while [ $# -gt 0 ]
-    do
+  while read d
+  do
+    if [ -x $d/$1 ]
+    then
       rm -f ./$1
       ln -s $d/$1 .
-      shift
-    done
-    exit 0
-  fi
-done <<-HERE
+      break
+    fi
+  done <<-HERE
        /bin
        /usr/bin
+       /usr/sbin
+       /usr/libexec
        /usr/local/bin
        /usr/lib/postgresql/10/bin
+       /usr/lib/postgresql/9.5/bin
+       /usr/lib/postgresql/9.4/bin
+       /usr/lib/postgresql/9.3/bin
+       /usr/lib/postgresql/9.2/bin
+       /usr/lib/postgresql/9.1/bin
        /usr/lib/postgresql/9/bin
 HERE
+  shift
+done
 
index d160db27075861bbddc9aa8c3707a6e3fdf32e2f..5c104f3fe84d7091ba343b72532e2bc658b707c0 100644 (file)
@@ -11,7 +11,7 @@ sudo rm test-stdout test-stderr
 #
 # start a db server
 background
-mysqld_safe --datadir=DIR/mysql --log-error=DIR/mysql/log --port=PORT_N --socket=DIR/mysql/sock --pid-file=DIR/mysql/pidfile
+DIR/bin.sys/mysqld --datadir=DIR/mysql --log-error=DIR/mysql/log --bind-address=* --port=PORT_N --socket=DIR/mysql/sock --pid-file=DIR/mysql/pidfile
 ****
 #
 # wait for db startup, insert some data