File: verify_install.sh

package info (click to toggle)
python-libtrace 1.6%2Bgit20161027-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,124 kB
  • ctags: 1,357
  • sloc: ansic: 6,890; python: 3,228; makefile: 70; sh: 49
file content (29 lines) | stat: -rwxr-xr-x 545 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

# Copyright (C) 2015 by Habib Naderi, U Auckland

export TZ=Pacific/Auckland

if [ "$1" -eq 2 ] || [ "$1" -eq 3 ]; then
	echo verifying installation for python $1 ...
	cd test
	python$1 run_test.py -d v$1-test-cases/ -t > /tmp/tr
	ret=$?
	if [ "$ret"  -ne  0 ]; then
		echo "verification failed."
	else
		n=`cat /tmp/tr | grep "py:" | grep "Failed" | wc -l`
		if [ "$n" -gt 0 ]; then
			echo $n "test(s) failed."
		else
			echo "installation complete."
		fi
	fi
	cd ..
else
	echo "verification failed for python version "$1"."
fi