Project

General

Profile

Revision 2d6a9bb3 regression_tests/lustre_files/success/kind_fmcad08/large/src/CEX/CMakeLists.txt

View differences:

regression_tests/lustre_files/success/kind_fmcad08/large/src/CEX/CMakeLists.txt
1 1
cmake_minimum_required(VERSION 2.8.4)
2

  
2
include(FindUnixCommands)
3 3

  
4 4

  
5 5
if(ZUSTRE_COMPILER)
......
20 20
  FOREACH(lfile ${LFILES})
21 21
	  get_filename_component(L ${lfile} NAME_WE)
22 22
	  set(LUSTRE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${L}")
23
	  file(COPY ${lfile}   DESTINATION  ${LUSTRE_OUTPUT_DIR})
23
	  file(COPY ${lfile}  ${L}.lusi DESTINATION  ${LUSTRE_OUTPUT_DIR})
24 24
	if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${L}.xml)
25 25
		file(COPY ${L}.xml   DESTINATION  ${LUSTRE_OUTPUT_DIR})
26 26
	else()
......
69 69
					OPTS ${ZUSTRE_OPTIONS_OPT})
70 70
	set(ZUS_OPTS_CUT ${ZUSTRE_OPTS_POSTFIX_${L}})
71 71
	
72

  
72
	set(ZUSTRE_ARGS_TEMP "${ZUSTRE_ARGS_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}" "> ${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}.xml")
73
    JOIN("${ZUSTRE_ARGS_TEMP}" " " ZUSTRE_ARGS)
74
    
73 75
	add_test(NAME Kind_fmcad08_large_CEX_COMPIL_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
74
			COMMAND  ${ZUSTRE_COMPILER} ${ZUSTRE_ARGS_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}} 
76
			COMMAND bash -c "${ZUSTRE_COMPILER} ${ZUSTRE_ARGS}"
75 77
			WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}
76 78
	)
77 79
	SET_TESTS_PROPERTIES (  Kind_fmcad08_large_CEX_COMPIL_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
78
			PROPERTIES PASS_REGULAR_EXPRESSION "<Answer>CEX</Answer>"
80
			PROPERTIES FAIL_REGULAR_EXPRESSION "AssertionError;ERROR;Failed"
79 81
					DEPENDS Kind_fmcad08_large_CEX_COMPIL_LUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT})
80
				
82
			
83
			
84
	add_test(NAME Kind_fmcad08_large_CEX_TAIL1_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
85
			COMMAND bash -c "tail -n +8 ${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}.xml > ${L}_tailed1.xml"
86
			WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}
87
			#DEPENDS Kind_fmcad08_large_CEX_COMPIL_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
88
	)
89
	
90
	add_test(NAME Kind_fmcad08_large_CEX_TAIL2_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
91
			COMMAND bash -c "tail -n +8 ${L}.xml > ${L}_tailed2.xml"
92
			WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${L}/
93
	)
94
					
95
	add_test(NAME Kind_fmcad08_large_CEX_DIFF_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
96
			COMMAND bash -c "diff  ${L}_tailed1.xml  ../${L}_tailed2.xml"
97
			WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}
98
	)
99
	SET_TESTS_PROPERTIES ( Kind_fmcad08_large_CEX_DIFF_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
100
	 PROPERTIES REQUIRED_FILES  ${L}_tailed1.xml
101
				DEPENDS Kind_fmcad08_large_CEX_TAIL1_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT} )	
102

  
103
	
104
	if(EXISTS ${CMAKE_BINARY_DIR}/modules/XPathParser_lusi.class)
105
		add_test(NAME Kind_fmcad08_large_CEX_XPathParser_lusi_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
106
			COMMAND ${JAVA_RUNTIME} -cp ${CMAKE_BINARY_DIR}/modules/ XPathParser_lusi ${ZUSTRE_NODE_OPT} ../${L}.lusi ${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}.xml
107
			WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}
108
		)
109
		SET_TESTS_PROPERTIES ( Kind_fmcad08_large_CEX_XPathParser_lusi_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}
110
		 PROPERTIES REQUIRED_FILES  ${CMAKE_CURRENT_BINARY_DIR}/${L}/${L}.lusi 
111
					DEPENDS Kind_fmcad08_large_CEX_COMPIL_ZUSTRE_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT} )	
112
		
113
		set(LUSTRE_NODE_OPT "top")
114
		# First command generate C files from Lustre file
115
		Lustre_Compile(LUS_FILE ${lus_file}
116
						NODE ${LUSTRE_NODE_OPT}
117
						OPTS ""
118
						DIR ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}})
119
						
120
		set(LUS_OPTS_CUT ${LUSTRE_OPTS_POSTFIX_${L}})
121
		add_test(NAME Kind_fmcad08_large_CEX_COMPIL_LUSTRE_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT}
122
				COMMAND  ${LUSTRE_COMPILER} ${LUSTREC_ARGS_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT}} 
123
				WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}
124
		)
125

  
126
		 #********************* make -f ${L}.makefile ***************************
127
		 add_test(NAME Kind_fmcad08_large_CEX_MAKE_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT}
128
				COMMAND  make -f ${L}.makefile
129
				WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}
130
		)
131
		SET_TESTS_PROPERTIES ( Kind_fmcad08_large_CEX_MAKE_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT}
132
		 PROPERTIES DEPENDS Kind_fmcad08_large_CEX_COMPIL_LUSTRE_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT}
133
					REQUIRED_FILES ${L}.makefile
134
					)
135
		 
136
		 #************** execute C binary **********************************
137
		
138
		if (BASH)
139
			add_test(
140
				NAME Kind_fmcad08_large_CEX_BIN_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT} 
141
				COMMAND ${BASH} -c "./${L}_${LUSTRE_NODE_OPT} < input_values > ${L}_${LUSTRE_NODE_OPT}_outputs"
142
				WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}
143
			)
144
			SET_TESTS_PROPERTIES ( Kind_fmcad08_large_CEX_BIN_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT}
145
				PROPERTIES REQUIRED_FILES ${L}_${LUSTRE_NODE_OPT}
146
					DEPENDS Kind_fmcad08_large_CEX_MAKE_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT})
147
		else()
148
			message(FATAL_ERROR "Unknown shell command for ${CMAKE_HOST_SYSTEM_NAME}")
149
		endif()
81 150

  
151
		 #************** execute C binary **********************************
152
		 add_test(NAME Kind_fmcad08_large_CEX_COMPARE_OUTPUTS_OF LUSTREC_ZUSTRE_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT}
153
				COMMAND ${CMAKE_COMMAND} -E compare_files ${L}_${LUSTRE_NODE_OPT}_outputs xml_output_values
154
				WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR_${L}_${ZUSTRE_NODE_OPT}_${ZUS_OPTS_CUT}}
155
		)
156
		SET_TESTS_PROPERTIES ( Kind_fmcad08_large_CEX_COMPARE_OUTPUTS_OF LUSTREC_ZUSTRE_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT}
157
		 PROPERTIES REQUIRED_FILES ${L}_${LUSTRE_NODE_OPT}_outputs
158
					DEPENDS Kind_fmcad08_large_CEX_BIN_${L}_${LUSTRE_NODE_OPT}_${LUS_OPTS_CUT} )
159
		
160
	endif()
161
	
82 162
ENDFOREACH()
83 163

  
84 164

  

Also available in: Unified diff