-
Notifications
You must be signed in to change notification settings - Fork 5
Install Instructions
In this tutorial you can get familiar with the installation and configuration of the SETTE framework. At the moment test execution is only available in Linux because certain tools are bound to Linux. However, other features of SETTE only depends on Java SE 8, so any other OS with a Java 8 environment is suitable.
From the three tools (CATG, jPET, SPF), CATG requires Linux or Cygwin and jPET requires Linux. Thus, evaluating all the three tools at least a Linux-based OS is needed for tool execution. There are several ways to evaluate test generator tools regarding the environment. The following document presents how you can configure a Linux-only or a Windows-Linux environment for development. We used a Windows-Linux architecture used by us.
This solution is simple and clear: use only Linux for development and evaluation. This environment is the best when you would like to quickly set up and try SETTE.
In this environment tools are installed on Linux but this machine is only used for tool execution. The development of SETTE and the code snippets and the other evaluation phases are carried out on the Windows machine. This environment is ideal for you if your host is Windows, but you do not want to experience performance drawbacks during development.
There are several ways to keep your files sync between the two operating systems:
- Share the Linux partition over Samba:
- You can access it from Windows as a Network Drive.
- You can even use a separate (independent) hard disk and format it EXT4/NTFS
- Our experiences has shown that file transfer throughput is greater for shared EXT4 drives in case of typical SETTE files.
- However, the NTFS drive is mountable to Windows if the VM is shut down.
- You can use e.g. FreeFileSync for file synchronization.
- Share the Windows working directory over the network:
- You can access and mount it from Linux using Samba.
- The files are stored at one location, thus no synchronization is needed, however, using this method the evaluation will be a little bit slower.
-
Share the working folder with VMware:- Although this would be the trivial solution, we do not recommend, because SETTE generates many files in a short time span and sometimes the files disappear and you have to re-run the VMware configuration script. This behaviour is not detected by SETTE.
-
Use a cloud service to sync the files:- We recommend to avoid this solution, because SETTE and the tools usually generate a lot of small files in a short time span and this can result in slow sync or even conflicts.
This section describes how to create the virtual machine used for only tool execution. This is based on Ubuntu Server, however, this tutorial applies to the majority of the Debian-based systems and you can also use a desktop edition.
If you are not interested in setting up the development environment and you just want to see SETTE in action, simply install an Ubuntu Desktop and jump to section 3. Set up SETTE.
The generator tools are resource intensive, that's why we recommend to use the following configuration (the SETTE tool itself does not need considerable resources):
- VMware Player 6 or Workstation 10
- CPU: 2 cores
- Memory: 4096 MB RAM
- Network: NAT (192.168.10.0/24)
- Hard drives:
- 8 GB for system
- 10 GB for data (independent and persistent)
You can also install a Desktop edition of any other Linux-based OS, however this tutorial focuses on Debian-based systems.
- Download an image file of the OS
- Mount the image file as a CD/DVD disk to the virtual machine
- Start installation. These are the settings used by us:
- Language: English
- Keyboard: Hungarian
- Location: United Kingdom
- Timezone: Europe/Budapest
- Hostname: sette
- Username/password: sette/sette
- Hard drive: 8 GB, no LVM
- Network settings:
- For DNS servers use your default DNS servers or you can use the Google DNS servers (8.8.8.8 and 8.8.4.4)
- Use your default proxy settings or choose "No proxy"
- Choose "Install security updates automatically"
- Install OpenSSH server and GRUB
- Reboot
Execute the following commands:
sudo –i
apt-get update
apt-get upgrade
apt-get install build-essential
apt-get install linux-headers-`uname –r`
mount /dev/cdrom /media/cdrom
cd /tmp
tar xfvz /media/cdrom/VMwareTools-[…].tar.gz
cd vmware-tools-distrib
./vmware-install.pl
reboot
From now you can work from SSH instead of the VMware GUI.
sudo –i
apt-get install mc
Should I format the partition as EXT4 or NTFS?
With ntfs-3g both NTFS read and write are supported, however, using it on a virtual guest it has performance issues (even if the virtual disk is on a solid-state drive). Only use NTFS if you would like to map the virtual disk on Windows based computers. Otherwise, EXT4 is advised. (Note: there are several EXT4 drivers for Windows, but they can only read from the partition).
sudo -i
fdisk /dev/sdb
# press 'n' (new partition)
# press 'p' (primary)
# press '1' (1st partition)
# press Enter (default first sector)
# press Enter (default last sector)
# press 'w' (write changes)
sudo -i
ext4 /dev/sdb1
mkdir /data
chmod 0777 /data
chown sette /data
chgrp sette /data
mcedit /etc/fstab
# Add this line at the end of /etc/fstab (without the #):
#/dev/sdb1 /data ext4 rw,user,exec 0 0
reboot
sudo -i
ntfs -f /dev/sdb1
mkdir /data
chmod 0777 /data
chown sette /data
chgrp sette /data
mcedit /etc/fstab
# Add this line at the end of /etc/fstab (without the #):
#/dev/sdb1 /data ntfs defaults 0 0
reboot
Please follow these steps to mount the NTFS drive in Windows properly:
- Shut down the virtual machine
- VMware: Map drive
- Format the mapped drive in Windows Explorer, add label "SETTE"
sudo –i
mcedit /etc/fstab
mount -a
# Remove the line for the partition from /etc/fstab
fdisk /dev/sdb
# press 'd' (delete partition)
# press 'w' (write changes)
reboot
# Run the following commands:
sudo –i
apt-get install samba
mcedit /etc/samba/smb.conf
# Find the the section [global] -> Authentication -> uncomment "security = user"
# Add at the end of the file add:
[data]
path = /data
read only = no
browsable = yes
guest ok = false
create mask = 0777
# End of file
# Run the following commands:
smbpasswd -a sette
Password: sette
smbpasswd -e sette
restart smbd
restart nmbd
Now the drive can be mounted in Windows as a network drive (e.g. S:), use sette/sette as credentials
Back up the virtual machine.
You can use your favourite JDK, however, if you would like to use Oracle JDK 8 you should do the following steps (please note that the JAVA_HOME
environment variable should be set properly):
sudo -i
apt-get install python-software-properties
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
apt-get install oracle-java8-set-default
echo "JAVA_HOME=/usr/lib/jvm/java-8-oracle/" >> /etc/environment
Log out and log in to apply the changes.
sudo apt-get install ant mercurial git
If you copy the Mercurial repository from another location or you would like to access as another user, you should add the certain users to Mercurial's trusted user list:
sudo mcedit /etc/mercurial/hgrc
# Add the following lines to the file:
[trusted]
users = root, sette
- You should check out the following repositories from GitHub:
-
sette-tool (required): the source code and dependencies of SETTE and the initializer scripts for the test generator tools (currently CATG, jPET and SPF)
- ./src/ - the sources of SETTE
- ./test-generator-tools – the installers/initializers for the symbolic tools
-
sette-snippets (recommended): our code snippets for evaluation purposes
- ./sette-snippets/ - the code snippets
- ./sette-snippets-external/ - the external library used by the snippets
- sette-results (optional): our evaluation results
-
sette-tool (required): the source code and dependencies of SETTE and the initializer scripts for the test generator tools (currently CATG, jPET and SPF)
- Please keep in mind if you do not checkout the repositories into the same directory, you have to do further modifications to the
sette.properties
file.
If you have some of these tools already set up, simply skip the corresponding section. When editing sette.properties
, you should specify your own tool locations.
- Run the
get-tool.sh
script (located in thesette-tool/test-generator-tools/catg
directory)- The script downloads the v1.03 version of CATG, unpacks it and applies our patch. The patch disables the compilation of CATG tests and makes the tool ready to use for SETTE.
- Get and install yices2 from http://yices.csl.sri.com/
- Download the .tar.gz file for Linux (64-bit)
- Execute the following commands:
tar xfvz yices-[…].tar.gz
cd yices-[…]
sudo ./install-yices
- Run the
get-tool.sh
script (located in thesette-tool/test-generator-tools/jpet
directory)- The script downloads the pet executable.
Symbolic PathFinder is and extension for Java PahFinder (JPF). JPF uses the file ~/.jpf/site.properties
as configuration, so if you have previously installed JPF or SPF, you need to do different steps unless you want to override your previous configuration.
If you have neither JPF nor SPF for your user, please do the following steps (or if you have, you can use another user which does not have JPF configuration and do these steps):
- Run the
get-tool.sh
script (located in thesette-tool/test-generator-tools/spf
directory)- The script checks out the
jpf-core
andjpf-symbc
repositories and configures JPF (the file is located at~/.jpf/site.properties
).
- The script checks out the
- Run the
update-tool.sh
script- The script updates the JPF/SPF repositories.
- Run the
build-tool.sh
script- The script initiates build on the JPF/SPF projects.
If you already have JPF configured on your computer, but no SPF, please do the following steps:
- Checkout SPF from the (http://babelfish.arc.nasa.gov/hg/jpf/jpf-symbc)[Mercurial repository]
- Edit your
~/.jpf/site.properties
configuration file to have both JPF core and SPF enabled:
# JPF site configuration
jpf-core = [path to your jpf-core directory]/jpf-core
jpf-symbc = [path to your jpf-symbc directory]/jpf-symbc
# you might have other JPF components
extensions=\${jpf-core},\${jpf-symbc}
# you might have other active extensions
- Build both JPF and SPF with
ant
- Edit
sette.properties
and set path the toRunJPF.jar
.
If you already have both JPF and SPF configured on your computer you only need to edit the sette.properties
and set path the to RunJPF.jar
.
- sette-snippets:
- Run the
build.sh
script (located in thesette-snippets
directory)
- Run the
- sette-tool:
- Run the
build.sh
script (located in thesette-results
directory) - Rename
sette.sample.properties
tosette.properties
- Open and edit
sette.properties
- The
basedir
property should be changed
- The
- Now SETTE is ready to use
- Run the
- Open Eclipse (any with Java 8 support is eligible)
- Create a workspace
- Note that projects physically outside of the workspace can be added to it
- If you would like run SETTE from Eclipse, your workspace cannot be located in a folder called "sette". We recommend to create the workspace at "[working directory]/workspace" and leave it empty.
- Import and open all the SETTE projects
- Pay attention not to open other projects, like JPF/SPF repositories.
- Clean and Rebuild all