| 1 | #!/bin/sh |
|---|
| 2 | # |
|---|
| 3 | # Copyright (C) 2008 Walter Franzini |
|---|
| 4 | # |
|---|
| 5 | # NOTE: TABS in aegis metadata samples below must be preserved. |
|---|
| 6 | # |
|---|
| 7 | |
|---|
| 8 | # |
|---|
| 9 | # This test expects to be run from the tailor top source dir, change |
|---|
| 10 | # the following line if the convention used by tailor developer(s) |
|---|
| 11 | # differs. |
|---|
| 12 | # |
|---|
| 13 | here=`pwd` |
|---|
| 14 | |
|---|
| 15 | # |
|---|
| 16 | # To test against the stable aegis branch add the stable executables |
|---|
| 17 | # directory to the PATH. Only needed for aegis contributors. |
|---|
| 18 | # |
|---|
| 19 | aegis_stable_baseline=$(aegis -cd -p aegis.stable -bl 2> /dev/null) |
|---|
| 20 | if test -n "$aegis_stable_baseline" |
|---|
| 21 | then |
|---|
| 22 | PATH=$aegis_stable_baseline/linux-i486/bin:$PATH |
|---|
| 23 | fi |
|---|
| 24 | |
|---|
| 25 | # |
|---|
| 26 | # Add the development dir to the PATH |
|---|
| 27 | # |
|---|
| 28 | PATH=$here:$PATH |
|---|
| 29 | export PATH |
|---|
| 30 | |
|---|
| 31 | pass() |
|---|
| 32 | { |
|---|
| 33 | echo "PASSED:" |
|---|
| 34 | exit 0 |
|---|
| 35 | } |
|---|
| 36 | |
|---|
| 37 | fail() |
|---|
| 38 | { |
|---|
| 39 | echo "FAILED: $activity" |
|---|
| 40 | exit 1 |
|---|
| 41 | } |
|---|
| 42 | |
|---|
| 43 | no_result() |
|---|
| 44 | { |
|---|
| 45 | echo "NO_RESULT: $activity" |
|---|
| 46 | exit 2 |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | # |
|---|
| 50 | # The following function is used to check aegis metadata files. |
|---|
| 51 | # |
|---|
| 52 | check_it() |
|---|
| 53 | { |
|---|
| 54 | sed -e "s|$work|...|g" \ |
|---|
| 55 | -e 's|= [0-9][0-9]*; /.*|= TIME;|' \ |
|---|
| 56 | -e "s/\"$USER\"/\"USER\"/g" \ |
|---|
| 57 | -e 's/uuid = ".*"/uuid = "UUID"/' \ |
|---|
| 58 | -e 's/19[0-9][0-9]/YYYY/' \ |
|---|
| 59 | -e 's/20[0-9][0-9]/YYYY/' \ |
|---|
| 60 | -e 's/node = ".*"/node = "NODE"/' \ |
|---|
| 61 | -e 's/crypto = ".*"/crypto = "GUNK"/' \ |
|---|
| 62 | < $2 > $work/sed.out |
|---|
| 63 | if test $? -ne 0; then no_result; fi |
|---|
| 64 | diff -B $1 $work/sed.out |
|---|
| 65 | if test $? -ne 0; then no_result; fi |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | |
|---|
| 69 | # |
|---|
| 70 | # This test follows Aegis convention, where a test must be able to |
|---|
| 71 | # work even when the development directory is not writable, this |
|---|
| 72 | # happens when running tests in the integration stage. |
|---|
| 73 | # |
|---|
| 74 | work=${TMPDIR-/tmp}/TAILOR.$$ |
|---|
| 75 | mkdir $work |
|---|
| 76 | if test $? -ne 0; then no_result; fi |
|---|
| 77 | |
|---|
| 78 | cd $work |
|---|
| 79 | |
|---|
| 80 | # |
|---|
| 81 | # Prepare the darcs repository |
|---|
| 82 | # |
|---|
| 83 | activity="darcs setup" |
|---|
| 84 | mkdir $work/darcs-repo > log 2>&1 |
|---|
| 85 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 86 | |
|---|
| 87 | darcs initialize --repodir=$work/darcs-repo > log 2>&1 |
|---|
| 88 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 89 | |
|---|
| 90 | activity="create foo" |
|---|
| 91 | mkdir $work/darcs-repo/dir |
|---|
| 92 | if test $? -ne 0; then no_result; fi |
|---|
| 93 | |
|---|
| 94 | cat > $work/darcs-repo/dir/foo.txt <<EOF |
|---|
| 95 | A simple text file |
|---|
| 96 | EOF |
|---|
| 97 | if test $? -ne 0; then no_result; fi |
|---|
| 98 | |
|---|
| 99 | darcs add dir/foo.txt --repodir=$work/darcs-repo > log 2>&1 |
|---|
| 100 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 101 | |
|---|
| 102 | darcs record --repodir=$work/darcs-repo -a -A Nobody -m "initial commit" \ |
|---|
| 103 | > log 2>&1 |
|---|
| 104 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 105 | |
|---|
| 106 | cat > $work/darcs-repo/dir/foo.txt <<EOF |
|---|
| 107 | A simple text file |
|---|
| 108 | wit some more text. |
|---|
| 109 | EOF |
|---|
| 110 | if test $? -ne 0; then no_result; fi |
|---|
| 111 | |
|---|
| 112 | cat > $work/darcs-repo/bar.txt <<EOF |
|---|
| 113 | This is bar.txt |
|---|
| 114 | EOF |
|---|
| 115 | if test $? -ne 0; then no_result; fi |
|---|
| 116 | |
|---|
| 117 | darcs add bar.txt --repodir=$work/darcs-repo > log 2>&1 |
|---|
| 118 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 119 | |
|---|
| 120 | darcs record --repodir=$work/darcs-repo -a -A Nobody --ignore-time \ |
|---|
| 121 | -m "second commit" > log 2>&1 |
|---|
| 122 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 123 | |
|---|
| 124 | cat > $work/darcs-repo/dir/foo.txt <<EOF |
|---|
| 125 | A simple text file |
|---|
| 126 | wit some more text. |
|---|
| 127 | more text again! |
|---|
| 128 | EOF |
|---|
| 129 | if test $? -ne 0; then no_result; fi |
|---|
| 130 | |
|---|
| 131 | cat > $work/darcs-repo/bar.txt <<EOF |
|---|
| 132 | This will be baz.txt |
|---|
| 133 | EOF |
|---|
| 134 | if test $? -ne 0; then no_result; fi |
|---|
| 135 | |
|---|
| 136 | darcs mv bar.txt baz.txt --repodir=$work/darcs-repo > log 2>&1 |
|---|
| 137 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 138 | |
|---|
| 139 | darcs record --repodir=$work/darcs-repo -a -A Nobody --ignore-time \ |
|---|
| 140 | -m "third commit" > log 2>&1 |
|---|
| 141 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 142 | |
|---|
| 143 | # |
|---|
| 144 | # Initialize the aegis repository |
|---|
| 145 | # |
|---|
| 146 | unset AEGIS_PROJECT |
|---|
| 147 | unset AEGIS_CHANGE |
|---|
| 148 | unset AEGIS_PATH |
|---|
| 149 | unset AEGIS |
|---|
| 150 | umask 022 |
|---|
| 151 | |
|---|
| 152 | LINES=24 |
|---|
| 153 | export LINES |
|---|
| 154 | COLS=80 |
|---|
| 155 | export COLS |
|---|
| 156 | |
|---|
| 157 | USER=${USER:-${LOGNAME:-`whoami`}} |
|---|
| 158 | |
|---|
| 159 | PAGER=cat |
|---|
| 160 | export PAGER |
|---|
| 161 | AEGIS_THROTTLE=-1 |
|---|
| 162 | export AEGIS_THROTTLE |
|---|
| 163 | |
|---|
| 164 | # This tells aeintegratq that it is being used by a test. |
|---|
| 165 | AEGIS_TEST_DIR=$work |
|---|
| 166 | export AEGIS_TEST_DIR |
|---|
| 167 | |
|---|
| 168 | if test $? -ne 0; then exit 2; fi |
|---|
| 169 | |
|---|
| 170 | AEGIS_DATADIR=$here/lib |
|---|
| 171 | export AEGIS_DATADIR |
|---|
| 172 | |
|---|
| 173 | AEGIS_MESSAGE_LIBRARY=$work/no-such-dir |
|---|
| 174 | export AEGIS_MESSAGE_LIBRARY |
|---|
| 175 | unset LANG |
|---|
| 176 | unset LANGUAGE |
|---|
| 177 | unset LC_ALL |
|---|
| 178 | |
|---|
| 179 | AEGIS_PROJECT=example |
|---|
| 180 | export AEGIS_PROJECT |
|---|
| 181 | AEGIS_PATH=$work/lib |
|---|
| 182 | export AEGIS_PATH |
|---|
| 183 | |
|---|
| 184 | mkdir $AEGIS_PATH |
|---|
| 185 | |
|---|
| 186 | chmod 777 $AEGIS_PATH |
|---|
| 187 | if test $? -ne 0; then no_result; cat log; fi |
|---|
| 188 | |
|---|
| 189 | workproj=$work/foo.proj |
|---|
| 190 | workchan=$work/foo.chan |
|---|
| 191 | |
|---|
| 192 | # |
|---|
| 193 | # The project is NOT created by means of tailor since it should be |
|---|
| 194 | # created with a different user. |
|---|
| 195 | # |
|---|
| 196 | activity="new project" |
|---|
| 197 | aegis -npr $AEGIS_PROJECT -version "" -lib $AEGIS_PATH \ |
|---|
| 198 | -dir $workproj/ > log 2>&1 |
|---|
| 199 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 200 | |
|---|
| 201 | activity="project_acttributes" |
|---|
| 202 | cat > $work/pa <<EOF |
|---|
| 203 | description = "A bogus project created to test tailor functionality."; |
|---|
| 204 | developer_may_review = true; |
|---|
| 205 | developer_may_integrate = true; |
|---|
| 206 | reviewer_may_integrate = true; |
|---|
| 207 | default_test_exemption = true; |
|---|
| 208 | develop_end_action = goto_awaiting_integration; |
|---|
| 209 | EOF |
|---|
| 210 | if test $? -ne 0 ; then no_result; fi |
|---|
| 211 | |
|---|
| 212 | aegis -pa -f $work/pa > log 2>&1 |
|---|
| 213 | if test $? -ne 0 ; then cat log; no_result; fi |
|---|
| 214 | |
|---|
| 215 | # |
|---|
| 216 | # add the staff |
|---|
| 217 | # |
|---|
| 218 | activity="staff 62" |
|---|
| 219 | aegis -nd $USER > log 2>&1 |
|---|
| 220 | if test $? -ne 0 ; then cat log; no_result; fi |
|---|
| 221 | aegis -nrv $USER > log 2>&1 |
|---|
| 222 | if test $? -ne 0 ; then cat log; no_result; fi |
|---|
| 223 | aegis -ni $USER > log 2>&1 |
|---|
| 224 | if test $? -ne 0 ; then cat log; no_result; fi |
|---|
| 225 | |
|---|
| 226 | # |
|---|
| 227 | # tailor config |
|---|
| 228 | # |
|---|
| 229 | cat > $work/tailor.conf <<EOF |
|---|
| 230 | [DEFAULT] |
|---|
| 231 | verbose = true |
|---|
| 232 | Debug = true |
|---|
| 233 | |
|---|
| 234 | [project] |
|---|
| 235 | patch-name-format = %(revision)s |
|---|
| 236 | root-directory = $PWD/rootdir |
|---|
| 237 | source = darcs:source |
|---|
| 238 | target = aegis:target |
|---|
| 239 | |
|---|
| 240 | [darcs:source] |
|---|
| 241 | repository = $work/darcs-repo |
|---|
| 242 | subdir = darcs1side |
|---|
| 243 | |
|---|
| 244 | [aegis:target] |
|---|
| 245 | module = $AEGIS_PROJECT |
|---|
| 246 | subdir = aegisside |
|---|
| 247 | EOF |
|---|
| 248 | if test $? -ne 0; then no_result; fi |
|---|
| 249 | |
|---|
| 250 | activity="run tailor" |
|---|
| 251 | python $here/tailor -c $work/tailor.conf > $work/tailor.log 2>&1 |
|---|
| 252 | if test $? -ne 0; then cat $work/tailor.log; fail; fi |
|---|
| 253 | |
|---|
| 254 | cat > $work/ok <<EOF |
|---|
| 255 | 1 10 initial commit |
|---|
| 256 | 2 11 second commit |
|---|
| 257 | 3 12 third commit |
|---|
| 258 | EOF |
|---|
| 259 | if test $? -ne 0; then no_result; fi |
|---|
| 260 | |
|---|
| 261 | activity="check aegis project history" |
|---|
| 262 | aegis -list project_history -unformatted 2> $work/log \ |
|---|
| 263 | | cut -d\ -f 1,7- > $work/history |
|---|
| 264 | if test $? -ne 0; then cat $work/log; no_result; fi |
|---|
| 265 | |
|---|
| 266 | diff -u $work/ok $work/history |
|---|
| 267 | if test $? -ne 0; then fail; fi |
|---|
| 268 | |
|---|
| 269 | activity="check the aegis baseline vs. darcs repository" |
|---|
| 270 | diff $work/darcs-repo/baz.txt $workproj/baseline/baz.txt |
|---|
| 271 | if test $? -ne 0; then fail; fi |
|---|
| 272 | |
|---|
| 273 | diff $work/darcs-repo/dir/foo.txt $workproj/baseline/dir/foo.txt |
|---|
| 274 | if test $? -ne 0; then fail; fi |
|---|
| 275 | |
|---|
| 276 | # |
|---|
| 277 | # add more darcs changes |
|---|
| 278 | # |
|---|
| 279 | cat > $work/darcs-repo/baz.txt <<EOF |
|---|
| 280 | A simple text file |
|---|
| 281 | wit some more text. |
|---|
| 282 | more text again! |
|---|
| 283 | ancora piu\` test |
|---|
| 284 | EOF |
|---|
| 285 | if test $? -ne 0; then no_result; fi |
|---|
| 286 | |
|---|
| 287 | darcs remove dir/foo.txt --repodir=$work/darcs-repo > log 2>&1 |
|---|
| 288 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 289 | |
|---|
| 290 | activity="tag 1.0.0" |
|---|
| 291 | darcs tag 1.0.0 --repodir=$work/darcs-repo -A Nobody > log 2>&1 |
|---|
| 292 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 293 | |
|---|
| 294 | cat > $work/logfile <<EOF |
|---|
| 295 | fourth commit |
|---|
| 296 | This text is now |
|---|
| 297 | the description of the aegis change |
|---|
| 298 | splitted on multiple lines. |
|---|
| 299 | EOF |
|---|
| 300 | if test $? -ne 0; then no_result; fi |
|---|
| 301 | |
|---|
| 302 | darcs record --repodir=$work/darcs-repo -a -A Nobody --ignore-time \ |
|---|
| 303 | --logfile $work/logfile > log 2>&1 |
|---|
| 304 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 305 | |
|---|
| 306 | activity="run tailor again" |
|---|
| 307 | python $here/tailor -c $work/tailor.conf > log 2>&1 |
|---|
| 308 | if test $? -ne 0; then cat log; fail; fi |
|---|
| 309 | |
|---|
| 310 | # |
|---|
| 311 | # Check the aegis project history. |
|---|
| 312 | # fixme: there is a gap in the change number sequence (13 is missing) |
|---|
| 313 | # because currently the change corresponding to the tags is |
|---|
| 314 | # still created even if it cannot be completed because it's empty |
|---|
| 315 | # |
|---|
| 316 | activity="check aegis project history (again)" |
|---|
| 317 | |
|---|
| 318 | cat > $work/ok <<EOF |
|---|
| 319 | 1 10 initial commit |
|---|
| 320 | 2 11 second commit |
|---|
| 321 | Name: "1.0.0" |
|---|
| 322 | 3 12 third commit |
|---|
| 323 | 4 14 fourth commit |
|---|
| 324 | EOF |
|---|
| 325 | if test $? -ne 0; then no_result; fi |
|---|
| 326 | |
|---|
| 327 | aegis -list project_history -unformatted 2> log > history |
|---|
| 328 | if test $? -ne 0; then cat history; no_result; fi |
|---|
| 329 | |
|---|
| 330 | cat > $work/massage_history.awk <<'EOF' |
|---|
| 331 | /^Name:/ {print $0} |
|---|
| 332 | /^[0-9]/ {print $1, $7, $8, $9} |
|---|
| 333 | EOF |
|---|
| 334 | if test $? -ne 0; then no_result; fi |
|---|
| 335 | |
|---|
| 336 | awk -f $work/massage_history.awk < history > history.new |
|---|
| 337 | if test $? -ne 0; then no_result; fi |
|---|
| 338 | |
|---|
| 339 | diff -u ok history.new |
|---|
| 340 | if test $? -ne 0; then fail; fi |
|---|
| 341 | |
|---|
| 342 | activity="check change 14 attributes" |
|---|
| 343 | cat > $work/ok <<EOF |
|---|
| 344 | brief_description = "fourth commit"; |
|---|
| 345 | description = "This text is now the description of the aegis change splitted on\n\\ |
|---|
| 346 | multiple lines."; |
|---|
| 347 | cause = external_improvement; |
|---|
| 348 | test_exempt = true; |
|---|
| 349 | test_baseline_exempt = true; |
|---|
| 350 | regression_test_exempt = true; |
|---|
| 351 | architecture = |
|---|
| 352 | [ |
|---|
| 353 | "unspecified", |
|---|
| 354 | ]; |
|---|
| 355 | copyright_years = |
|---|
| 356 | [ |
|---|
| 357 | `date +%Y`, |
|---|
| 358 | ]; |
|---|
| 359 | EOF |
|---|
| 360 | if test $? -ne 0; then no_result; fi |
|---|
| 361 | |
|---|
| 362 | aegis -ca -l 14 > $work/change_attr 2> log |
|---|
| 363 | if test $? -ne 0; then cat log; no_result; fi |
|---|
| 364 | |
|---|
| 365 | diff ok change_attr |
|---|
| 366 | if test $? -ne 0; then fail; fi |
|---|
| 367 | |
|---|
| 368 | # |
|---|
| 369 | # test the change content |
|---|
| 370 | # |
|---|
| 371 | activity="change 10 content" |
|---|
| 372 | cat > $work/ok <<EOF |
|---|
| 373 | config create 1 aegis.conf |
|---|
| 374 | source create 1 dir/foo.txt |
|---|
| 375 | EOF |
|---|
| 376 | if test $? -ne 0; then no_result; fi |
|---|
| 377 | |
|---|
| 378 | aegis -list change_files -unf -c 10 > $work/out |
|---|
| 379 | if test $? -ne 0; then no_result; fi |
|---|
| 380 | |
|---|
| 381 | diff -u $work/ok $work/out |
|---|
| 382 | if test $? -ne 0; then fail; fi |
|---|
| 383 | |
|---|
| 384 | # |
|---|
| 385 | # Check the content of change 11 (second commit) |
|---|
| 386 | # |
|---|
| 387 | activity="check change 11 content" |
|---|
| 388 | cat > $work/ok <<EOF |
|---|
| 389 | source create 1 bar.txt |
|---|
| 390 | source modify 1 -> 2 dir/foo.txt |
|---|
| 391 | EOF |
|---|
| 392 | if test $? -ne 0; then no_result; fi |
|---|
| 393 | |
|---|
| 394 | aegis -list change_files -unf -c 11 > $work/out |
|---|
| 395 | if test $? -ne 0; then no_result; fi |
|---|
| 396 | |
|---|
| 397 | diff -u $work/ok $work/out |
|---|
| 398 | if test $? -ne 0; then fail; fi |
|---|
| 399 | |
|---|
| 400 | # |
|---|
| 401 | # Check the content of change 12 (third commit) |
|---|
| 402 | # |
|---|
| 403 | # Note: we check the change fstate file to verify the rename |
|---|
| 404 | # operation, since the unformatted output lacks some details.. |
|---|
| 405 | # |
|---|
| 406 | activity="check change 12 content" |
|---|
| 407 | cat > $work/ok <<EOF |
|---|
| 408 | src = |
|---|
| 409 | [ |
|---|
| 410 | { |
|---|
| 411 | file_name = "bar.txt"; |
|---|
| 412 | uuid = "UUID"; |
|---|
| 413 | action = remove; |
|---|
| 414 | edit_origin = |
|---|
| 415 | { |
|---|
| 416 | revision = "1"; |
|---|
| 417 | encoding = none; |
|---|
| 418 | }; |
|---|
| 419 | usage = source; |
|---|
| 420 | move = "baz.txt"; |
|---|
| 421 | }, |
|---|
| 422 | { |
|---|
| 423 | file_name = "baz.txt"; |
|---|
| 424 | uuid = "UUID"; |
|---|
| 425 | action = create; |
|---|
| 426 | edit = |
|---|
| 427 | { |
|---|
| 428 | revision = "2"; |
|---|
| 429 | encoding = none; |
|---|
| 430 | }; |
|---|
| 431 | edit_origin = |
|---|
| 432 | { |
|---|
| 433 | revision = "1"; |
|---|
| 434 | encoding = none; |
|---|
| 435 | }; |
|---|
| 436 | usage = source; |
|---|
| 437 | move = "bar.txt"; |
|---|
| 438 | }, |
|---|
| 439 | { |
|---|
| 440 | file_name = "dir/foo.txt"; |
|---|
| 441 | uuid = "UUID"; |
|---|
| 442 | action = modify; |
|---|
| 443 | edit = |
|---|
| 444 | { |
|---|
| 445 | revision = "3"; |
|---|
| 446 | encoding = none; |
|---|
| 447 | }; |
|---|
| 448 | edit_origin = |
|---|
| 449 | { |
|---|
| 450 | revision = "2"; |
|---|
| 451 | encoding = none; |
|---|
| 452 | }; |
|---|
| 453 | usage = source; |
|---|
| 454 | }, |
|---|
| 455 | ]; |
|---|
| 456 | EOF |
|---|
| 457 | if test $? -ne 0; then no_result; fi |
|---|
| 458 | |
|---|
| 459 | check_it ok $workproj/info/change/0/012.fs |
|---|
| 460 | |
|---|
| 461 | # |
|---|
| 462 | # Note: there is a gap in the change numbers sequence, the next should |
|---|
| 463 | # be 13, because the aegis target back-end needs to be improved |
|---|
| 464 | # in the case of changeset setting only a tag |
|---|
| 465 | # |
|---|
| 466 | activity="check change 14 content" |
|---|
| 467 | cat > $work/ok <<EOF |
|---|
| 468 | source modify 2 -> 3 baz.txt |
|---|
| 469 | source remove 3 dir/foo.txt |
|---|
| 470 | EOF |
|---|
| 471 | if test $? -ne 0; then no_result; fi |
|---|
| 472 | |
|---|
| 473 | aegis -list change_files -unf -c 14 > $work/out |
|---|
| 474 | if test $? -ne 0; then no_result; fi |
|---|
| 475 | |
|---|
| 476 | diff -u $work/ok $work/out |
|---|
| 477 | if test $? -ne 0; then fail; fi |
|---|
| 478 | |
|---|
| 479 | # |
|---|
| 480 | # Check the content of the baseline |
|---|
| 481 | # |
|---|
| 482 | activity="check the baseline" |
|---|
| 483 | cat > $work/ok <<EOF |
|---|
| 484 | src = |
|---|
| 485 | [ |
|---|
| 486 | { |
|---|
| 487 | file_name = "aegis.conf"; |
|---|
| 488 | uuid = "UUID"; |
|---|
| 489 | action = create; |
|---|
| 490 | edit = |
|---|
| 491 | { |
|---|
| 492 | revision = "1"; |
|---|
| 493 | encoding = none; |
|---|
| 494 | }; |
|---|
| 495 | edit_origin = |
|---|
| 496 | { |
|---|
| 497 | revision = "1"; |
|---|
| 498 | encoding = none; |
|---|
| 499 | }; |
|---|
| 500 | usage = config; |
|---|
| 501 | file_fp = |
|---|
| 502 | { |
|---|
| 503 | youngest = TIME; |
|---|
| 504 | oldest = TIME; |
|---|
| 505 | crypto = "GUNK"; |
|---|
| 506 | }; |
|---|
| 507 | diff_file_fp = |
|---|
| 508 | { |
|---|
| 509 | youngest = TIME; |
|---|
| 510 | oldest = TIME; |
|---|
| 511 | crypto = "GUNK"; |
|---|
| 512 | }; |
|---|
| 513 | }, |
|---|
| 514 | { |
|---|
| 515 | file_name = "bar.txt"; |
|---|
| 516 | uuid = "UUID"; |
|---|
| 517 | action = remove; |
|---|
| 518 | edit = |
|---|
| 519 | { |
|---|
| 520 | revision = "1"; |
|---|
| 521 | encoding = none; |
|---|
| 522 | }; |
|---|
| 523 | edit_origin = |
|---|
| 524 | { |
|---|
| 525 | revision = "1"; |
|---|
| 526 | encoding = none; |
|---|
| 527 | }; |
|---|
| 528 | usage = source; |
|---|
| 529 | move = "baz.txt"; |
|---|
| 530 | deleted_by = 12; |
|---|
| 531 | }, |
|---|
| 532 | { |
|---|
| 533 | file_name = "baz.txt"; |
|---|
| 534 | uuid = "UUID"; |
|---|
| 535 | action = create; |
|---|
| 536 | edit = |
|---|
| 537 | { |
|---|
| 538 | revision = "3"; |
|---|
| 539 | encoding = none; |
|---|
| 540 | }; |
|---|
| 541 | edit_origin = |
|---|
| 542 | { |
|---|
| 543 | revision = "3"; |
|---|
| 544 | encoding = none; |
|---|
| 545 | }; |
|---|
| 546 | usage = source; |
|---|
| 547 | file_fp = |
|---|
| 548 | { |
|---|
| 549 | youngest = TIME; |
|---|
| 550 | oldest = TIME; |
|---|
| 551 | crypto = "GUNK"; |
|---|
| 552 | }; |
|---|
| 553 | diff_file_fp = |
|---|
| 554 | { |
|---|
| 555 | youngest = TIME; |
|---|
| 556 | oldest = TIME; |
|---|
| 557 | crypto = "GUNK"; |
|---|
| 558 | }; |
|---|
| 559 | move = "bar.txt"; |
|---|
| 560 | }, |
|---|
| 561 | { |
|---|
| 562 | file_name = "dir/foo.txt"; |
|---|
| 563 | uuid = "UUID"; |
|---|
| 564 | action = remove; |
|---|
| 565 | edit = |
|---|
| 566 | { |
|---|
| 567 | revision = "3"; |
|---|
| 568 | encoding = none; |
|---|
| 569 | }; |
|---|
| 570 | edit_origin = |
|---|
| 571 | { |
|---|
| 572 | revision = "3"; |
|---|
| 573 | encoding = none; |
|---|
| 574 | }; |
|---|
| 575 | usage = source; |
|---|
| 576 | diff_file_fp = |
|---|
| 577 | { |
|---|
| 578 | youngest = TIME; |
|---|
| 579 | oldest = TIME; |
|---|
| 580 | crypto = "GUNK"; |
|---|
| 581 | }; |
|---|
| 582 | deleted_by = 14; |
|---|
| 583 | }, |
|---|
| 584 | ]; |
|---|
| 585 | EOF |
|---|
| 586 | if test $? -ne 0; then no_result; fi |
|---|
| 587 | |
|---|
| 588 | check_it ok $workproj/info/trunk.fs |
|---|
| 589 | |
|---|
| 590 | activity="check aegis.conf baseline copy" |
|---|
| 591 | cat > $work/ok <<'EOF' |
|---|
| 592 | |
|---|
| 593 | build_command = "exit 0"; |
|---|
| 594 | link_integration_directory = true; |
|---|
| 595 | |
|---|
| 596 | history_get_command = "aesvt -check-out -edit ${quote $edit} " |
|---|
| 597 | "-history ${quote $history} -f ${quote $output}"; |
|---|
| 598 | history_put_command = "aesvt -check-in -history ${quote $history} " |
|---|
| 599 | "-f ${quote $input}"; |
|---|
| 600 | history_query_command = "aesvt -query -history ${quote $history}"; |
|---|
| 601 | history_content_limitation = binary_capable; |
|---|
| 602 | |
|---|
| 603 | diff_command = "set +e; $diff $orig $i > $out; test $$? -le 1"; |
|---|
| 604 | merge_command = |
|---|
| 605 | "(diff3 -e $i $orig $mr | sed -e '/^w$$/d' -e '/^q$$/d'; echo '1,$$p') " |
|---|
| 606 | "| ed - $i > $out"; |
|---|
| 607 | patch_diff_command = |
|---|
| 608 | "set +e; $diff -C0 -L $index -L $index $orig $i > $out; test $$? -le 1"; |
|---|
| 609 | |
|---|
| 610 | shell_safe_filenames = false; |
|---|
| 611 | EOF |
|---|
| 612 | if test $? -ne 0; then no_result; fi |
|---|
| 613 | |
|---|
| 614 | diff ok $workproj/baseline/aegis.conf |
|---|
| 615 | if test $? -ne 0; then fail; fi |
|---|
| 616 | |
|---|
| 617 | diff $work/darcs-repo/baz.txt $workproj/baseline/baz.txt |
|---|
| 618 | if test $? -ne 0; then fail; fi |
|---|
| 619 | |
|---|
| 620 | pass |
|---|