[LON-CAPA-cvs] cvs: doc /loncapafiles buildfiles.lpml math_random_check.piml loncom/build Makefile

albertel lon-capa-cvs-allow@mail.lon-capa.org
Mon, 22 Oct 2007 22:05:41 -0000


albertel		Mon Oct 22 18:05:41 2007 EDT

  Added files:                 
    /doc/loncapafiles	math_random_check.piml 

  Modified files:              
    /loncom/build	Makefile 
    /doc/loncapafiles	buildfiles.lpml 
  Log:
  - adding check for Math:Random having correct phrase to seed translator
  
  
Index: loncom/build/Makefile
diff -u loncom/build/Makefile:1.184 loncom/build/Makefile:1.185
--- loncom/build/Makefile:1.184	Sun May 13 07:55:27 2007
+++ loncom/build/Makefile	Mon Oct 22 18:05:33 2007
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 
-# $Id: Makefile,v 1.184 2007/05/13 11:55:27 albertel Exp $
+# $Id: Makefile,v 1.185 2007/10/22 22:05:33 albertel Exp $
 
 # TYPICAL USAGE of this Makefile is primarily for two targets:
 # "make build" and "make install".
@@ -128,6 +128,7 @@
 	@echo "    configuration files for yum and MySQL."
 	@echo "ntpcheck: test to see if ntp is installed and running."
 	@echo "html_parser_check: test functionality of HTML::Parser."
+	@echo "math_random_check: test functionality of Math::Random."
 	@echo "cron_lpmlcheck: remove cron file /etc/cron.d/loncapa.lpml."
 	@echo "chkconfig: test runlevels of httpd and loncontrol."
 	@echo "rpmcheck: test to see if rpms known to confict are installed."
@@ -395,6 +396,11 @@
 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
 	tee -a WARNINGS
 
+math_random_check:
+	cat $(SOURCE)/doc/loncapafiles/math_random_check.piml | \
+	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
+	tee -a WARNINGS
+
 cron_lpmlcheck:
 	cat $(SOURCE)/doc/loncapafiles/cron_lpmlcheck.piml | \
 	perl piml_parse.pl $(CATEGORY) $(DIST) "$(TARGET)" $(LAUNCH) | \
Index: doc/loncapafiles/buildfiles.lpml
diff -u doc/loncapafiles/buildfiles.lpml:1.19 doc/loncapafiles/buildfiles.lpml:1.20
--- doc/loncapafiles/buildfiles.lpml:1.19	Tue Jun 26 15:51:06 2007
+++ doc/loncapafiles/buildfiles.lpml	Mon Oct 22 18:05:41 2007
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- buildfiles.lpml -->
 
-<!-- $Id: buildfiles.lpml,v 1.19 2007/06/26 19:51:06 albertel Exp $ -->
+<!-- $Id: buildfiles.lpml,v 1.20 2007/10/22 22:05:41 albertel Exp $ -->
 
 <!--
 
@@ -181,6 +181,17 @@
   </note>
 </file>
 <file>
+  <source>doc/loncapafiles/math_random_check.piml</source>
+  <target dist='default'>math_random_check.piml</target>
+  <categoryname>system file</categoryname>
+  <description>
+Checks that the Math::Random installation has the correct phrase to 
+seed generator.
+  </description>
+  <note>
+  </note>
+</file>
+<file>
   <source>doc/loncapafiles/logcleanup.piml</source>
   <target dist='default'>logcleanup.piml</target>
   <categoryname>system file</categoryname>

Index: doc/loncapafiles/math_random_check.piml
+++ doc/loncapafiles/math_random_check.piml
<!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
	"http://lpml.sourceforge.net/DTD/piml.dtd">
<!-- ntpcheck.piml -->

<!-- $Id: math_random_check.piml,v 1.1 2007/10/22 22:05:41 albertel Exp $ -->

<!--

This file is part of the LearningOnline Network with CAPA (LON-CAPA).

LON-CAPA is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

LON-CAPA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with LON-CAPA; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

/home/httpd/html/adm/gpl.txt

http://www.lon-capa.org/

-->

<piml>
<targetroot>/</targetroot>
<files>
<file>
<target dist="default">/home/httpd/lonUsers</target>
<perlscript mode="fg">

use strict;
use Math::Random;

my $version = $Math::Random::VERSION;

my $good = "100755189, 832255242";

&random_set_seed_from_phrase('testing the phrase seeding');
my $result = join(', ',&random_get_seed());
if ($result ne $good) {
    print &lt;&lt;"END";
**** ERROR: Math::Random is not working properly.
        You are using version $version. 
        It returned $result rather than $good 
END
}

</perlscript>
</file>
</files>
</piml>