libtabula

Check-in [658e65369f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added total unit test count to dtest report, so you can tell whether its report that 16 tests ran successfully is the same thing as complete success.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 658e65369f873cdf4a886d4e44e301d8122d72eb
User & Date: etr 2014-09-16 20:43:43
Context
2014-09-17
04:07
First rough cut at replacing all the Bakefile commentary in the MD files with CMake equivalents. check-in: d901ae7664 user: etr tags: trunk
2014-09-16
20:43
Added total unit test count to dtest report, so you can tell whether its report that 16 tests ran successfully is the same thing as complete success. check-in: 658e65369f user: etr tags: trunk
20:30
Replaced file(COPY) in examples/CMakeLists.txt with a read-then-write pair. CMake 2.6 doesn't have COPY. check-in: f11edacb18 user: etr tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to dtest.

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
30
31
32
33
34
35
#!/bin/bash

BASE="$(dirname "$0")"
BUILD=`pwd`
TMP=`mktemp bmXXXXXX`

# Run simple unit tests first.
typeset -i count=0

echo -n 'Running unit tests:'
for t in "$BUILD/test/"test_*
do
	if [ -x "$t" ]	# ignore .cpp files
	then

		errmsg=$("$BASE/exrun" "$t" 2>&1)
		errno=$?
		if [ "$errno" = 0 ]
		then
			count=count+1
		else
			rm -f $TMP
			echo " $t FAILED ($errno)"
			echo
			echo "$errmsg"
			exit $?
		fi
	fi
done
echo " $count tests succeeded"
echo 'All unit tests passed' >> $TMP

# Assume AUTO_INCREMENT id column in images table will get 1 in
# load_jpeg call below, since we reset the DB before doing it.
export QUERY_STRING=id=1

# Now run examples to test high-level behavior.  The repeated use of







|
>





>




|









|







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
30
31
32
33
34
35
36
37
#!/bin/bash

BASE="$(dirname "$0")"
BUILD=`pwd`
TMP=`mktemp bmXXXXXX`

# Run simple unit tests first.
typeset -i total=0
typeset -i success=0
echo -n 'Running unit tests:'
for t in "$BUILD/test/"test_*
do
	if [ -x "$t" ]	# ignore .cpp files
	then
		total=total+1
		errmsg=$("$BASE/exrun" "$t" 2>&1)
		errno=$?
		if [ "$errno" = 0 ]
		then
			success=success+1
		else
			rm -f $TMP
			echo " $t FAILED ($errno)"
			echo
			echo "$errmsg"
			exit $?
		fi
	fi
done
echo " $success/$total tests succeeded"
echo 'All unit tests passed' >> $TMP

# Assume AUTO_INCREMENT id column in images table will get 1 in
# load_jpeg call below, since we reset the DB before doing it.
export QUERY_STRING=id=1

# Now run examples to test high-level behavior.  The repeated use of