Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ else
exit -1
endif
cp -f ${ICE_SCRIPTS}/tests/report_results.csh ${tsdir}
cp -f ${ICE_SCRIPTS}/tests/create_fails.csh ${tsdir}
cp -f ${ICE_SCRIPTS}/tests/poll_queue.csh ${tsdir}

cat >! ${tsdir}/suite.submit << EOF0
Expand Down
4 changes: 2 additions & 2 deletions configuration/scripts/tests/QC/gen_qc_cases.csh
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ endif
# Generate the non-BFB but non-climate-changing case
echo "Generating nonbfb case"
if ($testid != $spval) then
set result = `./cice.setup $options -s qc_nonbfb,long --testid qc_test_$testid | grep 'Test case dir\|already exists'`
set result = `./cice.setup $options -s qcnonbfb,long --testid qc_test_$testid | grep 'Test case dir\|already exists'`
else
set result = `./cice.setup $options -s qc_nonbfb,long --testid qc_test | grep 'Test case dir\|already exists'`
set result = `./cice.setup $options -s qcnonbfb,long --testid qc_test | grep 'Test case dir\|already exists'`
endif
set nonbfb_dir = `echo "$result" | awk '{print$NF}'`
if ($nonbfb_dir == "exists") then
Expand Down
24 changes: 24 additions & 0 deletions configuration/scripts/tests/create_fails.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/csh

echo " "
set tmpfile = create_fails.tmp
set outfile = fails.ts

./results.csh >& /dev/null
cat results.log | grep ' run\| test' | grep -v PASS | cut -f 2 -d " " | sort -u >! $tmpfile

echo "# Test Grid PEs Sets" >! fails.ts
foreach line ( "`cat $tmpfile`" )
#echo $line
set test = `echo $line | cut -d "_" -f 3`
set grid = `echo $line | cut -d "_" -f 4`
set pes = `echo $line | cut -d "_" -f 5`
set opts = `echo $line | cut -d "_" -f 6- | sed 's/_/,/g'`
echo "$test $grid $pes $opts" >> fails.ts
end

rm $tmpfile
echo "$0 done"
echo "Not passed tests written to file...... $outfile"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Failed tests" instead ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed tests isn't quite accurate. Failed != Not passed. But I think you're right on reflection that failed is probably a better word here. I'll change it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

echo "To setup a new test suite, try something like"
echo " ./cice.setup --suite fails.ts ..."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work ? I guess you first have to move fails.ts to configuration/scripts/tests/ in the sandbox ? it this what you mean by "something like" ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right that It wouldn't work exactly as described. You can move fails.ts to the cice.setup directory too. It works from there. But you're right, maybe I'll clarify that a bit. I don't want to get too deep in the weeds though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

8 changes: 4 additions & 4 deletions doc/source/developer_guide/dg_scripts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ it's working properly.

.. _dev_validation:

Code Validation Script
QC Process Validation
----------------------

The code validation (aka QC or quality control) test validates non bit-for-bit model changes. The directory
Expand Down Expand Up @@ -193,9 +193,9 @@ to the ``cice.setup`` script. These options include:
* ``--queue`` : Queue for the batch submission
* ``--testid`` : test ID, user-defined id for testing

The script creates 4 test cases, with testIDs ``qc_base``, ``qc_bfb``, ``qc_nonbfb``,
The script creates 4 test cases, with testIDs ``qc_base``, ``qc_bfb``, ``qc_test``,
and ``qc_fail``. ``qc_base`` is the base test case with the default QC namelist.
``qc_bfb`` is identical to ``qc_base``. ``qc_nonbfb`` is a test that is not bit-for-bit
``qc_bfb`` is identical to ``qc_base``. ``qc_test`` is a test that is not bit-for-bit
when compared to ``qc_base``, but not climate changing. ``qc_fail`` is a test that is not
bit-for-bit and also climate changing.

Expand All @@ -222,7 +222,7 @@ To perform the QC validation, execute the following commands.

# From the CICE base directory
cp configuration/scripts/tests/QC/gen_qc_cases.csh .
cp configuration/scripts/tests/QC/compare_qc_cases.csh
cp configuration/scripts/tests/QC/compare_qc_cases.csh .

# Create the required test cases
./gen_qc_cases.csh -m <machine> --acct <acct>
Expand Down
11 changes: 10 additions & 1 deletion doc/source/user_guide/ug_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@ results.csh script in the testsuite.[testid]::
cd testsuite.[testid]
./results.csh

The script **create_fails.csh** will process the output from results.csh and generate a new
test suite file, **fails.ts**, from the failed tests.
**fails.ts** can then be edited and passed into ``cice.setup --suite fails.ts ...`` to rerun
subsets of failed tests to more efficiently move thru the development, testing, and
validation process. However, a full test suite should be run on the final development
version of the code.

To report the test results, as is required for Pull Requests to be accepted into
the master the CICE Consortium code see :ref:`testreporting`.

Expand Down Expand Up @@ -411,8 +418,10 @@ The *cice.setup** options ``--setup-only``, ``--setup-build``, and ``--setup-bui

which means by default the test suite builds and submits the jobs. By defining other values for those environment variables, users can control the suite script. When using **suite.submit** manually, the string ``true`` (all lowercase) is the only string that will turn on a feature, and both SUITE_RUN and SUITE_SUBMIT cannot be true at the same time.

By leveraging the **cice.setup** command line arguments ``--setup-only``, ``--setup-build``, and ``--setup-build-run`` as well as the environment variables SUITE_BUILD, SUITE_RUN, and SUITE_SUBMIT, users can run **cice.setup** and **suite.submit** in various combinations to quickly setup, setup and build, submit, resubmit, run interactively, or rebuild and resubmit full testsuites quickly and easily. See below for an example.
By leveraging the **cice.setup** command line arguments ``--setup-only``, ``--setup-build``, and ``--setup-build-run`` as well as the environment variables SUITE_BUILD, SUITE_RUN, and SUITE_SUBMIT, users can run **cice.setup** and **suite.submit** in various combinations to quickly setup, setup and build, submit, resubmit, run interactively, or rebuild and resubmit full testsuites quickly and easily. See :ref:`examplesuites` for an example.


.. _examplesuites:

Test Suite Examples
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down