Changeset 1566 in tailor for test-scripts/test-darcs2aegis-simple.sh
- Timestamp:
- 05/28/08 08:27:48 (5 years ago)
- Hash name:
- 20080528062748-bb3d1-0edbfa79f9cacc8e2cf0182ff091c73d38bfb3b9
- File:
-
- 1 edited
-
test-scripts/test-darcs2aegis-simple.sh (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
test-scripts/test-darcs2aegis-simple.sh
r1565 r1566 3 3 # Copyright (C) 2008 Walter Franzini 4 4 # 5 6 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 # 7 13 here=`pwd` 8 14 … … 61 67 62 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 # 63 74 work=${TMPDIR-/tmp}/TAILOR.$$ 64 75 mkdir $work … … 214 225 cat > $work/tailor.conf <<EOF 215 226 [DEFAULT] 216 verbose = True217 Debug = True227 verbose = true 228 Debug = true 218 229 219 230 [project] … … 246 257 247 258 activity="check aegis project history" 248 aegis -list project_history -unformatted 2> log | cut -d\ -f 1,7- > history 249 if test $? -ne 0; then cat history; no_result; fi 250 251 diff ok history 259 aegis -list project_history -unformatted 2> $work/log \ 260 | cut -d\ -f 1,7- > $work/history 261 if test $? -ne 0; then cat $work/log; no_result; fi 262 263 diff -u $work/ok $work/history 252 264 if test $? -ne 0; then fail; fi 253 265 … … 266 278 if test $? -ne 0; then cat log; no_result; fi 267 279 280 activity="tag 1.0.0" 281 darcs tag 1.0.0 --repodir=$work/darcs-repo -A Nobody > log 2>&1 282 if test $? -ne 0; then cat log; no_result; fi 283 268 284 cat > $work/logfile <<EOF 269 285 fourth commit … … 282 298 if test $? -ne 0; then cat log; fail; fi 283 299 300 # 301 # Check the aegis project history. 302 # fixme: there is a gap in the change number sequence (13 is missing) 303 # because currently the change corresponding to the tags is 304 # still created even if it cannot be completed because it's empty 305 # 306 activity="check aegis project history (again)" 307 284 308 cat > $work/ok <<EOF 285 309 1 10 initial commit 286 310 2 11 second commit 311 Name: "1.0.0" 287 312 3 12 third commit 288 4 13 fourth commit 289 EOF 290 if test $? -ne 0; then no_result; fi 291 292 activity="check aegis project history" 293 aegis -list project_history -unformatted 2> log | cut -d\ -f 1,7- > history 313 4 14 fourth commit 314 EOF 315 if test $? -ne 0; then no_result; fi 316 317 aegis -list project_history -unformatted 2> log > history 294 318 if test $? -ne 0; then cat history; no_result; fi 295 319 296 diff ok history 297 if test $? -ne 0; then fail; fi 298 320 cat > $work/massage_history.awk <<'EOF' 321 /^Name:/ {print $0} 322 /^[0-9]/ {print $1, $7, $8, $9} 323 EOF 324 if test $? -ne 0; then no_result; fi 325 326 awk -f $work/massage_history.awk < history > history.new 327 if test $? -ne 0; then no_result; fi 328 329 diff -u ok history.new 330 if test $? -ne 0; then fail; fi 331 332 activity="check change 14 attributes" 299 333 cat > $work/ok <<EOF 300 334 brief_description = "fourth commit"; … … 316 350 if test $? -ne 0; then no_result; fi 317 351 318 activity="check project content" 319 aegis -ca -l 13 > $work/change_attr 2> log 352 aegis -ca -l 14 > $work/change_attr 2> log 320 353 if test $? -ne 0; then cat log; no_result; fi 321 354 … … 336 369 if test $? -ne 0; then no_result; fi 337 370 338 diff $work/ok $work/out 371 diff -u $work/ok $work/out 372 if test $? -ne 0; then fail; fi 373 374 # 375 # Check the content of change 11 (second commit) 376 # 377 activity="check change 11 content" 378 cat > $work/ok <<EOF 379 source create 1 bar.txt 380 source modify 1 -> 2 dir/foo.txt 381 EOF 382 if test $? -ne 0; then no_result; fi 383 384 aegis -list change_files -unf -c 11 > $work/out 385 if test $? -ne 0; then no_result; fi 386 387 diff -u $work/ok $work/out 388 if test $? -ne 0; then fail; fi 389 390 # 391 # Check the content of change 12 (third commit) 392 # 393 # Note: we check the change fstate file to verify the rename 394 # operation, since the unformatted output lacks some details.. 395 # 396 activity="check change 12 content" 397 cat > $work/ok <<EOF 398 src = 399 [ 400 { 401 file_name = "bar.txt"; 402 uuid = "UUID"; 403 action = remove; 404 edit_origin = 405 { 406 revision = "1"; 407 encoding = none; 408 }; 409 usage = source; 410 move = "baz.txt"; 411 }, 412 { 413 file_name = "baz.txt"; 414 uuid = "UUID"; 415 action = create; 416 edit = 417 { 418 revision = "2"; 419 encoding = none; 420 }; 421 edit_origin = 422 { 423 revision = "1"; 424 encoding = none; 425 }; 426 usage = source; 427 move = "bar.txt"; 428 }, 429 { 430 file_name = "dir/foo.txt"; 431 uuid = "UUID"; 432 action = modify; 433 edit = 434 { 435 revision = "3"; 436 encoding = none; 437 }; 438 edit_origin = 439 { 440 revision = "2"; 441 encoding = none; 442 }; 443 usage = source; 444 }, 445 ]; 446 EOF 447 if test $? -ne 0; then no_result; fi 448 449 check_it ok $workproj/info/change/0/012.fs 450 451 # 452 # Note: there is a gap in the change numbers sequence, the next should 453 # be 13, because the aegis target back-end needs to be improved 454 # in the case of changeset setting only a tag 455 # 456 activity="check change 14 content" 457 cat > $work/ok <<EOF 458 source modify 2 -> 3 baz.txt 459 source remove 3 dir/foo.txt 460 EOF 461 if test $? -ne 0; then no_result; fi 462 463 aegis -list change_files -unf -c 14 > $work/out 464 if test $? -ne 0; then no_result; fi 465 466 diff -u $work/ok $work/out 467 if test $? -ne 0; then fail; fi 468 469 # 470 # Check the content of the baseline 471 # 472 activity="check the baseline" 473 cat > $work/ok <<EOF 474 src = 475 [ 476 { 477 file_name = "aegis.conf"; 478 uuid = "UUID"; 479 action = create; 480 edit = 481 { 482 revision = "1"; 483 encoding = none; 484 }; 485 edit_origin = 486 { 487 revision = "1"; 488 encoding = none; 489 }; 490 usage = config; 491 file_fp = 492 { 493 youngest = TIME; 494 oldest = TIME; 495 crypto = "GUNK"; 496 }; 497 diff_file_fp = 498 { 499 youngest = TIME; 500 oldest = TIME; 501 crypto = "GUNK"; 502 }; 503 }, 504 { 505 file_name = "bar.txt"; 506 uuid = "UUID"; 507 action = remove; 508 edit = 509 { 510 revision = "1"; 511 encoding = none; 512 }; 513 edit_origin = 514 { 515 revision = "1"; 516 encoding = none; 517 }; 518 usage = source; 519 move = "baz.txt"; 520 deleted_by = 12; 521 }, 522 { 523 file_name = "baz.txt"; 524 uuid = "UUID"; 525 action = create; 526 edit = 527 { 528 revision = "3"; 529 encoding = none; 530 }; 531 edit_origin = 532 { 533 revision = "3"; 534 encoding = none; 535 }; 536 usage = source; 537 file_fp = 538 { 539 youngest = TIME; 540 oldest = TIME; 541 crypto = "GUNK"; 542 }; 543 diff_file_fp = 544 { 545 youngest = TIME; 546 oldest = TIME; 547 crypto = "GUNK"; 548 }; 549 move = "bar.txt"; 550 }, 551 { 552 file_name = "dir/foo.txt"; 553 uuid = "UUID"; 554 action = remove; 555 edit = 556 { 557 revision = "3"; 558 encoding = none; 559 }; 560 edit_origin = 561 { 562 revision = "3"; 563 encoding = none; 564 }; 565 usage = source; 566 diff_file_fp = 567 { 568 youngest = TIME; 569 oldest = TIME; 570 crypto = "GUNK"; 571 }; 572 deleted_by = 14; 573 }, 574 ]; 575 EOF 576 if test $? -ne 0; then no_result; fi 577 578 check_it ok $workproj/info/trunk.fs 579 580 activity="check aegis.conf baseline copy" 581 cat > $work/ok <<'EOF' 582 583 build_command = "exit 0"; 584 link_integration_directory = true; 585 586 history_get_command = "aesvt -check-out -edit ${quote $edit} " 587 "-history ${quote $history} -f ${quote $output}"; 588 history_put_command = "aesvt -check-in -history ${quote $history} " 589 "-f ${quote $input}"; 590 history_query_command = "aesvt -query -history ${quote $history}"; 591 history_content_limitation = binary_capable; 592 593 diff_command = "set +e; $diff $orig $i > $out; test $$? -le 1"; 594 merge_command = 595 "(diff3 -e $i $orig $mr | sed -e '/^w$$/d' -e '/^q$$/d'; echo '1,$$p') " 596 "| ed - $i > $out"; 597 patch_diff_command = 598 "set +e; $diff -C0 -L $index -L $index $orig $i > $out; test $$? -le 1"; 599 600 shell_safe_filenames = false; 601 EOF 602 if test $? -ne 0; then no_result; fi 603 604 diff ok $workproj/baseline/aegis.conf 605 if test $? -ne 0; then fail; fi 606 607 activity="check baz.txt baseline copy" 608 cat > $work/ok <<EOF 609 A simple text file 610 wit some more text. 611 more text again! 612 ancora piu\` test 613 EOF 614 if test $? -ne 0; then no_result; fi 615 616 diff ok $workproj/baseline/baz.txt 339 617 if test $? -ne 0; then fail; fi 340 618
Note: See TracChangeset
for help on using the changeset viewer.
