[LON-CAPA-cvs] cvs: loncom /build/weblayer_test test_weblayer.pl

harris41 lon-capa-cvs@mail.lon-capa.org
Sat, 11 May 2002 21:20:15 -0000


harris41		Sat May 11 17:20:15 2002 EDT

  Modified files:              
    /loncom/build/weblayer_test	test_weblayer.pl 
  Log:
  reading loncapa.conf (not using LONCAPA::Configuration::read_conf
  because test scripts, in this case, should have low amounts of
  software dependencies
  BUG 129
  
  
Index: loncom/build/weblayer_test/test_weblayer.pl
diff -u loncom/build/weblayer_test/test_weblayer.pl:1.2 loncom/build/weblayer_test/test_weblayer.pl:1.3
--- loncom/build/weblayer_test/test_weblayer.pl:1.2	Wed May  8 14:47:31 2002
+++ loncom/build/weblayer_test/test_weblayer.pl	Sat May 11 17:20:15 2002
@@ -11,7 +11,7 @@
 # The LearningOnline Network
 # test_weblayer.pl - Test the web layer
 #
-# $Id: test_weblayer.pl,v 1.2 2002/05/08 18:47:31 harris41 Exp $
+# $Id: test_weblayer.pl,v 1.3 2002/05/11 21:20:15 harris41 Exp $
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
 #
@@ -34,7 +34,7 @@
 # http://www.lon-capa.org/
 #
 # YEAR=2002
-# 3/4 Scott Harrison
+# 3/4,5/8,5/11 Scott Harrison
 #
 ###
 
@@ -56,7 +56,16 @@
 my %perlvar;
 open (CONFIG,"/etc/httpd/conf/access.conf") || die "Can't read access.conf";
 while ($configline=<CONFIG>) {
-    if ($configline =~ /PerlSetVar/) {
+    if ($configline =~ /^[^\#]*PerlSetVar/) {
+	my ($dummy,$varname,$varvalue)=split(/\s+/,$configline);
+        chomp($varvalue);
+        $perlvar{$varname}=$varvalue;
+    }
+}
+close(CONFIG);
+open (CONFIG,"/etc/httpd/conf/loncapa.conf") || die "Can't read loncapa.conf";
+while ($configline=<CONFIG>) {
+    if ($configline =~ /^[^\#]*PerlSetVar/) {
 	my ($dummy,$varname,$varvalue)=split(/\s+/,$configline);
         chomp($varvalue);
         $perlvar{$varname}=$varvalue;