Search This Blog

Monday, 24 September 2012

MD5 check

To check download integrity it is useful to to a md5sum check where this number is provided:
md5sum -c #md5_file#
The md5_file defines one check on each line:
#md5_checksum# #filename#

Compile boost from source


  1. Start the Visual Studio prompt.
  2. Navigate to you boost folder.
  3. Run bootstrap.bat to build b2
  4. To build 32-bit libs for VS2010 run:
    b2 --toolset=msvc-10.0 --build-type=complete stage

Saturday, 12 May 2012

Cheap svn server

It is useful to know that the Synology low-cost NAS can be configured as svn server. I have done the installation with DS210j which has 128MB RAM. There is a nice step-by-step guide which one can follow to install svn and also websvn. The following steps will hopefully help that you can do it faster than myself:
  1. Check on this site what CPU your NAS has.
  2. Get the correct version of ipkg and install it via bootstrap.
  3. Install svn via ipkg.
  4. Create a directory where you want to put your repos.
  5. Create a test repository.(/opt/bin/svnadmin)
  6. Set up the web access in /volume1/svn/test/conf/svnserver.conf
Additionally I installed websvn:
  1. Download the latest version.
  2. Follow the instructions from the included INSTALL.TXT.
  3. To access svn through http you need to grant php the permission to the svn repos. Add them to open_basedir  in the file /usr/syno/etc/php/user-settings.ini
  4.  Restart Apache with /usr/syno/etc/rc.d/S97apache-user.sh restart

Tuesday, 31 January 2012

Classification of software tests

The classification presented here can be found in many publications on software testing. The ones I consulted were B. Beizer, "Black-Box Testing" (1995) and R. V. Binder, "Testing Object-Oriented Systems" (2000). To have productive discussions about testing with your colleagues it is important to have a clear common understanding of the following concepts.

Dirty test (fault-directed):
We try to break the software by doing a falsification, i.e. to demonstrate that the software does not meet requirements.

Clean test (conformance-directed):
Doing a validation, i.e. to show that requirements are met.

Unit testing:
Testing classes or other "small" units. Called and calling components are either assumed to work correctly or replaced by stubs or mocks. This tests should execute very fast and are done by the programmer.

Integration testing:
Testing the interaction and consistency of  units A and B which are aggregated in a new component C.
We assume that the components A and B passed already successfully unit and integration testing.
The scope is a subsystem of software and hardware units which are physically dependent or are required to cooperate.


System testing:
Testing system behaviour that can not be done by unit or integration testing. Examples: performance, reliability. It focuses on capabilities that are present only in the entire system.




Tuesday, 24 January 2012

Code Coverage with gcc

Gcov is code coverage tool from the gnu compiler suite.

To use gcov we have to set the following compiler and linker flags (CMAKE):

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
set(CMAKE_EXE_LINKER_FLAGS="-fprofile-arcs -ftest-coverage")

After compiling you have to run the program and then call:
gcov sourcex.cpp.o
This creates a logfile called sourcefile.gcov.

Create HTML files of the coverage data:
lcov --directory . --capture --output-file app.info

Generate a HTML view:
genhtml app.info