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 77
 }
77 78
 
78 79
 
80
+BOOTSTRAP_FLAGS="$@"
81
+
79 82
 #
80 83
 # not that much of a test
81 84
 #
... ...
@@ -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 89
    mulle-bootstrap fetch
89 90
    [ -d src/b_1 ] && fail "b as src/b_1 failed to be removed"
90 91
    [ -d src/b_2 ] || fail "b as src/b_2 failed to be added"
91
-)
92
+   :
93
+) || exit 1 
92 94
 
93 95
 echo ""
94 96
 echo ""
... ...
@@ -101,7 +103,8 @@ echo ""
101 103
    cd d ;
102 104
    mulle-bootstrap -a fetch
103 105
    [ -d .repos/c/src/b_1 ] || fail "b as .repos/c/src/b_1 failed to be fetched"
104
-)
106
+   :
107
+) || exit 1 
105 108
 
106 109
 echo ""
107 110
 echo ""
... ...
@@ -116,7 +119,8 @@ echo ""
116 119
    mulle-bootstrap -vvv fetch
117 120
    [ -d .repos/c/src/b_1 ] && fail "b as .repos/c/src/b_1 failed to be removed"
118 121
    [ -d .repos/c/src/b_2 ] || fail "b as .repos/c/src/b_2 failed to be added"
119
-)
122
+   :
123
+) || exit 1
120 124
 
121 125
 echo ""
122 126
 echo ""
123 127
new file mode 100644
... ...
@@ -0,0 +1,6 @@
1
+#! /bin/sh
2
+
3
+( cd "dependency" ; ./run-test.sh )
4
+( cd "refresh" ; ./run-test.sh )
5
+( cd "refresh-embedded" ; ./run-test.sh )
6
+