Revision 3628a59e

View differences:

README.md
1
# PeerStreamer-ng
2
PeerStreamer-ng [1] is P2P rel-time streaming platform.
3
It is specifically design for mesh networks and it is meant to be purely decentralized.
4

  
5
## Documentation
6
You can find documentation on usage and development on the official wiki:
7
https://ans.disi.unitn.it/redmine/projects/peerstreamer-ng/wiki
8

  
9
## Compilation
10
You can get the executable by running:
11
``
12
$> make
13
``
14

  
15
To turn on all the debugging features, set the DEBUG environment variable:
16
``
17
$> DEBUG=1 make
18
``
19

  
20
## Test
21
PeerStreamer-ng comes with a unit test suite. It does require valgrind installed to run.
22
In the "test" folder are stored the test files. To run them and check code consistency run:
23
``
24
$> make tests
25
``
26

  
27
## Example
28
You can run a test streaming network by following the example documentation [2]
29

  
30
## References
31
[1] https://ans.disi.unitn.it/redmine/projects/peerstreamer-ng
32
[2] https://ans.disi.unitn.it/redmine/projects/peerstreamer-ng/wiki/Streaming_a_live_camera
Test/run_tests.sh
1 1
#!/bin/bash
2 2

  
3
info() {
4
	echo -e "\E[33m$@\033[0m"
5
}
6

  
7
error() {
8
	echo -e "\E[31m$@\033[0m"
9
}
10

  
11
success() {
12
	echo -e "\E[32m$@\033[0m"
13
}
14

  
3 15
TDIR="$(dirname $0)"
4
for t in $(ls $TDIR/*.test); do
5
	./$t
16
FILES=(`ls $TDIR/*.test`)
17
i=0
18
while [ $i -lt ${#FILES[@]} ]; do
19
	info "Running ${FILES[$i]}"
20
	res=$(${FILES[$i]} 2>&1)
21
	if [ $? -ne 0 ]; then
22
		error "$res"
23
		exit 1
24
	fi
25
	info "Valgrind on ${FILES[$i]}"
26
	res=$(valgrind --leak-check=full ${FILES[$i]} 2>&1 | awk '/ERROR SUMMARY/ {print $4}')
27
	if [ $res -gt 0 ]; then
28
		error "Memory error on ${FILES[$i]}"
29
		error $(valgrind --leak-check=full ${FILES[$i]})
30
		exit 1
31
	fi
32
	success "Test Passed"
33
	i=$((i+1))
6 34
done

Also available in: Unified diff