~ubuntu-branches/ubuntu/natty/freecell-solver/natty

« back to all changes in this revision

Viewing changes to HACKING

  • Committer: Bazaar Package Importer
  • Author(s): RISKO Gergely
  • Date: 2009-07-15 17:42:19 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090715174219-2rlyyvse0kezacly
Tags: 2.34.0-1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
How to benchmark a Freecell Solver Release:
 
2
-------------------------------------------
 
3
 
 
4
Requirements: perl-5.8.x or above, CMake, gcc, bash and a working 
 
5
pthreads-devel package.
 
6
 
 
7
1. Download the Freecell Solver .tar.bz2 archive from 
 
8
http://fc-solve.berlios.de/.
 
9
 
 
10
2. Unpack and cd to the freecell-solver-* directory.
 
11
 
 
12
3. Run "./Tatzer -l tt".
 
13
 
 
14
4. Type "make" to build everything.
 
15
 
 
16
5. Run "bash scripts/time-threads-num.bash $MAX_NUM_THREADS" . 
 
17
 
 
18
The default for $MAX_NUM_THREADS is 6, where 7 completely hogs my system. If 
 
19
you have many CPUs and/or cores and you are confident that raising it will 
 
20
not overload your system, you may try to raise it.
 
21
 
 
22
Running the benchmarking threads is better done when the computer is not 
 
23
loaded.
 
24
 
 
25
6. Wait.
 
26
 
 
27
7. Type "perl scripts/time-fcs.pl DUMPS/*" and copy-and-paste the results to
 
28
the Freecell Solver developers with specifications of your computer that are 
 
29
as detailed as possible.
 
30
 
 
31
Getting the test suite up and running:
 
32
--------------------------------------
 
33
 
 
34
These are instruction how to get the test suite up and running:
 
35
 
 
36
#. Install the svn client.
 
37
 
 
38
        On Debian: 
 
39
        # apt-get install subversion.
 
40
 
 
41
#. Install cmake (at least version 2.6.3):
 
42
        
 
43
        On Debian:
 
44
        # apt-get install cmake
 
45
        $ cmake --version # Make sure it's 2.6.3.
 
46
 
 
47
#. Install make, gcc and other needed applications:
 
48
 
 
49
        On Debian:
 
50
        # apt-get install make gcc g++
 
51
 
 
52
(g++ is required by CMake even for ANSI C projects for some reason).
 
53
 
 
54
#. Install valgrind
 
55
 
 
56
        On Debian:
 
57
        # apt-get install valgrind
 
58
 
 
59
#. Install perl (at least perl-5.8.9 - perl-5.10.0 or above is recommended).
 
60
 
 
61
#. Install perl's Template Toolkit:
 
62
 
 
63
        # apt-get install libtemplate-perl
 
64
 
 
65
#. Install the libtap ( http://jc.ngo.org.uk/trac-bin/trac.cgi/wiki/LibTap )
 
66
development headers.
 
67
 
 
68
        On Debian:
 
69
        $ tar -xvf /home/shlomif/Desktop/tap-1.01.tar.gz 
 
70
        $ cd tap-1.01
 
71
        $ ./configure --prefix="$HOME/apps/libtap"
 
72
        $ make CFLAGS+=-UHAVE_LIBPTHREAD
 
73
        $ make install
 
74
        # For gcc finding tap.h in the includes
 
75
        $ echo 'export CPATH="$HOME/apps/libtap/include:$CPATH"' >> ~/.bashrc
 
76
        # For CMake to find the TAP library.
 
77
        $ echo 'export CMAKE_PREFIX_PATH="$HOME/apps/libtap:$CMAKE_PREFIX_PATH"' >> ~/.bashrc
 
78
 
 
79
        On Mandriva:
 
80
        # urpmi libtap-devel
 
81
 
 
82
 
 
83
#. Check out the latest Freecell Solver sources:
 
84
 
 
85
        $  svn co https://svn.berlios.de/svnroot/repos/fc-solve/trunk/
 
86
 
 
87
#.
 
88
        $ cd trunk/fc-solve/source/
 
89
 
 
90
#. Configure the Freecell Solver build
 
91
 
 
92
        $ ./Tatzer
 
93
 
 
94
#. Build Freecell Solver:
 
95
 
 
96
        $ make
 
97
 
 
98
#. Install the dependencies of the test suite:
 
99
 
 
100
        - Download local::lib from http://search.cpan.org/dist/local-lib/
 
101
        and follow the instructions to set it up
 
102
        - Restart bash
 
103
        $ export PERL_MM_USE_DEFAULT=1
 
104
        $ perl -Mlocal::lib -MCPAN -e 'install Task::Test::Run::AllPlugins'
 
105
        $ perl -Mlocal::lib -MCPAN -e 'install(qw(String::ShellQuote Test::Differences Games::Solitaire::Verify))'
 
106
        $ perl -Mlocal::lib -MCPAN -e 'install(qw(YAML::XS))'
 
107
 
 
108
#. Set up the Test::Run plugins.
 
109
        $ echo 'export HARNESS_PLUGINS="ColorSummary ColorFileVerdicts AlternateInterpreters"' >> ~/.bashrc
 
110
        $ echo 'export HARNESS_ALT_INTRP_FILE="$HOME/.test-run-alt-intrp.yml"' >> ~/.bashrc
 
111
        - Put the following under $HOME/.test-run-alt-intrp.yml:
 
112
 
 
113
{{{{
 
114
---
 
115
- cmd: unity
 
116
  pattern: \.exe\z
 
117
  type: regex
 
118
}}}}
 
119
 
 
120
        - And put the following script called unity in your path (executable):
 
121
 
 
122
{{{{
 
123
#!/usr/bin/perl
 
124
exec { $ARGV[0] } @ARGV;
 
125
}}}}
 
126
 
 
127
 
 
128
#. Test Freecell Solver:
 
129
 
 
130
        $ export FREECELL_SOLVER_QUIET=1
 
131
        $ export PATH="`pwd`/board_gen:$PATH"
 
132
        $ make test
 
133