This patch adds a check to settings-tester.pl which checks the version of
xulrunner.  If it contains the string 1.18, it considers it "Ok", otherwise
"Error".  It displays the version, either way.  It also records it via the
--gather option in the tarball, for posterity's sake in a file named
xulrunner_version_info.out.  If other versions are okay (1.17?), just let me
know and I'll be happy to update the regex accordingly.

Aaron S. Joyner
Index: Open-ILS/src/support-scripts/settings-tester.pl
===================================================================
--- Open-ILS/src/support-scripts/settings-tester.pl	(revision 10053)
+++ Open-ILS/src/support-scripts/settings-tester.pl	(working copy)
@@ -202,7 +202,18 @@
 	$output .= $result;
 }
 
+print "\nChecking xulrunner version: \n";
+my $version_string = xulrunner_version();
+my $result;
+if ($version_string =~ /1.8/) {
+  $result = "* OK: xulrunner --version: $version_string";
+} else {
+  $result = "* ERROR: xulrunner --version reports unknown version: ";
+  $result .= "$version_string";
+}
+print "$result\n";
 
+
 if ($gather) {
 	get_debug_info( $tmpdir, $log_dir, $conf_dir, $perloutput, $output );
 }
@@ -311,6 +322,15 @@
 	return $results;
 }
 
+sub xulrunner_version {
+  local(*FH, $/);
+  open(FH, "xulrunner --version 2>&1|") or die $!;
+  my $version_string = <FH>;
+  close(FH);
+
+  return $version_string;
+}
+
 sub get_debug_info {
   my $temp_dir = shift; # place we can write files
   my $log = shift; # location of the log directory
@@ -343,6 +363,11 @@
   open(FH, ">", "$oils_debug_dir/xml_test.out") or die $!;
   print FH $config_test;
   close(FH);
+
+  # Get xulruner version info
+  open(FH, ">", "$oils_debug_dir/xulrunner_version_info.out") or die $!;
+  print FH xulrunner_version();
+  close(FH);
   
   # Tar this up - does any system not have tar?
   system("tar czf oils_$oils_time.tar.gz oils_$oils_time");
Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: Aaron S. Joyner <[EMAIL PROTECTED]>


Reply via email to