[Avida-cvs] [avida-svn] r615 - in development: . consistencytests/Tests consistencytests/Tests/Default consistencytests/Tests/SMT consistencytests/Tests/SMT/Seed_100 consistencytests/Tests/SMT/Seed_101 consistencytests/Tests/SMT/Seed_102 consistencytests/Tests/SMT/Seed_103 consistencytests/Tests/SMT/Seed_104

brysonda@myxo.css.msu.edu brysonda at myxo.css.msu.edu
Fri Apr 14 10:24:47 PDT 2006


Author: brysonda
Date: 2006-04-14 13:24:47 -0400 (Fri, 14 Apr 2006)
New Revision: 615

Added:
   development/consistencytests/Tests/SMT/
   development/consistencytests/Tests/SMT/CMakeLists.txt
   development/consistencytests/Tests/SMT/Seed_100/
   development/consistencytests/Tests/SMT/Seed_100/detail_pop.500.expected_last_line
   development/consistencytests/Tests/SMT/Seed_101/
   development/consistencytests/Tests/SMT/Seed_101/detail_pop.500.expected_last_line
   development/consistencytests/Tests/SMT/Seed_102/
   development/consistencytests/Tests/SMT/Seed_102/detail_pop.500.expected_last_line
   development/consistencytests/Tests/SMT/Seed_103/
   development/consistencytests/Tests/SMT/Seed_103/detail_pop.500.expected_last_line
   development/consistencytests/Tests/SMT/Seed_104/
   development/consistencytests/Tests/SMT/Seed_104/detail_pop.500.expected_last_line
Modified:
   development/CMakeLists.txt
   development/consistencytests/Tests/CMakeLists.txt
   development/consistencytests/Tests/Default/CMakeLists.txt
Log:
Add SMT consistency test.

Modified: development/CMakeLists.txt
===================================================================
--- development/CMakeLists.txt	2006-04-14 13:18:50 UTC (rev 614)
+++ development/CMakeLists.txt	2006-04-14 17:24:47 UTC (rev 615)
@@ -69,7 +69,6 @@
 # PROJECT_BUILD_DIR aren't yet defined).
 
 PROJECT(AVIDA)
-SUBDIRS(source support)
 
 # The following three variables must be after the PROJECT statement, otherwise newer versions of cmake
 # will (correctly) use an empty value of PROJECT_BINARY_DIR, since the project didn't exist yet.
@@ -79,6 +78,7 @@
   "${PROJECT_BINARY_DIR}"
   CACHE PATH
   "Install path prefix, prepended onto install directories."
+  FORCE
 )
 
 # Final software is built directly into the work subdirectory.
@@ -274,3 +274,5 @@
   ${MAIN_BLD_DIR}
   ${LIBRARY_OUTPUT_PATH}
 )
+
+SUBDIRS(source support)

Modified: development/consistencytests/Tests/CMakeLists.txt
===================================================================
--- development/consistencytests/Tests/CMakeLists.txt	2006-04-14 13:18:50 UTC (rev 614)
+++ development/consistencytests/Tests/CMakeLists.txt	2006-04-14 17:24:47 UTC (rev 615)
@@ -1,2 +1,2 @@
-SUBDIRS(Default)
+SUBDIRS(Default SMT)
 #SUBDIRS(Researchers)

Modified: development/consistencytests/Tests/Default/CMakeLists.txt
===================================================================
--- development/consistencytests/Tests/Default/CMakeLists.txt	2006-04-14 13:18:50 UTC (rev 614)
+++ development/consistencytests/Tests/Default/CMakeLists.txt	2006-04-14 17:24:47 UTC (rev 615)
@@ -28,7 +28,7 @@
 SET(EnvironmentFile "${ConfigDir}/environment.cfg")
 SET(StartCreatureFile "${ConfigDir}/organism.default")
 # Command-line arguments passed to Avida.
-SET(AvidaArgs "-c ${GenesisFile} -seed %d -set WORLD_X 40 -set WORLD_Y 40 -set INST_SET ${InstSetFile} -set EVENT_FILE ${EventFile} -set ENVIRONMENT_FILE ${EnvironmentFile} -set START_CREATURE ${StartCreatureFile} -set DATA_DIR ." INTERNAL "Command line arguments for tests")
+SET(AvidaArgs "-c ${GenesisFile} -seed %d -set WORLD_X 40 -set WORLD_Y 40 -set INST_SET ${InstSetFile} -set EVENT_FILE ${EventFile} -set ENVIRONMENT_FILE ${EnvironmentFile} -set START_CREATURE ${StartCreatureFile} -set DATA_DIR .")
 
 #
 # Consistency checks configuration

