Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (1.9 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
	Copy_or_generate_zustre_output_xml_for_reference(
29
		LUS_FILE ${lus_file}
30
		NODE ${NODE_NAME}
31
		OPTS ${ZUSTRE_OPTIONS_OPT}
32
		SRC_DIR ${SRC_DIR}
33
		DST_DIR ${DST_DIR}
34
	)
35
	
36
	Zustre_compile_and_compare_to_reference(
37
		LUS_FILE ${lus_file}
38
		NODE ${NODE_NAME}
39
		TESTS_PREFIX ${TESTS_PREFIX}
40
		OPTS ${ZUSTRE_OPTIONS_OPT}
41
		CALL_ID "1"
42
		SRC_DIR ${SRC_DIR}
43
		DST_DIR ${DST_DIR}
44
	)
45
	if(EXISTS ${CMAKE_BINARY_DIR}/modules/XPathParser_lusi.class 
46
		AND ${ZUSTRE_ANSWER_${L}_${NODE_NAME}} STREQUAL "CEX" 
47
		AND EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${L}/${L}.lusi)
48
		Compare_Zustre_and_Lustrec_outputs(
49
			LUS_FILE ${lus_file}
50
			NODE ${NODE_NAME}
51
			TESTS_PREFIX ${TESTS_PREFIX}
52
			OPTS ${ZUSTRE_OPTIONS_OPT}
53
			CALL_ID "2"
54
			SRC_DIR ${SRC_DIR}
55
			DST_DIR ${DST_DIR}
56
		)
57
	endif()
58
	Lustre_compile_and_compare_to_reference(
59
		LUS_FILE ${lus_file}
60
		NODE ${NODE_NAME}
61
		TESTS_PREFIX ${TESTS_PREFIX}
62
		OPTS ${LUSTRE_OPTIONS_OPT}
63
		CALL_ID "3"
64
		SRC_DIR ${SRC_DIR}
65
		DST_DIR ${DST_DIR}
66
	)
67
	
68
  ENDFOREACH()
69
  add_custom_target(${TESTS_PREFIX} COMMAND ${CMAKE_CTEST_COMMAND} -R ${TESTS_PREFIX})
70
ENDFOREACH()
71

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