Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / kind_fmcad08 / CMakeLists.txt @ c34a50ff

History | View | Annotate | Download (2.5 KB)

1
cmake_minimum_required(VERSION 2.8.4)
2

    
3

    
4

    
5
set(ZUSTRE_OPTIONS_OPT "--timeout" "60" "--xml" )
6
set(LUSTRE_OPTIONS_OPT "" )
7
set(NODE_NAME  "top")
8
set(MAX_INPUT_VALUE 100)
9

    
10

    
11
#proceed all subdirectories
12
SUBDIRLIST(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR}  "")
13
FOREACH(subdir ${SUBDIRS})
14
  LUSTREFILES(LFILES ${subdir} )
15
  set(TESTS_PREFIX "kind_fmcad08_${subdir}")
16
  set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}")
17
  set(DST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${subdir}")
18
  FOREACH(lus_file ${LFILES})
19
	get_filename_component(L ${lus_file} NAME_WE)
20
	Copy_or_generate_lusi_input_and_output_values_for_reference(
21
		LUS_FILE ${lus_file}
22
		NODE ${NODE_NAME}
23
		OPTS ${LUSTRE_OPTIONS_OPT}
24
		MAX ${MAX_INPUT_VALUE}  	#maximum value for input values.
25
		SRC_DIR ${SRC_DIR}
26
		DST_DIR ${DST_DIR}
27
	)
28
        if(EXISTS ${ZUSTRE_COMPILER})
29
	Copy_or_generate_zustre_output_xml_for_reference(
30
		LUS_FILE ${lus_file}
31
		NODE ${NODE_NAME}
32
		OPTS ${ZUSTRE_OPTIONS_OPT}
33
		SRC_DIR ${SRC_DIR}
34
		DST_DIR ${DST_DIR}
35
	)
36
	
37
	Zustre_compile_and_compare_to_reference(
38
		LUS_FILE ${lus_file}
39
		NODE ${NODE_NAME}
40
		TESTS_PREFIX ${TESTS_PREFIX}
41
		OPTS ${ZUSTRE_OPTIONS_OPT}
42
		CALL_ID "1"
43
		SRC_DIR ${SRC_DIR}
44
		DST_DIR ${DST_DIR}
45
	)
46
	if(EXISTS ${CMAKE_BINARY_DIR}/modules/XPathParser_lusi.class 
47
		AND ${ZUSTRE_ANSWER_${L}_${NODE_NAME}} STREQUAL "CEX" 
48
		AND EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${L}/${L}.lusi)
49
		Compare_Zustre_and_Lustrec_outputs(
50
			LUS_FILE ${lus_file}
51
			NODE ${NODE_NAME}
52
			TESTS_PREFIX ${TESTS_PREFIX}
53
			OPTS ${ZUSTRE_OPTIONS_OPT}
54
			CALL_ID "2"
55
			SRC_DIR ${SRC_DIR}
56
			DST_DIR ${DST_DIR}
57
		)
58
	endif()
59
      endif()
60

    
61
      Lustre_compile_and_compare_to_reference(
62
	LUS_FILE ${lus_file}
63
	NODE ${NODE_NAME}
64
	TESTS_PREFIX ${TESTS_PREFIX}
65
	OPTS ${LUSTRE_OPTIONS_OPT}
66
	CALL_ID "3"
67
	SRC_DIR ${SRC_DIR}
68
	DST_DIR ${DST_DIR}
69
	)
70

    
71
      Lustre_compile_options(
72
	LUS_FILE ${lus_file}
73
	NODE ${NODE_NAME}
74
	TESTS_PREFIX "${TESTS_PREFIX}"
75
	OPTS ${LUSTRE_OPTIONS_OPT} "-emf" 
76
	CALL_ID "4"
77
	SRC_DIR ${SRC_DIR}
78
	DST_DIR ${DST_DIR}
79
	)
80
      
81
      LustreT_MCDC(
82
	LUS_FILE ${lus_file}
83
	NODE ${NODE_NAME}
84
	TESTS_PREFIX "${TESTS_PREFIX}"
85
	OPTS ${LUSTRE_OPTIONS_OPT} 
86
	CALL_ID "5"
87
	SRC_DIR ${SRC_DIR}
88
	DST_DIR ${DST_DIR}
89
	)
90

    
91
      LustreT_Mutants(
92
	LUS_FILE ${lus_file}
93
	NODE ${NODE_NAME}
94
	TESTS_PREFIX "${TESTS_PREFIX}"
95
	OPTS ${LUSTRE_OPTIONS_OPT} 
96
	CALL_ID "5"
97
	SRC_DIR ${SRC_DIR}
98
	DST_DIR ${DST_DIR}
99
	)
100

    
101
	
102
  ENDFOREACH()
103
  add_custom_target(${TESTS_PREFIX} COMMAND ${CMAKE_CTEST_COMMAND} -R ${TESTS_PREFIX})
104
ENDFOREACH()
105

    
106
add_custom_target(kind_fmcad08 COMMAND ${CMAKE_CTEST_COMMAND} -R kind_fmcad08)