Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit dea03f4

Browse files
author
Tor Didriksen
committed
Cleanup scrips for running unit tests.
1 parent c01fdb4 commit dea03f4

File tree

3 files changed

+5
-42
lines changed

3 files changed

+5
-42
lines changed

unittest/CMakeLists.txt

+2-22
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,8 @@
1313
# along with this program; if not, write to the Free Software
1414
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1515

16-
CONFIGURE_FILE(unit.pl ${CMAKE_CURRENT_BINARY_DIR}/unit.pl COPYONLY)
17-
18-
SET(unittests "")
19-
LIST(APPEND unittests "examples")
20-
LIST(APPEND unittests "mysys")
21-
LIST(APPEND unittests "mytap")
22-
LIST(APPEND unittests "gunit")
23-
LIST(APPEND unittests "../storage")
24-
2516
ADD_CUSTOM_TARGET(
2617
test-unit
27-
COMMAND perl unit.pl run ${unittests}
18+
COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/unit.pl run .
19+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
2820
)
29-
30-
# Create whitespace separated list.
31-
FOREACH(arg ${unittests})
32-
SET(testdirs "${testdirs} ${arg}")
33-
ENDFOREACH()
34-
35-
CONFIGURE_FILE(run-unit-tests.in
36-
${CMAKE_CURRENT_BINARY_DIR}/run-unit-tests @ONLY)
37-
IF(UNIX)
38-
EXECUTE_PROCESS(
39-
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/run-unit-tests)
40-
ENDIF()

unittest/Makefile.am

+3-18
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,11 @@
1515

1616
SUBDIRS = mytap . mysys examples gunit
1717

18-
bin_SCRIPTS= run-unit-tests
19-
2018
EXTRA_DIST = unit.pl
21-
CLEANFILES = unit $(bin_SCRIPTS)
22-
23-
unittests = \
24-
examples \
25-
mysys \
26-
mytap \
27-
gunit \
28-
@mysql_se_unittest_dirs@ @mysql_pg_unittest_dirs@
29-
30-
run-unit-tests: run-unit-tests.in
31-
PWD=`pwd`; \
32-
sed -e 's|@testdirs@|${unittests}|' \
33-
-e 's|@CMAKE_CURRENT_BINARY_DIR@|${PWD}|' < $< > $@
34-
chmod +x $@
19+
CLEANFILES = unit
3520

3621
test:
37-
perl unit.pl run $(unittests)
22+
perl unit.pl run .
3823

3924
test-verbose:
40-
HARNESS_VERBOSE=1 perl unit.pl run $(unittests)
25+
HARNESS_VERBOSE=1 perl unit.pl run .

unittest/run-unit-tests.in

-2
This file was deleted.

0 commit comments

Comments
 (0)