Developers Guide & FAQ
Testing
Here is an overview of the kinds of things we want to test for 1.1.
We have a testing checklist for manual testing. Each test is a list of steps you should take inside the program with a specified result. We need testers to add tests to this list, and then verify that tests are successful.
To get started using the checklist, select the "LiveSupport" product, add your name, and select version "1.1". You can then start using the offical testset for the release. Click "Add test" to add new tests to the release. You can group the tests using categories.
How to run with Valgrind
First install valgrind:
apt-get install valgrind
Then add "valgrind " before $gLiveSupport_exe on the last line of "src/products/gLiveSupport/bin/gLiveSupport_devenv.sh", like so:
valgrind $gLiveSupport_exe -c $config_file
And then you just type 'make run', as usual, and it will run inside valgrind...very, very, very, very slowly
Obtain a stack trace (backtrace) of an executable
To find out what is causing a segmentation fault crash, you have two options.
a. Use core files
Enable the creation of core files:
$ ulimit -c unlimited
you can put this in your .bashrc file to make it the default.
After the program crashed, find the core file and the executable, and open gdb (the Gnu Debugger). For example, for Campcaster Studio, you would type something like this:
$ cd src/products/gLiveSupport $ export LD_LIBRARY_PATH=~/src/campcaster/usr/lib $ gdb tmp/campcaster-studio core.1234
In gdb, type 'bt' to get a stack trace. Type 'help' for other commands; type 'q' to quit.
b. Run the program inside the debugger
You can also run the program inside gdb to obtain a stack trace, or use other debugger functions.
Start the program with these commands:
$ cd src/products/gLiveSupport $ export LD_LIBRARY_PATH=~/src/campcaster/usr/lib $ gdb tmp/campcaster-studio (gdb) run -c ~/.campcaster/campcaster-studio.xml
This will start up Campcaster Studio. If it crashes, it will give you the (gdb) prompt again.
Segmentation fault. (gdb) bt
Just use the 'bt' command and gdb will print out the stack trace, which shows how the program got to the point in which it crashed.
How to delete songs in the storage server
To delete ALL songs
make -C src/modules/storageServer db_clean dir_setup db_init
To delete ONE song
In the HTML UI, Preferences/File list --> click on the title, select Delete
Error Starting Scheduler / Database installation problems
Q: When I try to run the scheduler, I get this error:
paul@ubuntu:~/software/campcaster/campcaster$ make start make -C ./src/products/scheduler start make[1]: Entering directory `/home/paul/software/campcaster/campcaster/src/products/scheduler' ./bin/campcaster-scheduler_devenv.sh start Starting the Campcaster scheduler... using config file '/home/paul/.campcaster/campcaster-scheduler.xml' [GstreamerPlayer] [virtual void LiveSupport::PlaylistExecutor::GstreamerPlayer::configure(const xmlpp::Element&)] error executing command start database installation problem: Failed to connect to datasource: [unixODBC][Driver Manager]Data source name not found, and no default driver specified sleep 2 make[1]: Leaving directory `/home/paul/software/campcaster/campcaster/src/products/scheduler'
A: This could mean your database was not installed correctly. To test the connection to the database, try this (substitute your user name after "Campcaster-"):
paul@ubuntu:~/software/campcaster/campcaster$ isql Campcaster-paul test test [ISQL]ERROR: Could not SQLConnect
The way to fix this is to re-run:
sudo ./bin/user_setup_db.sh --user=paul
from the base Campcaster directory.
Q: When I try to run the scheduler, I get this error:
error executing command start authentication problem: Login method returned fault response: [faultCode:802,faultString:xr_login: login failed - incorrect username or password.]
A: This could mean that the username/password in the configuration file is wrong. Please edit ~/.campcaster/campcaster-scheduler.xml and change the following line:
<user login="scheduler" password="change_me" />
change this to:
<user login="root" password="q" />
How to Uninstall Development Version of Campcaster
Often you need to test whether a fresh install of Campcaster will work. Here's how to start from scratch again:
- Make sure the scheduler is stopped. From the base Campcaster directory:
make stop
- Rename or delete the ~/.campcaster directory.
- drop the database, here's how:
sudo /etc/init.d/postgresql-8.1 restart sudo su postgres dropdb Campcaster-paul (or whatever your username is) dropuser test exit
- Delete the storage server files:
make -C src/modules/storageServer db_clean
How to add users, change passwords, and delete users in Campcaster
There is a script here:
/src/modules/storageServer/var/install/campcaster-user.php
which allows you to do all of these things. For example, if you want to update your 'scheduler' user password:
# php campcaster-user.php --addupdate scheduler my_new_password
To add a user 'foo' with password 'bar':
# php campcaster-user.php --addupdate foo bar
To delete user 'foo':
# php campcaster-user.php --delete foo
Where is a network hub I can connect to for testing purposes?
Look here for information about setting up your network hub.
The parameters you need are:
'archiveUrlPath' => '/campcaster_hub/archiveServer/var',
'archiveXMLRPC' => 'xmlrpc/xrArchive.php',
'archiveUrlHost' => '62.44.9.210',
'archiveUrlPort' => 80,
'archiveAccountLogin' => 'root',
'archiveAccountPass' => 'q',
How do I recompile only the gstreamer audio player?
make -C src/modules/playlistExecutor clean all
