[rkward-cvs] SF.net SVN: rkward:[2559] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Jun 30 19:26:34 UTC 2009


Revision: 2559
          http://rkward.svn.sourceforge.net/rkward/?rev=2559&view=rev
Author:   tfry
Date:     2009-06-30 19:26:33 +0000 (Tue, 30 Jun 2009)

Log Message:
-----------
Small adjustments to make the tests pass on windows

Modified Paths:
--------------
    trunk/rkward/rkward/plugin/rkcomponentmap.cpp
    trunk/rkward/rkward/scriptbackends/phpbackend.cpp
    trunk/rkward/tests/test_framework.R

Modified: trunk/rkward/rkward/plugin/rkcomponentmap.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentmap.cpp	2009-06-30 13:48:09 UTC (rev 2558)
+++ trunk/rkward/rkward/plugin/rkcomponentmap.cpp	2009-06-30 19:26:33 UTC (rev 2559)
@@ -267,8 +267,14 @@
 
 	// Auto-Submit
 	if (submit_mode != ManualSubmit) {
+#ifndef Q_OS_WIN
 		// if the plugin takes longer than 5 seconds to settle, than that really is sort of buggy...
 		bool submit_ok = component->submit (5000, in_chain);
+#else
+#warning Temporary workaround. Remove this.
+		// (yet on windows, the PHP backend is *real* slow. We give it a bit longer as long as we still use it...
+		bool submit_ok = component->submit (50000, in_chain);
+#endif
 		if (submit_ok || (submit_mode == AutoSubmitOrFail)) component->close ();
 		if (!submit_ok) {
 			_message.append (i18n ("\nThe plugin could not be auto-submitted with these settings."));

Modified: trunk/rkward/rkward/scriptbackends/phpbackend.cpp
===================================================================
--- trunk/rkward/rkward/scriptbackends/phpbackend.cpp	2009-06-30 13:48:09 UTC (rev 2558)
+++ trunk/rkward/rkward/scriptbackends/phpbackend.cpp	2009-06-30 19:26:33 UTC (rev 2559)
@@ -186,7 +186,11 @@
 		if (request == "requesting code") {
 			startup_done = true;
 			RK_DO (qDebug ("got type: %d, stack %d", current_type, command_stack.count ()), PHP, DL_DEBUG);
+#ifdef Q_OS_WIN
+			commandFinished (_output.replace ("\r\n", "\n"));
+#else
 			commandFinished (_output);
+#endif
 			_output = QString::null;
 		} else if (request.startsWith ("requesting data:")) {
 			QString requested_object = request.remove ("requesting data:");

Modified: trunk/rkward/tests/test_framework.R
===================================================================
--- trunk/rkward/tests/test_framework.R	2009-06-30 13:48:09 UTC (rev 2558)
+++ trunk/rkward/tests/test_framework.R	2009-06-30 19:26:33 UTC (rev 2559)
@@ -84,7 +84,7 @@
 		if (!file.exists (standard_file)) return ("match (empty)")
 	}
 
-	output.diff <- system(paste("diff", shQuote(file), shQuote(standard_file), "2>&1"), intern=TRUE)
+	output.diff <- system(paste("diff", shQuote(file), shQuote(standard_file), "--strip-trailing-cr", "--new-file"), intern=TRUE)
 	if (!length (output.diff)) return ("match")
 	if ((length (output.diff) == 1) && (!nzchar (output.diff))) return ("match")
 
@@ -262,4 +262,4 @@
 
 # Make sure i18n does not get in the way
 invisible (Sys.setenv (LANGUAGE="C"))
-invisible (Sys.setlocale ("LC_MESSAGES", "C"))
+if (.Platform$OS.type == "unix") invisible (Sys.setlocale ("LC_MESSAGES", "C"))


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list