Project

General

Profile

« Previous | Next » 

Revision 29e431d5

Added by Pierre-Loïc Garoche over 4 years ago

EMF validation

View differences:

regression_tests/modules/strategies.cmake
310 310

  
311 311
  #************** compare **********************************
312 312
  add_test(NAME ${GEN_TESTS_PREFIX}_COMPARE_OUTPUTS_OF_LUSTREC_ZUSTRE_${L}_${GEN_NODE}_${LUS_OPTS_CUT}_${GEN_CALL_ID}
313
    COMMAND diff ${L}_${GEN_NODE}_outputs ZUSTRE_output_values
313
    COMMAND diff -y ${L}_${GEN_NODE}_outputs ZUSTRE_output_values
314 314
    WORKING_DIRECTORY ${ZUSTRE_OUTPUT_DIR}
315 315
    )
316 316
  SET_TESTS_PROPERTIES ( ${GEN_TESTS_PREFIX}_COMPARE_OUTPUTS_OF_LUSTREC_ZUSTRE_${L}_${GEN_NODE}_${LUS_OPTS_CUT}_${GEN_CALL_ID}
......
398 398

  
399 399
  #************** execute C binary **********************************
400 400
  add_test(NAME ${GEN_TESTS_PREFIX}_DIFF_${L}_${GEN_NODE}_${LUS_OPTS_CUT}_${GEN_CALL_ID}
401
    COMMAND diff ${L}_${GEN_NODE}_${LUS_OPTS_CUT}_output_values ../${L}_${GEN_NODE}__output_values 
401
    COMMAND diff -y ${L}_${GEN_NODE}_${LUS_OPTS_CUT}_output_values ../${L}_${GEN_NODE}__output_values 
402 402
    WORKING_DIRECTORY ${LUSTRE_OUTPUT_DIR_${L}_${GEN_NODE}_${LUS_OPTS_CUT}}
403 403
    )
404 404
  SET_TESTS_PROPERTIES ( ${GEN_TESTS_PREFIX}_DIFF_${L}_${GEN_NODE}_${LUS_OPTS_CUT}_${GEN_CALL_ID}
......
411 411

  
412 412

  
413 413

  
414
#******************************sixth strategy, subset of fifth, no execution, just calls to lustrec
415

  
416

  
417
function(Lustre_compile_options)
418
  set(options "")
419
  set(oneValueArgs  NODE LUS_FILE CALL_ID  TESTS_PREFIX SRC_DIR DST_DIR)
420
  set(multiValueArgs  OPTS )
421
  cmake_parse_arguments(GEN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
422

  
423
  get_filename_component(L ${GEN_LUS_FILE} NAME_WE)
424
  # First command generate C files from Lustre file
425
  Lustre_Compile(LUS_FILE ${GEN_LUS_FILE}
426
    NODE ${GEN_NODE}
427
    OPTS ${GEN_OPTS}
428
    DST_DIR ${GEN_DST_DIR}
429
    )
430
  if(GEN_OPTS)
431
    CUT_OPTIONS("${GEN_OPTS}" LUS_OPTS_CUT)
432
  endif()
433

  
434
  add_test(NAME ${GEN_TESTS_PREFIX}_COMPIL_LUSTRE_${L}_${GEN_NODE}_${LUS_OPTS_CUT}_${GEN_CALL_ID}
435
    COMMAND  ${LUSTRE_COMPILER} ${LUSTREC_ARGS_${L}_${GEN_NODE}_${LUS_OPTS_CUT}}
436
    WORKING_DIRECTORY ${LUSTRE_OUTPUT_DIR_${L}_${GEN_NODE}_${LUS_OPTS_CUT}}
437
    )
438

  
439
  #********* EMF Validation
440
  STRING(FIND "${LUS_OPTS_CUT}" "emf" matchres)
441
  IF(${matchres} EQUAL 0)
442
    add_test(
443
      NAME ${GEN_TESTS_PREFIX}_EMF_VALIDATE_${L}_${GEN_NODE}_${LUS_OPTS_CUT}_${GEN_CALL_ID} 
444
      COMMAND ${BASH} -c "cat ./${L}.emf | python -m json.tool"
445
      WORKING_DIRECTORY ${LUSTRE_OUTPUT_DIR_${L}_${GEN_NODE}_${LUS_OPTS_CUT}}
446
      )
447
    SET_TESTS_PROPERTIES ( ${GEN_TESTS_PREFIX}_EMF_VALIDATE_${L}_${GEN_NODE}_${LUS_OPTS_CUT}_${GEN_CALL_ID}
448
      PROPERTIES REQUIRED_FILES ${L}.emf
449
      DEPENDS ${GEN_TESTS_PREFIX}_COMPIL_LUSTRE_${L}_${GEN_NODE}_${LUS_OPTS_CUT}_${GEN_CALL_ID})
450
  endif()
451

  
452
endfunction()
453

  
454

  
455

  
456

  
457

  
414 458

  
415 459

  
416 460

  

Also available in: Unified diff