~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/test/shelltest.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# See the file LICENSE for redistribution information.
2
 
#
3
 
# Copyright (c) 2001-2002
4
 
#       Sleepycat Software.  All rights reserved.
5
 
#
6
 
# $Id$
7
 
#
8
 
# TEST  scr###
9
 
# TEST  The scr### directories are shell scripts that test a variety of
10
 
# TEST  things, including things about the distribution itself.  These
11
 
# TEST  tests won't run on most systems, so don't even try to run them.
12
 
#
13
 
# shelltest.tcl:
14
 
#       Code to run shell script tests, to incorporate Java, C++,
15
 
#       example compilation, etc. test scripts into the Tcl framework.
16
 
proc shelltest { { run_one 0 }} {
17
 
        source ./include.tcl
18
 
        global shelltest_list
19
 
 
20
 
        set SH /bin/sh
21
 
        if { [file executable $SH] != 1 } {
22
 
                puts "Shell tests require valid shell /bin/sh: not found."
23
 
                puts "Skipping shell tests."
24
 
                return 0
25
 
        }
26
 
 
27
 
        if { $run_one == 0 } {
28
 
                puts "Running shell script tests..."
29
 
 
30
 
                foreach testpair $shelltest_list {
31
 
                        set dir [lindex $testpair 0]
32
 
                        set test [lindex $testpair 1]
33
 
 
34
 
                        env_cleanup $testdir
35
 
                        shelltest_copy $test_path/$dir $testdir
36
 
                        shelltest_run $SH $dir $test $testdir
37
 
                }
38
 
        } else {
39
 
                set run_one [expr $run_one - 1];
40
 
                set dir [lindex [lindex $shelltest_list $run_one] 0]
41
 
                set test [lindex [lindex $shelltest_list $run_one] 1]
42
 
 
43
 
                env_cleanup $testdir
44
 
                shelltest_copy $test_path/$dir $testdir
45
 
                shelltest_run $SH $dir $test $testdir
46
 
        }
47
 
}
48
 
 
49
 
proc shelltest_copy { fromdir todir } {
50
 
        set globall [glob $fromdir/*]
51
 
 
52
 
        foreach f $globall {
53
 
                file copy $f $todir/
54
 
        }
55
 
}
56
 
 
57
 
proc shelltest_run { sh srcdir test testdir } {
58
 
        puts "Running shell script $srcdir ($test)..."
59
 
 
60
 
        set ret [catch {exec $sh -c "cd $testdir && sh $test" >&@ stdout} res]
61
 
 
62
 
        if { $ret != 0 } {
63
 
                puts "FAIL: shell test $srcdir/$test exited abnormally"
64
 
        }
65
 
}
66
 
 
67
 
proc scr001 {} { shelltest 1 }
68
 
proc scr002 {} { shelltest 2 }
69
 
proc scr003 {} { shelltest 3 }
70
 
proc scr004 {} { shelltest 4 }
71
 
proc scr005 {} { shelltest 5 }
72
 
proc scr006 {} { shelltest 6 }
73
 
proc scr007 {} { shelltest 7 }
74
 
proc scr008 {} { shelltest 8 }
75
 
proc scr009 {} { shelltest 9 }
76
 
proc scr010 {} { shelltest 10 }
77
 
proc scr011 {} { shelltest 11 }
78
 
proc scr012 {} { shelltest 12 }
79
 
proc scr013 {} { shelltest 13 }
80
 
proc scr014 {} { shelltest 14 }
81
 
proc scr015 {} { shelltest 15 }
82
 
proc scr016 {} { shelltest 16 }
83
 
proc scr017 {} { shelltest 17 }
84
 
proc scr018 {} { shelltest 18 }
85
 
proc scr019 {} { shelltest 19 }
86
 
proc scr020 {} { shelltest 20 }
87
 
proc scr021 {} { shelltest 21 }
88
 
proc scr022 {} { shelltest 22 }