Added: development/consistencytests/Tests/SMT/CMakeLists.txt
===================================================================
--- development/consistencytests/Tests/SMT/CMakeLists.txt	2006-04-14 13:18:50 UTC (rev 614)
+++ development/consistencytests/Tests/SMT/CMakeLists.txt	2006-04-14 17:24:47 UTC (rev 615)
@@ -0,0 +1,86 @@
+
+# Note :
+#
+# ${CMAKE_CURRENT_SOURCE_DIR} points to the current source directory,
+# i.e., .../Tests/Default/.
+#
+# ${CMAKE_CURRENT_BINARY_DIR} points to the equivalent binary directory,
+# i.e., .../build/Tests/Default/.
+#
+
+SET(TestsName "default")
+
+#
+# Avida configuration
+
+# Number of updates per test
+SET(RunLength "500")
+# Event file generation. events.cfg.in uses the variable RunLength.
+SET(EventFileTemplate "${PROJECT_SOURCE_DIR}/CMakeModules/Templates/events.cfg.in")
+SET(EventFile "${CMAKE_CURRENT_BINARY_DIR}/events.cfg")
+CONFIGURE_FILE(${EventFileTemplate} ${EventFile} IMMEDIATE)
+
+# Where to find default configure files.
+SET(ConfigDir "${AVIDA_BINARY_DIR}/work")
+# Configure files (other than the event file, generated above).
+SET(GenesisFile "${ConfigDir}/avida-smt.cfg")
+SET(InstSetFile "${ConfigDir}/inst_set.smt")
+SET(EnvironmentFile "${ConfigDir}/environment.cfg")
+SET(StartCreatureFile "${ConfigDir}/organism.smt")
+# Command-line arguments passed to Avida.
+SET(AvidaArgs "-c ${GenesisFile} -seed %d -set WORLD_X 40 -set WORLD_Y 40 -set INST_SET ${InstSetFile} -set EVENT_FILE ${EventFile} -set ENVIRONMENT_FILE ${EnvironmentFile} -set START_CREATURE ${StartCreatureFile} -set DATA_DIR .")
+
+#
+# Consistency checks configuration
+#
+SET(TestDirBaseName "Seed")
+
+# This is Python list of Avida random seeds.
+# E.g., "range(100,105)" is equivalent to the Python list "[100,101,102,103,104]".
+# I.e., SET(SeedSet "range(100,105)") is equivalent to SET(SeedSet "[100,101,102,103,104]").
+SET(SeedSet "range(100,105)")
+
+SET(OutputFileName "detail_pop.${RunLength}")
+# Similar to above, except that this tells the testing scripts where to find
+# expected last lines of detail_pop.${RunLength} files,
+# i.e., ${CMAKE_CURRENT_SOURCE_DIR}/Seed_100/detail_pop.500.expected_last_line, and so on.
+SET(ExpectationFileName "detail_pop.${RunLength}.expected_last_line")
+# Avida will be run in, and store output files in,
+# ${CMAKE_CURRENT_BINARY_DIR}/Seed_100, and so on.
+SET(ExpectationFilePathBase "${CMAKE_CURRENT_SOURCE_DIR}/${TestDirBaseName}_")
+SET(RunSubdirPathBase "${CMAKE_CURRENT_BINARY_DIR}/${TestDirBaseName}_")
+
+#
+# This generates the Python script that performs consistency checks.
+# Several of the variables defined above make their ways into the script.
+# See CMake's documentaton of the CONFIGURE_FILE command for details.
+SET(CheckTailsScriptTemplate "${PROJECT_SOURCE_DIR}/CMakeModules/Templates/check_tails.py.in") 
+SET(CheckTailsScript "${CMAKE_CURRENT_BINARY_DIR}/check_tails.py") 
+CONFIGURE_FILE(${CheckTailsScriptTemplate} ${CheckTailsScript} IMMEDIATE)
+
+IF(AVD_CONSISTENCY_TEST_PRIMITIVE)
+  ADD_TEST("Consistency-Check--${TestsName}" "${_PythonExePath}" "${CheckTailsScript}")
+ENDIF(AVD_CONSISTENCY_TEST_PRIMITIVE)
+
+#
+# Generation of expected last lines of detail_pop files.
+#
+SET(GenerateTailsScriptTemplate "${PROJECT_SOURCE_DIR}/CMakeModules/Templates/generate_tails.py.in") 
+SET(GenerateTailsScript "${CMAKE_CURRENT_BINARY_DIR}/generate_tails.py") 
+CONFIGURE_FILE(${GenerateTailsScriptTemplate} ${GenerateTailsScript} IMMEDIATE)
+#
+# To regenerate expected last lines of detail_pop files, use commands like the
+# following :
+#   $ pushd ${CMAKE_CURRENT_BINARY_DIR} # i.e., cd .../build/consistencytests/Tests/Default/
+#   $ python ./generate_tails.py
+#   $ tar cvfz Tests.tgz `find . -name detail_pop.*.expected_last_line`
+#   $ cd ${CMAKE_CURRENT_SOURCE_DIR}
+#   $ tar xvfz ${CMAKE_CURRENT_BINARY_DIR}/Tests.tgz
+#   $ popd
+#
+# I think it's safer to require that these steps be performed by hand in order
+# to reduce the chance of inadvertently clobbering existing consistency-check suites.
+#
+
+# Vim modeline to tell Vim that this is a configuration script.
+# vim: set ft=config:

