aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@732e31d2-b375-409b-9bd3-699c3b2c9da5>2007-03-02 03:45:17 +0000
committerschnetter <schnetter@732e31d2-b375-409b-9bd3-699c3b2c9da5>2007-03-02 03:45:17 +0000
commitc93da26c550147a572395d6d349227b9b386e362 (patch)
tree64b8fd53ff1e1eed92a2b8f366857cdc14b85fe5
parentd9f78603f3f75eebc2227c174ca51eae07ddcf42 (diff)
Add a grid scalar to indicate success or failure of the self tests.
Add a test cases running the self test and using this variable as indicator. git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/SlabTest/trunk@10 732e31d2-b375-409b-9bd3-699c3b2c9da5
-rw-r--r--interface.ccl4
-rw-r--r--schedule.ccl2
-rw-r--r--src/slabtest.c6
-rw-r--r--test/slabtest.par22
-rw-r--r--test/slabtest/success.xg2
5 files changed, 35 insertions, 1 deletions
diff --git a/interface.ccl b/interface.ccl
index ac13f1e..4660510 100644
--- a/interface.ccl
+++ b/interface.ccl
@@ -28,3 +28,7 @@ CCTK_REAL a3s TYPE=array DIM=3 SIZE=10,10,10
{
a3x a3y a3z
} "3D grid arrays"
+
+
+
+CCTK_INT success "Indicate a successful test"
diff --git a/schedule.ccl b/schedule.ccl
index 03253a7..7b92a2e 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -1,6 +1,8 @@
# Schedule definitions for thorn SlabTest
# $Header$
+STORAGE: success
+
SCHEDULE SlabTest_Test AT initial
{
LANG: C
diff --git a/src/slabtest.c b/src/slabtest.c
index da2c3d4..e120fcb 100644
--- a/src/slabtest.c
+++ b/src/slabtest.c
@@ -42,7 +42,7 @@ runtest (CCTK_ARGUMENTS,
printf
("Mismatch at [%d,%d,%d]: should be %g, is %g\n",
cctk_lbnd[0] + i, cctk_lbnd[1] + j, cctk_lbnd[2] + k,
- gfz[ind], gfy[ind]);
+ (double) gfz[ind], (double) gfy[ind]);
mismatch = 1;
}
}
@@ -348,4 +348,8 @@ void SlabTest_Test (CCTK_ARGUMENTS)
/* TODO: strides, into array, out of array */
+
+
+
+ * success = 1;
}
diff --git a/test/slabtest.par b/test/slabtest.par
new file mode 100644
index 0000000..ca68d7a
--- /dev/null
+++ b/test/slabtest.par
@@ -0,0 +1,22 @@
+# $Header$
+
+cactus::cctk_itlast = 0
+
+ActiveThorns = "IOUtil"
+
+IO::out_dir = $parfile
+IO::parfile_write = no
+IO::out_fileinfo = "none"
+
+ActiveThorns = "PUGH PUGHSlab"
+
+driver::global_nx = 10
+driver::global_ny = 11
+driver::global_nz = 12
+
+ActiveThorns = "Slab SlabTest"
+
+ActiveThorns = "IOBasic"
+
+IOBasic::outScalar_every = 1
+IOBasic::outScalar_vars = "SlabTest::success"
diff --git a/test/slabtest/success.xg b/test/slabtest/success.xg
new file mode 100644
index 0000000..84eaf46
--- /dev/null
+++ b/test/slabtest/success.xg
@@ -0,0 +1,2 @@
+"success v time
+0.0000000000000 1