Project

General

Profile

Download (1.79 KB) Statistics
| Branch: | Tag: | Revision:
1 02d89bbb bourbouh
cmake_minimum_required(VERSION 2.8.4)
2
3
4
5
set(ZUSTRE_OPTIONS_OPT "--timeout" "60" "--xml" )
6 5600dad4 bourbouh
set(LUSTRE_OPTIONS_OPT "" )
7
set(NODE_NAME  "top")
8
set(MAX_INPUT_VALUE 100)
9 02d89bbb bourbouh
10
11
12
13 5600dad4 bourbouh
set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
14
set(DST_DIR "${CMAKE_CURRENT_BINARY_DIR}")
15
set(subdir ${CMAKE_CURRENT_SOURCE_DIR})
16
LUSTREFILES(LFILES ${subdir} )
17
set(TESTS_PREFIX "automata_with_properties")
18
FOREACH(lus_file ${LFILES})
19 02d89bbb bourbouh
	get_filename_component(L ${lus_file} NAME_WE)
20 5600dad4 bourbouh
	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 02d89bbb bourbouh
	)
28 7a4e6825 ploc
        if(EXISTS ${ZUSTRE_COMPILER})
29 5600dad4 bourbouh
	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 02d89bbb bourbouh
	)
36 5600dad4 bourbouh
	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 7a4e6825 ploc
		)
45 5600dad4 bourbouh
	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 02d89bbb bourbouh
		)
57 5600dad4 bourbouh
	endif()
58 7a4e6825 ploc
      endif()
59
      Lustre_compile_and_compare_to_reference(
60 5600dad4 bourbouh
		LUS_FILE ${lus_file}
61
		NODE ${NODE_NAME}
62
		TESTS_PREFIX ${TESTS_PREFIX}
63
		OPTS ${LUSTRE_OPTIONS_OPT}
64
		CALL_ID "3"
65
		SRC_DIR ${SRC_DIR}
66
		DST_DIR ${DST_DIR}
67
	)
68 02d89bbb bourbouh
69 5600dad4 bourbouh
ENDFOREACH()
70 02d89bbb bourbouh
71
72
add_custom_target(automata_with_properties COMMAND ${CMAKE_CTEST_COMMAND} -R automata_with_properties)