Added: development/consistencytests/Tests/SMT/Seed_100/detail_pop.500.expected_last_line
===================================================================
--- development/consistencytests/Tests/SMT/Seed_100/detail_pop.500.expected_last_line	2006-04-14 13:18:50 UTC (rev 614)
+++ development/consistencytests/Tests/SMT/Seed_100/detail_pop.500.expected_last_line	2006-04-14 17:24:47 UTC (rev 615)
@@ -0,0 +1 @@
+7314 5606 1 1 1 103 0 0 0 500 -1 10 AcdCpazccccccccccrcccctcccccccccccccqmccccccccocccccccccccccccccmqccccccmpcccvccccccbccccccccArsxctqzab 

Added: development/consistencytests/Tests/SMT/Seed_101/detail_pop.500.expected_last_line
===================================================================
--- development/consistencytests/Tests/SMT/Seed_101/detail_pop.500.expected_last_line	2006-04-14 13:18:50 UTC (rev 614)
+++ development/consistencytests/Tests/SMT/Seed_101/detail_pop.500.expected_last_line	2006-04-14 17:24:47 UTC (rev 615)
@@ -0,0 +1 @@
+7386 402 1 1 1 103 0 0 0 500 -1 6 AcdCpazccGcccccccccccccccccfccccccccccccccccccckccccGccccccccccccccccacccccccccccccccccccccccArsxctqzab 

Added: development/consistencytests/Tests/SMT/Seed_102/detail_pop.500.expected_last_line
===================================================================
--- development/consistencytests/Tests/SMT/Seed_102/detail_pop.500.expected_last_line	2006-04-14 13:18:50 UTC (rev 614)
+++ development/consistencytests/Tests/SMT/Seed_102/detail_pop.500.expected_last_line	2006-04-14 17:24:47 UTC (rev 615)
@@ -0,0 +1 @@
+5753 5206 1 1 1 102 0 0 0 500 -1 8 AcdCpazccccccCcczccxacccccCchcccccccccrccccccccccccccccccccFccccccccGcccccccFccccccccccccfccArsxctqzab 

Added: development/consistencytests/Tests/SMT/Seed_103/detail_pop.500.expected_last_line
===================================================================
--- development/consistencytests/Tests/SMT/Seed_103/detail_pop.500.expected_last_line	2006-04-14 13:18:50 UTC (rev 614)
+++ development/consistencytests/Tests/SMT/Seed_103/detail_pop.500.expected_last_line	2006-04-14 17:24:47 UTC (rev 615)
@@ -0,0 +1 @@
+7376 5211 1 1 1 102 0 0 0 500 -1 6 AcdCpazccccccccccccjcccccccccccccrccccycccccccccccccFcccccccccccccccccccccccccccccccccycccccArsxctqzab 

Added: development/consistencytests/Tests/SMT/Seed_104/detail_pop.500.expected_last_line
===================================================================
--- development/consistencytests/Tests/SMT/Seed_104/detail_pop.500.expected_last_line	2006-04-14 13:18:50 UTC (rev 614)
+++ development/consistencytests/Tests/SMT/Seed_104/detail_pop.500.expected_last_line	2006-04-14 17:24:47 UTC (rev 615)
@@ -0,0 +1 @@
+7448 3523 1 1 1 103 0 0 0 500 -1 5 AcdCpazcccccccccccccccccccccccccccccccccccccDccccccccchccccccccccccccccccEcbcctcccyccccccccccArsxctqzab 




More information about the Avida-cvs mailing list