blob: a9b387d7300b849f1d63befc0e3d267a2f2aa31e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Run this script via "cmake -P RunAllModuletests.cmake" to
# execute all module tests in one go.
# Run this script with "cmake -DMODULE=foo -P RunAllModuletests.cmake" to
# test only the one specified module.
# To see only the results and not the other cmake output,
# you can grep for "::".
# To have it delete the previous test build dirs, run it with -DCLEAN_DIRS=TRUE
get_filename_component(currentDir "${CMAKE_CURRENT_LIST_FILE}" PATH)
function(execute_one_test name)
set(workingDir "${currentDir}/${name}/build")
if(CLEAN_DIRS)
file(REMOVE_RECURSE "${workingDir}")
endif()
file(MAKE_DIRECTORY "${workingDir}")
execute_process(COMMAND ${CMAKE_COMMAND} "${currentDir}/${name}"
WORKING_DIRECTORY "${workingDir}")
# now the same with pkg-config disabled
set(workingDir "${currentDir}/${name}/build-no-pkgconfig")
if(CLEAN_DIRS)
file(REMOVE_RECURSE "${workingDir}")
endif()
file(MAKE_DIRECTORY "${workingDir}")
execute_process(COMMAND ${CMAKE_COMMAND} -DPKG_CONFIG_EXECUTABLE=echo "${currentDir}/${name}"
WORKING_DIRECTORY "${workingDir}")
endfunction(execute_one_test)
if(DEFINED MODULE)
set(modulesToTest ${MODULE})
else()
set(modulesToTest AGG
Blitz
BlueZ
ENCHANT
Eigen2
FFmpeg
Flac
Flex
GObject
GStreamer
LCMS
LibArt
LibXslt
OpenEXR
PCRE
QCA2
QImageBlitz
Sqlite
Strigi
USB
Xine
Xmms)
endif()
foreach(currentModule ${modulesToTest})
execute_one_test(${currentModule})
endforeach(currentModule ${modulesToTest})
|