summaryrefslogtreecommitdiffstats
path: root/test/w3c/run_minimized_test.cmake
blob: 481c0e9185ad2cf7afc28d2415c0ab678baf730b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# minimize SCXML document and run

get_filename_component(TEST_FILE_NAME ${TESTFILE} NAME)

set(ENV{USCXML_MINIMIZE_WAIT_FOR_COMPLETION} "TRUE")
set(ENV{USCXML_MINIMIZE_RETAIN_AS_COMMENTS} "TRUE")

execute_process(COMMAND ${USCXML_TRANSFORM_BIN} -tmin -i ${TESTFILE} -o ${OUTDIR}/${TEST_FILE_NAME}.min.scxml RESULT_VARIABLE CMD_RESULT)
if(CMD_RESULT)
	message(FATAL_ERROR "Error running ${USCXML_TRANSFORM_BIN}")
endif()

execute_process(COMMAND ${USCXML_W3C_TEST_BIN} ${OUTDIR}/${TEST_FILE_NAME}.min.scxml RESULT_VARIABLE CMD_RESULT)
if(CMD_RESULT)
	message(FATAL_ERROR "Error running ${USCXML_W3C_TEST_BIN}")
endif()