[asterisk-dev] testing dahdi/zaptel vs. git kernel tree (take 3)

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Jun 28 18:53:44 CDT 2008


Hi

I commited today to DAHDI and Zaptel 1.4 a script for test-building vs.
various kernel version using a single git repository.

The script, build_tools/builder (any better name) uses a different
script (build_tools/test_kernel_git , any better name?) to actually
build.

I wrote a script to test building zaptel vs. various kernel versions.

That script could be found in zaptel 1.4 svn:
http://svn.digium.com/svn/zaptel/branches/1.4/build_tools/test_kernel_git

Usage:

1. Initial setup:

  build_tools/builder init

Creates the logs directory and an empty sqlite database for the results.

  build_tools/test_kernel_git checkout /full/path/to/kernel/dir

This will get an up-to-date kernel tree to
/full/path/to/kernel/dir/linux-2.6 .

It took here around 15 minutes.

2. Running a test:
 
  build_tools/builder build

To use the pre-set list of kernel versions, or:

  build_tools/builder build 2.6.18 2.6.24 2.6.25

to build for those specific kernel versions. The list of available
kernel versions (that is: tags in the git repository, with the leading
'v' removed), use: 'build_tools/test_kernel_git versions' .

3. The results:

The results are written to an sqlite database at logs/builds.db . To
look at them you can use the provided 'report' command:

  build_tools/builder report

See the help message for some possible filters. Or you can write your
own quiry:

  echo 'select * from results where kvers = "2.6.24"; | sqlite3 logs/builds.db

Each result record also includes the name of the log file for the build.

Both builder and test_kernel_git read the configu file
build_tools/git_test.conf . This is the place to locally ovferride some
settings from the script (e.g: SQLITE and KERNELS_localhost).



Now a few words about using test_kernel_git directly:

As with builder, the script requires an extra command. Its usage
message:

test_kernel_git: test building DAHDI vs. kernel from git
Usage:
  test_kernel_git checkout <kerneldir>  Pull a kernel version into <kerneldir>
  test_kernel_git update                Update (pull) the kernel tree.
  test_kernel_git setver <kernel_ver>   Set the kernel version
  test_kernel_git versions              Print available versions
  test_kernel_git version               Print current (kernel) version
  test_kernel_git version_driver        Print the version of DAHDI
  test_kernel_git build                 Test-build
  test_kernel_git git <git command>     Run <git command>

The commands checkout and setver take an extra parameter each. In order 
to remember that parameter, they each edit build_tools/git_test.conf in 
the end.

'setver' checks out a different tag (version) within the git repository,
runs 'make distclean' and 'make modules_prepare' to have a tree usable
for building modules against.

Then you can use 'build' to run 'make' with that specific kernel tree
(with KVERS and KSRC set). You can also pass optional parameters to the
build command, and those will be passed as-is to make (e.g: to run 'make
clean').


The scripts are included in Zaptel as well because I got them working
there first, and because I see build problems that need to be tested in
Zaptel as well.

  http://bugs.digium.com/12944
  http://bugs.digium.com/12945

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list