Make sure that if we call UPDATE_NOW with ignore-minus-n, the target gets updated exactly once regardless of previous calls to UPDATE_NOW with -n in effect.
()
| 149 | |
| 150 | |
| 151 | def build_once(): |
| 152 | """ |
| 153 | Make sure that if we call UPDATE_NOW with ignore-minus-n, the target gets |
| 154 | updated exactly once regardless of previous calls to UPDATE_NOW with -n in |
| 155 | effect. |
| 156 | |
| 157 | """ |
| 158 | t = BoostBuild.Tester(pass_toolset=0, pass_d0=False) |
| 159 | |
| 160 | t.write("file.jam", """\ |
| 161 | actions do-print |
| 162 | { |
| 163 | echo updating $(<) |
| 164 | } |
| 165 | |
| 166 | NOTFILE target1 ; |
| 167 | ALWAYS target1 ; |
| 168 | do-print target1 ; |
| 169 | |
| 170 | UPDATE_NOW target1 ; |
| 171 | UPDATE_NOW target1 : : ignore-minus-n ; |
| 172 | UPDATE_NOW target1 : : ignore-minus-n ; |
| 173 | |
| 174 | DEPENDS all : target1 ; |
| 175 | """) |
| 176 | |
| 177 | t.run_build_system(["-ffile.jam", "-n"], stdout="""\ |
| 178 | ...found 1 target... |
| 179 | ...updating 1 target... |
| 180 | do-print target1 |
| 181 | |
| 182 | echo updating target1 |
| 183 | |
| 184 | ...updated 1 target... |
| 185 | do-print target1 |
| 186 | |
| 187 | echo updating target1 |
| 188 | |
| 189 | updating target1 |
| 190 | ...updated 1 target... |
| 191 | ...found 1 target... |
| 192 | """) |
| 193 | |
| 194 | t.cleanup() |
| 195 | |
| 196 | |
| 197 | def return_status(): |
no test coverage detected