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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
dnl ===================================================================
AT_COPYRIGHT([Copyright (C) 2008 Hans Ulrich Niedermann])
AT_TESTED([nbb])
dnl ===================================================================
dnl Stuff to test:
dnl - (srcdir|builddir|installdir) (do|do not) exist
dnl - sh with simple shell script works
dnl - run with simple shell script works
dnl ===================================================================
AT_SETUP([nbb run-src])
AT_KEYWORDS([nbb runsh run-src])
AT_WRAP_GIT_AM([dnl
AT_CHECK([dnl
echo "$PWD/test.dir
RUN: @<:@'pwd'@:>@
in $PWD/test.dir" > expout
cd test.dir && AT_NBB run-src pwd], [0], [expout])
])
AT_CLEANUP()
dnl ===================================================================
AT_SETUP([nbb run-build: non-existing builddir])
AT_KEYWORDS([nbb runsh run-build])
AT_WRAP_GIT_AM([dnl
AT_CHECK([dnl
echo "ERROR: The builddir directory '$PWD/test.dir/_build/master' does not exist" > experr
cd test.dir && AT_NBB run-build pwd], [1], [], [experr])
])
AT_CLEANUP()
dnl ===================================================================
AT_SETUP([nbb run-install: non-existing installdir])
AT_KEYWORDS([nbb runsh run-install])
AT_WRAP_GIT_AM([dnl
AT_CHECK([dnl
echo "ERROR: The installdir directory '$PWD/test.dir/_install/master' does not exist" > experr
cd test.dir && AT_NBB run-install pwd], [1], [], [experr])
])
AT_CLEANUP()
dnl ===================================================================
AT_SETUP([nbb run-build: after build])
AT_KEYWORDS([nbb runsh run-build])
AT_WRAP_GIT_AM([dnl
AT_CHECK([cd test.dir && AT_NBB build], [0], [ignore], [ignore])
AT_CHECK([dnl
echo "$PWD/test.dir/_build/master
RUN: @<:@'pwd'@:>@
in $PWD/test.dir/_build/master" > expout
cd test.dir && AT_NBB run-build pwd], [0], [expout])
])
AT_CLEANUP()
dnl ===================================================================
AT_SETUP([nbb run-install: after install])
AT_KEYWORDS([nbb runsh run-install])
AT_WRAP_GIT_AM([dnl
AT_CHECK([cd test.dir && AT_NBB install], [0], [ignore], [ignore])
AT_CHECK([dnl
echo "$PWD/test.dir/_install/master
RUN: @<:@'pwd'@:>@
in $PWD/test.dir/_install/master" > expout
cd test.dir && AT_NBB run-install pwd], [0], [expout])
])
AT_CLEANUP()
dnl ===================================================================
|