~larsks/cloud-utils/cloud-utils

« back to all changes in this revision

Viewing changes to debian/tests/functions

  • Committer: Scott Moser
  • Date: 2018-09-06 03:13:53 UTC
  • Revision ID: smoser@ubuntu.com-20180906031353-kqwu8ci0x30j6x6i
Sync debian/tests directory with what is in cosmic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
runtests() {
8
8
    local mytest="$1" pt_type resizer
 
9
    make_executable "$1"
9
10
    for pt_type in gpt dos; do
10
11
        for resizer in auto sfdisk gdisk; do
11
12
            case "$pt_type:$resizer" in
24
25
    done
25
26
}
26
27
 
 
28
make_executable() {
 
29
    # in case the thing to be executed is not executable
 
30
    # as it might be created by a patch application.
 
31
    if [ -f "$1" -a ! -x "$1" ]; then
 
32
        chmod +x "$1" || return
 
33
    fi
 
34
    return 0
 
35
}
 
36
 
 
37
execute() {
 
38
    make_executable "$1"
 
39
    "$@"
 
40
}
 
41
 
27
42
# vi: ts=4 expandtab