Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / automata / with_properties / CMakeLists.txt @ 5600dad4

History | View | Annotate | Download (1.73 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

    
12

    
13
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
	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

    
70

    
71
add_custom_target(automata_with_properties COMMAND ${CMAKE_CTEST_COMMAND} -R automata_with_properties)