Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (2.01 KB)

1
cmake_minimum_required(VERSION 2.8.4)
2

    
3

    
4
set(LUSTRE_OPTIONS_OPT "" )
5
set(MAX_INPUT_VALUE 100)
6

    
7

    
8
#proceed all subdirectories
9
SUBDIRLIST(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR}  "src_")
10
set(DST_DIR "${CMAKE_CURRENT_BINARY_DIR}")
11
FOREACH(subdir ${SUBDIRS})
12
  LUSTREFILES(LFILES ${subdir} )
13
  set(TESTS_PREFIX "Simulink")
14
  set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}")
15
  
16
  FOREACH(lus_file ${LFILES})
17
	get_filename_component(L ${lus_file} NAME_WE)
18
	set(NODE_NAME  "${L}")
19
	Copy_or_generate_lusi_input_and_output_values_for_reference(
20
		LUS_FILE ${lus_file}
21
		NODE ${NODE_NAME}
22
		OPTS ${LUSTRE_OPTIONS_OPT}
23
		MAX ${MAX_INPUT_VALUE}  	#maximum value for input values.
24
		SRC_DIR ${SRC_DIR}
25
		DST_DIR ${DST_DIR}
26
	)
27

    
28
	Lustre_compile_and_compare_to_reference(
29
		LUS_FILE ${lus_file}
30
		NODE ${NODE_NAME}
31
		TESTS_PREFIX ${TESTS_PREFIX}
32
		OPTS ${LUSTRE_OPTIONS_OPT}
33
		CALL_ID "1"
34
		SRC_DIR ${SRC_DIR}
35
		DST_DIR ${DST_DIR}
36
	)
37

    
38
          
39
	Copy_or_generate_lusi_input_and_output_values_for_reference(
40
		LUS_FILE ${lus_file}
41
		NODE ${NODE_NAME}
42
		OPTS ${LUSTRE_OPTIONS_OPT} "-mpfr" "100"
43
		MAX ${MAX_INPUT_VALUE}  	#maximum value for input values.
44
		SRC_DIR ${SRC_DIR}
45
		DST_DIR ${DST_DIR}
46
	)
47

    
48
      Lustre_compile_and_compare_to_reference(
49
	LUS_FILE ${lus_file}
50
	NODE ${NODE_NAME}
51
	TESTS_PREFIX "${TESTS_PREFIX}"
52
	OPTS ${LUSTRE_OPTIONS_OPT} "-mpfr" "100"
53
	CALL_ID "2"
54
	SRC_DIR ${SRC_DIR}
55
	DST_DIR ${DST_DIR}
56
	)
57

    
58
      Lustre_compile_options(
59
	LUS_FILE ${lus_file}
60
	NODE ${NODE_NAME}
61
	TESTS_PREFIX "${TESTS_PREFIX}"
62
	OPTS ${LUSTRE_OPTIONS_OPT} "-emf" 
63
	CALL_ID "3"
64
	SRC_DIR ${SRC_DIR}
65
	DST_DIR ${DST_DIR}
66
	)
67

    
68
      LustreT_MCDC(
69
	LUS_FILE ${lus_file}
70
	NODE ${NODE_NAME}
71
	TESTS_PREFIX "${TESTS_PREFIX}"
72
	OPTS ${LUSTRE_OPTIONS_OPT} 
73
	CALL_ID "4"
74
	SRC_DIR ${SRC_DIR}
75
	DST_DIR ${DST_DIR}
76
	)
77

    
78
      LustreT_Mutants(
79
	LUS_FILE ${lus_file}
80
	NODE ${NODE_NAME}
81
	TESTS_PREFIX "${TESTS_PREFIX}"
82
	OPTS ${LUSTRE_OPTIONS_OPT} 
83
	CALL_ID "5"
84
	SRC_DIR ${SRC_DIR}
85
	DST_DIR ${DST_DIR}
86
	)
87

    
88

    
89
  ENDFOREACH()
90
ENDFOREACH()
91

    
92
add_custom_target(Simulink COMMAND ${CMAKE_CTEST_COMMAND} -R Simulink)
93