Difference between revisions of "Eweasel How To"

(Getting eweasel)
(Updated instruction on how to setup eweasel)
Line 2: Line 2:
  
 
==Getting eweasel==
 
==Getting eweasel==
First you need to get the source code of eweasel. It is part of the EiffelStudio SVN repository under trunk/eweasel.
+
First you need to get the source code of eweasel. It is part of the EiffelStudio SVN repository under trunk/eweasel. Let's suppose you have a '''Test''' directory, available, here is what you need to do in this directory:
 +
 
 +
svn co https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/eweasel eweasel
  
 
==Setting up an EiffelStudio delivery for eweasel==
 
==Setting up an EiffelStudio delivery for eweasel==
To make things safer, it is recommended that you duplicate your EiffelStudio delivery for the purpose of testing. It is also recommended that you use the source control system to perform this.
+
To perform testing, you need a modified version of the EiffelStudio delivery, refer to those [[Building_a_delivery|instructions]] for building one.
  
 
==Setting up your environment==
 
==Setting up your environment==
You need to define '''ISE_EIFFEL''', '''ISE_LIBRARY''', '''ISE_PLATFORM''' and '''EWEASEL''' correctly.
+
You need to define the following environment variable:
 
+
* '''ISE_EIFFEL''' should point to your EiffelStudio delivery (made above)
For '''ISE_EIFFEL''', '''ISE_LIBRARY''' and '''ISE_PLATFORM''', the definition is obvious.
+
* '''ISE_LIBRARY''' should point to the same value as '''$ISE_EIFFEL'''
 
+
* '''ISE_PLATFORM''' should be your platform name (e.g. windows, win64, linux-x86, solaris-sparc, etc...). However for .NET, it has to be '''dotnet'''.
For '''EWEASEL''' environment variable:
+
* '''EWEASEL''' should be ''Test/eweasel'' (replace Test by the absolute path to the '''Test''' directory)
EWEASEL=Test/eweasel
+
* '''EWEASEL_OUTPUT''' should be set to a directory location used by the test engine to perform the compilations and keeping any outputs produced by the tests. If not set it will be in '''$EWEASEL/tmp'''.
 
+
Then on Windows only, you need to update your C compiler flags so that it always generates a DOS application (on Windows default is a GUI application) because eweasel needs to redirect the output of the applications to a file.
+
  
For Microsoft, edit the file $ISE_EIFFEL/studio/config/windows/msc/config.eif and modify it so that it specifyies SUBSYSTEM:CONSOLE instead of -SUBSYSTEM:WINDOWS.
+
And you also need to update your '''PATH''' environment variable so it reads:
 +
* On Unix: ''$EWEASEL/spec/$ISE_PLATFORM/bin''
 +
* On Windows: ''$EWEASEL/spec/windows/bin''
  
For Borland, edit the file $ISE_EIFFEL/studio/config/windows/bcb/config.eif and modify it so that it specifyies -ap instead of -aa.
+
===Windows only===
 +
You need to update your C compiler flags so that it always generates a DOS application (on Windows default is a GUI application) because eweasel needs to redirect the output of the applications to a file. It depends on the C compiled instead:
 +
* For Microsoft, edit the file $ISE_EIFFEL/studio/config/windows/msc/config.eif and modify it so that it specifies SUBSYSTEM:CONSOLE instead of -SUBSYSTEM:WINDOWS.
 +
* For Borland, edit the file $ISE_EIFFEL/studio/config/windows/bcb/config.eif and modify it so that it specifies -ap instead of -aa.
  
===.NET===
 
If you specify '''dotnet''' for '''ISE_PLATFORM''' the scripts mentioned in the next section will assume you are compiling for .NET.
 
  
 
==Launching the test==
 
==Launching the test==

Revision as of 14:08, 30 November 2006


Getting eweasel

First you need to get the source code of eweasel. It is part of the EiffelStudio SVN repository under trunk/eweasel. Let's suppose you have a Test directory, available, here is what you need to do in this directory:

svn co https://eiffelsoftware.origo.ethz.ch/svn/es/trunk/eweasel eweasel

Setting up an EiffelStudio delivery for eweasel

To perform testing, you need a modified version of the EiffelStudio delivery, refer to those instructions for building one.

Setting up your environment

You need to define the following environment variable:

  • ISE_EIFFEL should point to your EiffelStudio delivery (made above)
  • ISE_LIBRARY should point to the same value as $ISE_EIFFEL
  • ISE_PLATFORM should be your platform name (e.g. windows, win64, linux-x86, solaris-sparc, etc...). However for .NET, it has to be dotnet.
  • EWEASEL should be Test/eweasel (replace Test by the absolute path to the Test directory)
  • EWEASEL_OUTPUT should be set to a directory location used by the test engine to perform the compilations and keeping any outputs produced by the tests. If not set it will be in $EWEASEL/tmp.

And you also need to update your PATH environment variable so it reads:

  • On Unix: $EWEASEL/spec/$ISE_PLATFORM/bin
  • On Windows: $EWEASEL/spec/windows/bin

Windows only

You need to update your C compiler flags so that it always generates a DOS application (on Windows default is a GUI application) because eweasel needs to redirect the output of the applications to a file. It depends on the C compiled instead:

  • For Microsoft, edit the file $ISE_EIFFEL/studio/config/windows/msc/config.eif and modify it so that it specifies SUBSYSTEM:CONSOLE instead of -SUBSYSTEM:WINDOWS.
  • For Borland, edit the file $ISE_EIFFEL/studio/config/windows/bcb/config.eif and modify it so that it specifies -ap instead of -aa.


Launching the test

In $EWEASEL/bin you will find scripts call run_eweasel, run_eweasel_catalog and run_eweasel_filter (add the .bat extension for Windows) which helps you launch tests.

  • run_eweasel: copy the right `general.cfg' file to your delivery, checkout the latest version of the libraries from the EiffelStudio delivery, precompiles the precompiled libraries needed by eweasel, launch eweasel and store the results in a file.
  • run_eweasel_catalog: run the tests from a specified catalog
  • run_eweasel_filter: run one particular test