<commit_before>*** Settings ***
Library    OperatingSystem
Library    Process
Library    String
Library    XML


*** Variable ***
${ece_repos}            https://svn.ec-earth.org/ecearth3/trunk
#${RERUN_REFORMAT}     TRUE    # (TRUE|FALSE)

# Useful arguments:
# --variable RERUN_REFORMAT:FALSE
# --test 'namelist_SPI.xml'  # To include only this (these) test cases




# Comments can be written like this

# This test suite case file, and the namelists referred to herein,
# is adapted to run on the HPC Krypton

*** Test Cases ***
repository_checkout
    ${handle} =    Run Process    svn        checkout        ${ece_repos}     stdout=stdout_${TEST_NAME}.txt     stderr=stderr_${TEST_NAME}.txt
    Should Be Equal As Integers      ${handle.rc}       0
#    ${root} =    Parse XML        ${namelist_folder}/${TEST_NAME} 
#    ${plot_path} =    Get Element Text             ${root}     GLOBAL/plot_dir    normalize_whitespace=True
#    ${climo_path} =    Get Element Text             ${root}     GLOBAL/climo_dir    normalize_whitespace=True
#    Remove Directory    ${plot_path}    recursively=True
#    ${plot_name}        ${group1} =      Should Match Regexp     ${TEST_NAME}    namelist_(.*).xml
#
#    Run Keyword If    '${RERUN_REFORMAT}' == 'TRUE'    Remove Directory    ${climo_path}    recursively=True
#
#    ${output} =          Run Process     nml/test_suites/smhi/add_scipy_site.bash
#    ${handle} =    Run Process    ./main.py    ${namelist_folder}/${TEST_NAME}     stdout=stdout_${group1}.txt     stderr=stderr_${group1}.txt
#    ${output} =          Run Process     nml/test_suites/smhi/remove_scipy_site.bash
#
#    ${fileSize} =        Get File Size        ${plot_path}/matlab_contour_pr_mmday_T2Ms_CMIP5_EC-EARTH_Amon_historical_r12i1p1_1999-2004.eps
#    ${fileSize_str} =    Convert To String    ${fileSize}
#    Should Match Regexp                       ${fileSize_str}    ^\\d{7}$
#<commit_msg>Working test for updating build-xml file + running ec-conf<commit_after>*** Settings ***
Library    OperatingSystem
Library    Process
Library    String
Library    XML


*** Variable ***
${ece_repos}            https://svn.ec-earth.org/ecearth3/trunk
#${RERUN_REFORMAT}     TRUE    # (TRUE|FALSE)

# Useful arguments:
# --variable RERUN_REFORMAT:FALSE
# --test 'namelist_SPI.xml'  # To include only this (these) test cases


${platform}                  krypton-intel-intelmpi
${ecearth_src_dir}           trunk/sources
${config_build_xml}          ${ecearth_src_dir}/config-build.xml


# Comments can be written like this

# This test suite case file, and the namelists referred to herein,
# is adapted to run on the HPC Krypton

*** Test Cases ***
#repository_checkout
#    ${handle} =       Run Process                    svn             checkout    ${ece_repos}    stdout=stdout_${TEST_NAME}.txt    stderr=stderr_${TEST_NAME}.txt
#                      Should Be Equal As Integers    ${handle.rc}    0

update_makefile_templates
     ${xml_handle} =    Parse XML                      ${config_build_xml}
                        Set Element Text               ${xml_handle}          ${EXECDIR}/${ecearth_src_dir}        xpath=Platform[@name='krypton-intel-intelmpi']/Parameter[@name='ECEARTH_SRC_DIR']/Value
                        Save XML                       ${xml_handle}          ${config_build_xml}
     ${handle} =        Run Process                    util/ec-conf/ec-conf   -p    ${platform}    config-build.xml     cwd=${ecearth_src_dir}    stdout=stdout_${TEST_NAME}.txt       stderr=stderr_${TEST_NAME}.txt
                        Should Be Equal As Integers    ${handle.rc}           0


#compile_oasis
#    ${handle} =       Run Process                       make    -f     TopMakefileOasis3    BUILD_ARCH=ecconf                checkout       ${ece_repos}       stdout=stdout_${TEST_NAME}.txt       stderr=stderr_${TEST_NAME}.txt
#                      Should Be Equal As Integers       ${handle.rc}       0

#    ${plot_path} =    Get Element Text             ${root}     GLOBAL/plot_dir    normalize_whitespace=True
#    ${climo_path} =    Get Element Text             ${root}     GLOBAL/climo_dir    normalize_whitespace=True
#    Remove Directory    ${plot_path}    recursively=True
#    ${plot_name}        ${group1} =      Should Match Regexp     ${TEST_NAME}    namelist_(.*).xml
#
#    Run Keyword If    '${RERUN_REFORMAT}' == 'TRUE'    Remove Directory    ${climo_path}    recursively=True
#
#    ${output} =          Run Process     nml/test_suites/smhi/add_scipy_site.bash
#    ${handle} =    Run Process    ./main.py    ${namelist_folder}/${TEST_NAME}     stdout=stdout_${group1}.txt     stderr=stderr_${group1}.txt
#    ${output} =          Run Process     nml/test_suites/smhi/remove_scipy_site.bash
#
#    ${fileSize} =        Get File Size        ${plot_path}/matlab_contour_pr_mmday_T2Ms_CMIP5_EC-EARTH_Amon_historical_r12i1p1_1999-2004.eps
#    ${fileSize_str} =    Convert To String    ${fileSize}
#    Should Match Regexp                       ${fileSize_str}    ^\\d{7}$
#
{'fraction_non_alphanumeric': 0.11133200795228629, 'fraction_numerical': 0.008548707753479125, 'mean_word_length': 2.2968545216251637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 13}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '68212', 'n_tokens_mistral': 1659, 'n_tokens_neox': 1561, 'n_words': 340}