List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:November 26 2010 11:12am
Subject:bzr commit into mysql-5.1-telco-7.1 branch (magnus.blaudd:3997)
View as plain text  
#At file:///home/msvensson/mysql/7.1/ based on revid:magnus.blaudd@stripped

 3997 Magnus Blåudd	2010-11-26
      ndb
       - fix ndbjtie unit tests to run tests relative to the script's directory
         instead of cd to different directory based on asumptions where
         script are called from

    modified:
      storage/ndb/src/ndbjtie/jtie/test/jtie_unit_tests-t
      storage/ndb/src/ndbjtie/mysql/test/mysql_utils_unit_tests-t
      storage/ndb/src/ndbjtie/test/ndbjtie_unit_tests-t
=== modified file 'storage/ndb/src/ndbjtie/jtie/test/jtie_unit_tests-t'
--- a/storage/ndb/src/ndbjtie/jtie/test/jtie_unit_tests-t	2010-08-28 16:35:45 +0000
+++ b/storage/ndb/src/ndbjtie/jtie/test/jtie_unit_tests-t	2010-11-26 11:12:38 +0000
@@ -12,11 +12,10 @@
 # test range
 echo "1..3"
 
-# this script gets invoked from $(top_srcdir)/unittest
-cd ../storage/ndb/src/ndbjtie/jtie/test
+script_dir=`dirname $0`
 
 # log file for output from this script
-log="`pwd`/jtie_unit_tests-t.log"
+log="jtie_unit_tests-t.log"
 rm -f "$log"
 touch "$log"
 
@@ -32,10 +31,9 @@ run_test()
 {
     test_name=$1;
     test_counter=`expr $test_counter + 1`
-    script_name="test_$test_name.sh"
+    script_name="$script_dir/$test_name/test_$test_name.sh"
 
-    cd $test_name
-    echo "running test '`pwd`/$test_name':" >> "$log" 2>&1
+    echo "running test '$script_name':" >> "$log" 2>&1
     if [ ! -x "$script_name" ]; then
        status="ok $test_counter # skip $test_name test file missing"
     else

=== modified file 'storage/ndb/src/ndbjtie/mysql/test/mysql_utils_unit_tests-t'
--- a/storage/ndb/src/ndbjtie/mysql/test/mysql_utils_unit_tests-t	2010-02-13 09:41:33 +0000
+++ b/storage/ndb/src/ndbjtie/mysql/test/mysql_utils_unit_tests-t	2010-11-26 11:12:38 +0000
@@ -12,27 +12,26 @@
 # test range
 echo "1..1"
 
-# this script gets invoked from $(top_srcdir)/unittest
-cd ../storage/ndb/src/ndbjtie/mysql/test
+script_dir=`dirname $0`
 
 # log file for output from this script
-log="`pwd`/mysql_utils_unit_tests-t.log"
+log="mysql_utils_unit_tests-t.log"
 rm -f "$log"
 touch "$log"
 
 # run test
 echo "running test from directory:" >> "$log" 2>&1
-echo "  `pwd`" >> "$log" 2>&1
+echo "  $script_dir" >> "$log" 2>&1
 
 test_name="test_mysql_utils"
-script_name="./$test_mysql_utils.sh"
+script_name="$script_dir/$test_mysql_utils.sh"
 
 if [ ! -x "$script_name" ];
 then
   status="ok 1 # skip $test_name test file missing"
 else
   s=""
-  ./test_mysql_utils.sh >> "$log" 2>&1
+  $script_name >> "$log" 2>&1
   if [ "$?" -ne "0" ]; then
     s="not "
   fi

=== modified file 'storage/ndb/src/ndbjtie/test/ndbjtie_unit_tests-t'
--- a/storage/ndb/src/ndbjtie/test/ndbjtie_unit_tests-t	2010-08-11 09:08:02 +0000
+++ b/storage/ndb/src/ndbjtie/test/ndbjtie_unit_tests-t	2010-11-26 11:12:38 +0000
@@ -12,11 +12,10 @@
 # test range
 echo "1..6"
 
-# this script gets invoked from $(top_srcdir)/unittest
-cd ../storage/ndb/src/ndbjtie/test
+script_dir=`dirname $0`
 
 # log file for output from this script
-log="`pwd`/ndbjtie_unit_tests-t.log"
+log="ndbjtie_unit_tests-t.log"
 rm -f "$log"
 touch "$log"
 
@@ -32,9 +31,9 @@ run_test()
 {
     test_name=$1;
     test_counter=`expr $test_counter + 1`
-    script_name="$test_name.sh"
+    script_name="$script_dir/$test_name.sh"
 
-    echo "running test '`pwd`/$script_name':" >> "$log" 2>&1
+    echo "running test '$script_name':" >> "$log" 2>&1
     if [ ! -x "$script_name" ];
     then
       status="ok $test_counter # skip $test_name due to missing test file"

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20101126111238-uauf0134qzht5ym0.bundle
Thread
bzr commit into mysql-5.1-telco-7.1 branch (magnus.blaudd:3997) Magnus Blåudd26 Nov