Author: rfm
Date: Tue Feb  3 13:49:58 2015
New Revision: 38323

URL: http://svn.gna.org/viewcvs/gnustep?rev=38323&view=rev
Log:
Allow environment of testcases to be set by Env.sh

Modified:
    tools/make/trunk/TestFramework/README
    tools/make/trunk/TestFramework/gnustep-tests.in

Modified: tools/make/trunk/TestFramework/README
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/TestFramework/README?rev=38323&r1=38322&r2=38323&view=diff
==============================================================================
--- tools/make/trunk/TestFramework/README       (original)
+++ tools/make/trunk/TestFramework/README       Tue Feb  3 13:49:58 2015
@@ -336,6 +336,11 @@
 special phrases generated to mark a passed test or a particular type of
 failure.
 
+If an Env.sh script is present in a test directory, then it will be
+sourced immediately before each test in order to allow you to set up
+special environment variables for the test.  This script should produce
+no output.
+
 If a Summary.sh file is present in a test directory and gnustep-tests is
 used to run just those tests in that directory, the shell script will be
 executed in order to provide the summary of the test results.  In all other

Modified: tools/make/trunk/TestFramework/gnustep-tests.in
URL: 
http://svn.gna.org/viewcvs/gnustep/tools/make/trunk/TestFramework/gnustep-tests.in?rev=38323&r1=38322&r2=38323&view=diff
==============================================================================
--- tools/make/trunk/TestFramework/gnustep-tests.in     (original)
+++ tools/make/trunk/TestFramework/gnustep-tests.in     Tue Feb  3 13:49:58 2015
@@ -380,7 +380,14 @@
     echo Running $dir/$TESTFILE...
     # Run it. If it terminates abnormally, mark it as a crash (unless we have
     # a special file to mark it as being expected to abort).
-    $RUN_CMD
+
+    if test -r ./Env.sh
+    then
+      ( . ./Env.sh; $RUN_CMD )
+    else
+      $RUN_CMD
+    fi
+
     if test $? != 0
     then
       if test -r $TESTFILE.abort


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to