diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-07-16 09:09:01 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-07-16 09:09:01 +0200 |
commit | 2853f6bfbb2f392fa5623b480a2ce112991d2486 (patch) | |
tree | 4b089d92c563d49f563e6cadf4475a65974899a2 /dbug | |
parent | 66a8da067793b717df0d4682357df15cba3c935f (diff) | |
download | mariadb-git-2853f6bfbb2f392fa5623b480a2ce112991d2486.tar.gz |
unit test fixes for ctest
Diffstat (limited to 'dbug')
-rw-r--r-- | dbug/CMakeLists.txt | 7 | ||||
-rwxr-xr-x | dbug/tests-t.pl | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/dbug/CMakeLists.txt b/dbug/CMakeLists.txt index 09b3ed928ab..a408376a37d 100644 --- a/dbug/CMakeLists.txt +++ b/dbug/CMakeLists.txt @@ -45,9 +45,10 @@ IF(NOT WIN32) COMMAND sed -e 's!\\\\!\\\\\\\\!g' <${CMAKE_CURRENT_SOURCE_DIR}/${srcfile} >${file}) ENDFOREACH(file) - ADD_CUSTOM_COMMAND(OUTPUT tests-t DEPENDS tests-t.pl - COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/tests-t.pl tests-t) - ADD_CUSTOM_TARGET(unit ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tests-t) + ADD_CUSTOM_COMMAND(OUTPUT dbug-t DEPENDS tests-t.pl + COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/tests-t.pl dbug-t) + ADD_CUSTOM_TARGET(dbug-t ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dbug-t) + MY_ADD_TEST(dbug) IF(GROFF) ADD_CUSTOM_COMMAND(OUTPUT user.ps diff --git a/dbug/tests-t.pl b/dbug/tests-t.pl index de9ed6f6ab9..9f517ba3efd 100755 --- a/dbug/tests-t.pl +++ b/dbug/tests-t.pl @@ -8,8 +8,9 @@ use Test::More; $exe=$0; +$exe =~ s@[^/]+$@tests@; -die unless $exe =~ s/(tests)-t(\.exe)?$/$1$2 /; +die unless -x $exe; # load tests @tests=(); @@ -28,7 +29,7 @@ plan skip_all => "because dbug is disabled" if system $exe; plan tests => scalar(@tests); for (@tests) { - $t=$exe . shift @$_; + $t=$exe . ' ' . shift @$_; chomp($t); open F, '-|', $t or die "open($t|): $!"; local $"; |