- Copy original version of the program from
versions.alt/versions.orig/vK
tosource
. - Compile original code by executing
make build
in thesource
directory. - Execute test suite against original version of the object, saving the results to
outputs
for future reference. - Clear the contents of the
source
directory. - Copy the appropriate seeded version of the program from
versions.alt/versions.seeded/vK
tosource
. - Inject the desired fault(s) in the program by removing the appropriate comment markers in
source/FaultSeeds.h
. - Compile the program by calling
make build
in thesource
directory. - Execute the test suite against the faulty program and compare the outputs against the oracle outputs saved in
outputs.alt
.
Thanks to: http://sir.unl.edu/content/mts-usage.php
# example of using mts:
# mts <object-dir> <object-exe> <universe-file> <script-type> <script-name> <program-suffix> <compare-dir>
#
# go to the scripts/ directory of the program
mts .. ../source/grep.exe ../testplans.alt/universe R test.sh NULL NULL
cd grep
# copy original program to source directory
cp -r versions.alt/versions.orig/v1/* source
# build original program
(cd source; make build)
# generate expected test case outputs, then move them to outputs.alt
(cd scripts; mts .. ../source/grep ../testplans.alt/v1/v0_2.tsl.universe R test.sh NULL NULL; ./test.sh)
mv outputs/* outputs.alt
# copy faulty program to source directory
rm -rf source/*
cp -r versions.alt/versions.seeded/v1/* source
# inject the desired fault by uncommenting it in source/FaultSeeds.h
# should be able to automate using sed
sed ....
# build faulty program
(cd source; make build)
# build the test script for the faulty program (compares outputs)
rm -f scripts/test.sh
(cd scripts; mts .. ../source/grep ../testplans.alt/v1/v0_2.tsl.universe D test.sh NULL ../outputs.alt)
# Find out which test cases were failed...
(cd scripts; ./test.sh)
@ChrisTimperley Sir, can you kindly guide me how can I install mts in linux mint?