Browse code

improve tests

Nat! authored on 21/10/2016 15:46:52
Showing 3 changed files
... ...
@@ -62,8 +62,9 @@ clear_test_dirs()
62 62
 test()
63 63
 {
64 64
    cd a || exit 1
65
-   mulle-bootstrap -y -f fetch || exit 1
66
-   mulle-bootstrap refresh || exit 1
65
+   mulle-bootstrap ${BOOTSTRAP_FLAGS} -y -f fetch || exit 1
66
+
67
+   mulle-bootstrap ${BOOTSTRAP_FLAGS} refresh || exit 1
67 68
 
68 69
    result="`cat .bootstrap.auto/repositories`"
69 70
    expect=
... ...
@@ -76,6 +77,8 @@ test()
76 76
 }
77 77
 
78 78
 
79
+BOOTSTRAP_FLAGS="$@"
80
+
79 81
 #
80 82
 # not that much of a test
81 83
 #
... ...
@@ -73,7 +73,8 @@ echo ""
73 73
 
74 74
    [ -d src/b_1 ] || fail "b as src/b_1 failed to be embedded"
75 75
    [ -d src/b_1/src/a_1 ] && fail "a was wrongly embedded"
76
-)
76
+   :
77
+) || exit 1
77 78
 
78 79
 echo ""
79 80
 echo ""
... ...
@@ -88,7 +89,8 @@ echo ""
88 88
    mulle-bootstrap fetch
89 89
    [ -d src/b_1 ] && fail "b as src/b_1 failed to be removed"
90 90
    [ -d src/b_2 ] || fail "b as src/b_2 failed to be added"
91
-)
91
+   :
92
+) || exit 1 
92 93
 
93 94
 echo ""
94 95
 echo ""
... ...
@@ -101,7 +103,8 @@ echo ""
101 101
    cd d ;
102 102
    mulle-bootstrap -a fetch
103 103
    [ -d .repos/c/src/b_1 ] || fail "b as .repos/c/src/b_1 failed to be fetched"
104
-)
104
+   :
105
+) || exit 1 
105 106
 
106 107
 echo ""
107 108
 echo ""
... ...
@@ -116,7 +119,8 @@ echo ""
116 116
    mulle-bootstrap -vvv fetch
117 117
    [ -d .repos/c/src/b_1 ] && fail "b as .repos/c/src/b_1 failed to be removed"
118 118
    [ -d .repos/c/src/b_2 ] || fail "b as .repos/c/src/b_2 failed to be added"
119
-)
119
+   :
120
+) || exit 1
120 121
 
121 122
 echo ""
122 123
 echo ""
123 124
new file mode 100644
... ...
@@ -0,0 +1,6 @@
0
+#! /bin/sh
1
+
2
+( cd "dependency" ; ./run-test.sh )
3
+( cd "refresh" ; ./run-test.sh )
4
+( cd "refresh-embedded" ; ./run-test.sh )
5
+