Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto validate qc #167

Merged
merged 10 commits into from
Oct 5, 2018
Prev Previous commit
Next Next commit
Add a new testid option (not required) to the gen_qc_cases script. Mo…
…difications to check to ensure that each case is generated without error.
  • Loading branch information
turner committed Oct 5, 2018
commit ef23ee09be8d00bc84b0030a1e3948ed838f0d83
52 changes: 48 additions & 4 deletions configuration/scripts/tests/QC/gen_qc_cases.csh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set grid = ${spval}
set pesx = ${spval}
set queue = ${spval}
set acct = ${spval}
set testid = ${spval}

if ($#argv < 1) then
set helpheader = 1
Expand Down Expand Up @@ -54,6 +55,7 @@ DESCRIPTION
--acct : account number for the batch submission
--grid, -g : grid, grid
--queue : queue for the batch submission
--testid : test ID, user-defined id for testing

EXAMPLES
gen_qc_cases.csh -m conrad -e intel -p 8x4
Expand Down Expand Up @@ -108,6 +110,8 @@ while (1)
set pesx = $argv[1]
else if ("$option" == "--acct") then
set acct = $argv[1]
else if ("$option" == "--testid") then
set testid = $argv[1]
else
echo "${0}: ERROR unknown option $option, use -h for help"
exit -1
Expand Down Expand Up @@ -150,19 +154,59 @@ endif

# Generate the base case
echo "Generating base case"
set base_dir = `./cice.setup $options -s qc,long --testid qc_base | grep 'Test case dir' | awk '{print$NF}'`
if ($testid != $spval) then
set result = `./cice.setup $options -s qc,long --testid qc_base_$testid | grep 'Test case dir\|already exists'`
else
set result = `./cice.setup $options -s qc,long --testid qc_base | grep 'Test case dir\|already exists'`
endif
set base_dir = `echo "$result" | awk '{print$NF}'`
if ($base_dir == "exists") then
# Case already exists. Exit
echo "$result"
exit -1
endif

# Generate the BFB case
echo "Generating bfb case"
set bfb_dir = `./cice.setup $options -s qc,long --testid qc_bfb | grep 'Test case dir' | awk '{print$NF}'`
if ($testid != $spval) then
set result = `./cice.setup $options -s qc,long --testid qc_bfb_$testid | grep 'Test case dir\|already exists'`
else
set result = `./cice.setup $options -s qc,long --testid qc_bfb | grep 'Test case dir\|already exists'`
endif
set bfb_dir = `echo "$result" | awk '{print$NF}'`
if ($bfb_dir == "exists") then
# Case already exists. Exit
echo "$result"
exit -1
endif

# Generate the non-BFB but non-climate-changing case
echo "Generating nonbfb case"
set nonbfb_dir = `./cice.setup $options -s qc_nonbfb,long --testid qc_test | grep 'Test case dir' | awk '{print$NF}'`
if ($testid != $spval) then
set result = `./cice.setup $options -s qc_nonbfb,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'`
endif
set nonbfb_dir = `echo "$result" | awk '{print$NF}'`
if ($nonbfb_dir == "exists") then
# Case already exists. Exit
echo "$result"
exit -1
endif

# Generate the non-BFB and climate changing case
echo "Generating fail case"
set fail_dir = `./cice.setup $options -s alt02,qc,long --testid qc_fail | grep 'Test case dir' | awk '{print$NF}'`
if ($testid != $spval) then
set result = `./cice.setup $options -s alt02,qc,long --testid qc_fail_$testid | grep 'Test case dir\|already exists'`
else
set result = `./cice.setup $options -s alt02,qc,long --testid qc_fail | grep 'Test case dir\|already exists'`
endif
set fail_dir = `echo "$result" | awk '{print$NF}'`
if ($fail_dir == "exists") then
# Case already exists. Exit
echo "$result"
exit -1
endif

#------------------------------------------------------------
# Print case directories to file
Expand Down