1#!/bin/sh 2# 3# aegis - project change supervisor 4# Copyright (C) 1991-2008, 2012 Peter Miller 5# Copyright (C) 2008, 2010 Walter Franzini 6# 7# This program is free software; you can redistribute it and/or modify 8# it under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 3 of the License, or (at 10# your option) any later version. 11# 12# This program is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15# General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program. If not, see <http://www.gnu.org/licenses/>. 19# 20 21unset AEGIS_PROJECT 22unset AEGIS_CHANGE 23unset AEGIS_PATH 24unset AEGIS 25unset LINES 26unset COLS 27umask 022 28 29USER=${USER:-${LOGNAME:-`whoami`}} 30 31work=${AEGIS_TMP:-/tmp}/$$ 32 33here=`pwd` 34if test $? -ne 0; then exit 2; fi 35 36if test "$1" != "" ; then bin="$here/$1/bin"; else bin="$here/bin"; fi 37 38if test "$EXEC_SEARCH_PATH" != "" 39then 40 tpath= 41 hold="$IFS" 42 IFS=":$IFS" 43 for tpath2 in $EXEC_SEARCH_PATH 44 do 45 tpath=${tpath}${tpath2}/${1-.}/bin: 46 done 47 IFS="$hold" 48 PATH=${tpath}${PATH} 49else 50 PATH=${bin}:${PATH} 51fi 52export PATH 53 54activity="create working directory 55" 55 56no_result() 57{ 58 set +x 59 echo NO RESULT for test of core functionality "($activity)" 1>&2 60 cd $here 61 find $work -type d -user $USER -exec chmod u+w {} \; 62 rm -rf $work 63 exit 2 64} 65fail() 66{ 67 set +x 68 echo FAILED test of core functionality "($activity)" 1>&2 69 cd $here 70 find $work -type d -user $USER -exec chmod u+w {} \; 71 rm -rf $work 72 exit 1 73} 74pass() 75{ 76 set +x 77 echo PASSED 1>&2 78 cd $here 79 find $work -type d -user $USER -exec chmod u+w {} \; 80 rm -rf $work 81 exit 0 82} 83trap "no_result" 1 2 3 15 84 85check_it() 86{ 87 sed -e "s|$work|...|g" \ 88 -e 's|= 0; /.*|= TIME_NOT_SET;|' \ 89 -e 's|= [0-9][0-9]*; /.*|= TIME;|' \ 90 -e "s/\"$USER\"/\"USER\"/g" \ 91 -e 's/delta[0-9][0-9]*/delta/' \ 92 -e 's/19[0-9][0-9]/YYYY/' \ 93 -e 's/20[0-9][0-9]/YYYY/' \ 94 -e 's/delta_uuid = ".*"/delta_uuid = "UUID"/'\ 95 -e 's/node = ".*"/node = "NODE"/' \ 96 -e 's/crypto = ".*"/crypto = "GUNK"/' \ 97 < $1 > $work/sed.out 98 if test $? -ne 0; then fail; fi 99 diff $2 $work/sed.out 100 if test $? -ne 0; then fail; fi 101} 102 103# 104# some variable to make things earier to read 105# 106PAGER=cat 107export PAGER 108 109AEGIS_FLAGS="delete_file_preference = no_keep; \ 110 lock_wait_preference = always; \ 111 diff_preference = automatic_merge; \ 112 pager_preference = never; \ 113 persevere_preference = all; \ 114 log_file_preference = never;" 115export AEGIS_FLAGS 116AEGIS_THROTTLE=-1 117export AEGIS_THROTTLE 118 119worklib=$work/lib 120workproj=$work/foo.proj 121workchan=$work/foo.chan 122tmp=$work/tmp 123 124# 125# make the directories 126# 127rm -rf $work 128mkdir $work $work/lib 129if test $? -ne 0 ; then exit 2; fi 130chmod 777 $work/lib 131if test $? -ne 0 ; then exit 2; fi 132cd $work 133if test $? -ne 0 ; then exit 2; fi 134 135# 136# If the C++ compiler is called something other than "c++", as 137# discovered by the configure script, create a shell script called 138# "c++" which invokes the correct C++ compiler. Make sure the current 139# directory is in the path, so that it will be invoked. 140# 141if test "$CXX" != "c++" 142then 143 cat >> c++ << fubar 144#!/bin/sh 145exec ${CXX=g++} \$* 146fubar 147 if test $? -ne 0 ; then no_result; fi 148 chmod a+rx c++ 149 if test $? -ne 0 ; then no_result; fi 150 PATH=${work}:${PATH} 151 export PATH 152fi 153 154# 155# use the built-in error messages 156# 157AEGIS_MESSAGE_LIBRARY=$work/no-such-dir 158export AEGIS_MESSAGE_LIBRARY 159unset LANG 160unset LANGUAGE 161 162# 163# make a new project 164# and check files it should have made 165# 166activity="new project 166" 167$bin/aegis -newpro foo -version "" -dir $workproj -lib $worklib 168if test $? -ne 0 ; then fail; fi 169$bin/aegis -newpro -list -unf -lib $worklib > test.out 170if test $? -ne 0 ; then fail; fi 171grep '^foo ' < test.out > test.out2 172if test $? -ne 0 ; then no_result; fi 173cat > ok << 'fubar' 174foo .../foo.proj The "foo" program. 175fubar 176if test $? -ne 0 ; then no_result; fi 177check_it test.out2 ok 178 179# 180# check the contents of the various state files 181# 182cat > ok << 'fubar' 183next_test_number = 1; 184fubar 185if test $? -ne 0 ; then no_result; fi 186check_it $workproj/info/state ok 187 188TAB=`awk 'BEGIN{printf("%c", 9)}' /dev/null` 189 190sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 191brief_description = "The \"foo\" program."; 192description = "The \"foo\" program."; 193cause = internal_enhancement; 194test_exempt = false; 195test_baseline_exempt = false; 196regression_test_exempt = true; 197architecture = 198[ 199{TAB}"unspecified", 200]; 201state = being_developed; 202development_directory = "."; 203history = 204[ 205{TAB}{ 206{TAB}{TAB}when = TIME; 207{TAB}{TAB}what = new_change; 208{TAB}{TAB}who = "USER"; 209{TAB}}, 210{TAB}{ 211{TAB}{TAB}when = TIME; 212{TAB}{TAB}what = develop_begin; 213{TAB}{TAB}who = "USER"; 214{TAB}}, 215]; 216branch = 217{ 218{TAB}umask = 022; 219{TAB}developer_may_review = false; 220{TAB}developer_may_integrate = false; 221{TAB}reviewer_may_integrate = false; 222{TAB}developers_may_create_changes = false; 223{TAB}default_test_exemption = false; 224{TAB}default_test_regression_exemption = true; 225{TAB}skip_unlucky = false; 226{TAB}compress_database = false; 227{TAB}develop_end_action = goto_being_reviewed; 228{TAB}change = 229{TAB}[ 230{TAB}]; 231{TAB}administrator = 232{TAB}[ 233{TAB}{TAB}"USER", 234{TAB}]; 235{TAB}reuse_change_numbers = true; 236{TAB}protect_development_directory = false; 237}; 238fubar 239if test $? -ne 0 ; then no_result; fi 240check_it $workproj/info/trunk ok 241 242cat > ok << 'fubar' 243src = 244[ 245]; 246fubar 247if test $? -ne 0 ; then no_result; fi 248check_it $workproj/info/trunk.fs ok 249 250# 251# change project attributes 252# 253activity="project attributes 251" 254$bin/aegis -proatt -list --proj=foo -lib $worklib > test.out 255if test $? -ne 0 ; then fail; fi 256cat > ok << 'fubar' 257description = "The \"foo\" program."; 258developer_may_review = false; 259developer_may_integrate = false; 260reviewer_may_integrate = false; 261developers_may_create_changes = false; 262umask = 022; 263default_test_exemption = false; 264default_test_regression_exemption = true; 265minimum_change_number = 10; 266reuse_change_numbers = true; 267minimum_branch_number = 1; 268skip_unlucky = false; 269compress_database = false; 270develop_end_action = goto_being_reviewed; 271protect_development_directory = false; 272fubar 273if test $? -ne 0 ; then no_result; fi 274check_it test.out ok 275cat > $tmp << 'end' 276description = "A bogus project created to test things."; 277developer_may_review = true; 278developer_may_integrate = true; 279reviewer_may_integrate = true; 280minimum_change_number = 1; 281end 282if test $? -ne 0 ; then no_result; fi 283$bin/aegis -proatt -f $tmp -proj foo -lib $worklib 284if test $? -ne 0 ; then fail; fi 285 286# 287# create a new change 288# make sure it creates the files it should 289# 290activity="new change 288" 291cat > $tmp << 'end' 292brief_description = "This change is used to test the aegis functionality \ 293with respect to change descriptions."; 294cause = internal_bug; 295end 296if test $? -ne 0 ; then no_result; fi 297$bin/aegis -newcha -list -pro foo -lib $worklib > test.out 298if test $? -ne 0 ; then fail; fi 299$bin/aegis -new_change -f $tmp -project foo -lib $worklib 300if test $? -ne 0 ; then fail; fi 301 302# 303# check the contents of the various state files 304# 305sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 306brief_description = "This change is used to test the aegis functionality with respect to change descriptions."; 307description = "This change is used to test the aegis functionality with respect to change descriptions."; 308cause = internal_enhancement; 309test_exempt = false; 310test_baseline_exempt = true; 311regression_test_exempt = true; 312architecture = 313[ 314{TAB}"unspecified", 315]; 316state = awaiting_development; 317given_regression_test_exemption = true; 318history = 319[ 320{TAB}{ 321{TAB}{TAB}when = TIME; 322{TAB}{TAB}what = new_change; 323{TAB}{TAB}who = "USER"; 324{TAB}}, 325]; 326fubar 327if test $? -ne 0 ; then no_result; fi 328check_it $workproj/info/change/0/001 ok 329 330cat > ok << 'fubar' 331src = 332[ 333]; 334fubar 335if test $? -ne 0 ; then no_result; fi 336check_it $workproj/info/change/0/001.fs ok 337 338# 339# create a second change 340# make sure it creates the files it should 341# 342cat > $tmp << 'end' 343brief_description = "This change was added to make the various listings \ 344much more interesting."; 345cause = internal_bug; 346end 347$bin/aegis -new_change -f $tmp -project foo -lib $worklib 348if test $? -ne 0 ; then fail; fi 349cat > ok << 'fubar' 3501 awaiting_development This change is used to test the aegis functionality with respect to change descriptions. 3512 awaiting_development This change was added to make the various listings much more interesting. 352fubar 353if test $? -ne 0 ; then no_result; fi 354$bin/aegis -new_change -list -unf -pw=1000 -project foo -lib $worklib > test.out 355if test $? -ne 0 ; then fail; fi 356check_it test.out ok 357 358# 359# add a new developer 360# 361activity="new developer 359" 362$bin/aegis -newdev -list -pr foo -lib $worklib > test.out 363if test $? -ne 0 ; then fail; fi 364$bin/aegis -newdev $USER -p foo -lib $worklib 365if test $? -ne 0 ; then fail; fi 366$bin/aegis -newdev -list -pr foo -lib $worklib > test.out 367if test $? -ne 0 ; then fail; fi 368 369# 370# begin development of a change 371# check it made the files it should 372# 373activity="develop begin 371" 374$bin/aegis -devbeg -list -project foo -lib $worklib > test.out 375if test $? -ne 0 ; then fail; fi 376$bin/aegis -devbeg 1 -p foo -dir $workchan -lib $worklib 377if test $? -ne 0 ; then fail; fi 378if test ! -r $workproj/info/change/0/001 ; then fail; fi 379if test ! -r $worklib/user/$USER ; then fail; fi 380$bin/aegis -new_change -list -project foo -lib $worklib > test.out 381if test $? -ne 0 ; then fail; fi 382 383# 384# add a new files to the change 385# 386activity="new file 384" 387$bin/aegis -new_file -list -lib $worklib -proJ foo > test.out 388if test $? -ne 0 ; then fail; fi 389$bin/aegis -new_file $workchan/main.cc -nl -lib $worklib -Pro foo \ 390 -uuid aabbcccc-cccc-4dde-8eee-eeefff000001 391if test $? -ne 0 ; then fail; fi 392$bin/aegis -new_file $workchan/aegis.conf -nl -lib $worklib -p foo \ 393 -uuid aabbcccc-cccc-4dde-8eee-eeefff000002 394if test $? -ne 0 ; then fail; fi 395 396sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 397src = 398[ 399{TAB}{ 400{TAB}{TAB}file_name = "aegis.conf"; 401{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000002"; 402{TAB}{TAB}action = create; 403{TAB}{TAB}usage = config; 404{TAB}}, 405{TAB}{ 406{TAB}{TAB}file_name = "main.cc"; 407{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000001"; 408{TAB}{TAB}action = create; 409{TAB}{TAB}usage = source; 410{TAB}}, 411]; 412fubar 413if test $? -ne 0 ; then no_result; fi 414check_it $workproj/info/change/0/001.fs ok 415 416cat > $workchan/main.cc << 'end' 417int 418main(int argc, char **argv) 419{ 420 return 0; 421} 422end 423if test $? -ne 0 ; then no_result; fi 424 425cat > $workchan/aegis.conf << 'end' 426build_command = "rm -f foo; c++ -o foo -D'VERSION=\"$v\"' main.cc"; 427 428history_get_command = "aesvt -check-out -edit ${quote $edit} " 429 "-history ${quote $history} -f ${quote $output}"; 430history_put_command = "aesvt -check-in -history ${quote $history} " 431 "-f ${quote $input}"; 432history_query_command = "aesvt -query -history ${quote $history}"; 433history_content_limitation = binary_capable; 434 435diff_command = "set +e; diff $orig $i > $out; test $$? -le 1"; 436 437diff3_command = "(diff3 -e $mr $orig $i | sed -e '/^w$$/d' -e '/^q$$/d'; \ 438 echo '1,$$p' ) | ed - $mr > $out"; 439 440/* 441 * file templates 442 */ 443file_template = 444[ 445 { 446 pattern = [ "*" ]; 447 body = "hello\n"; 448 }, 449 { 450 pattern = [ "test/*/*.sh" ]; 451 body = "#!/bin/sh\nexit 1\n"; 452 } 453]; 454end 455if test $? -ne 0 ; then no_result; fi 456 457# 458# create a new test 459# 460activity="new test 457" 461$bin/aegis -nt -l -lib $worklib -p foo 462if test $? -ne 0 ; then fail; fi 463$bin/aegis -nt -lib $worklib -p foo -uuid aabbcccc-cccc-4dde-8eee-eeefff000004 464if test $? -ne 0 ; then fail; fi 465cat > $workchan/test/00/t0001a.sh << 'end' 466#!/bin/sh 467# 468# Project: "foo" 469# Change: 1 470# 471 472no_result() 473{ 474 echo WHIMPER 1>&2 475 exit 2 476} 477fail() 478{ 479 echo SHUZBUTT 1>&2 480 exit 1 481} 482pass() 483{ 484 exit 0 485} 486trap "no_result" 1 2 3 15 487 488./foo 489if test $? -ne 0; then fail; fi 490 491# it probably worked 492pass 493end 494 495# 496# build the change 497# 498activity="build 495" 499$bin/aegis -build -list -lib $worklib -p foo > test.out 2>&1 500if test $? -ne 0 ; then cat test.out; fail; fi 501$bin/aegis -build -nl -lib $worklib -p foo > test.out 2>&1 502if test $? -ne 0 ; then cat test.out;fail; fi 503if test ! -r $workproj/info/change/0/001 ; then fail; fi 504 505# 506# difference the change 507# 508activity="diff 505" 509$bin/aegis -diff -list -lib $worklib -p foo > test.out 2>&1 510if test $? -ne 0 ; then cat test.out; fail; fi 511$bin/aegis -diff -lib $worklib -p foo > test.out 2>&1 512if test $? -ne 0 ; then cat test.out; fail; fi 513 514# 515# test the change 516# 517activity="test 514" 518$bin/aegis -test -l -lib $worklib -p foo > test.out 2>&1 519if test $? -ne 0 ; then cat test.out; fail; fi 520$bin/aegis -test -lib $worklib -p foo -nl > test.out 2>&1 521if test $? -ne 0 ; then cat test.out; fail; fi 522if test ! -r $workproj/info/change/0/001 ; then fail ; fi 523 524$bin/aegis -ca -uuid aabbcccc-cccc-4dde-8eee-eeefff000003 \ 525 -c 1 -p foo -lib $worklib 526if test $? -ne 0 ; then fail; fi 527 528# 529# finish development of the change 530# 531activity="develop end 528" 532$bin/aegis -dev_end -list -lib $worklib -p foo > test.out 533if test $? -ne 0 ; then fail; fi 534$bin/aegis -dev_end -lib $worklib -p foo 535if test $? -ne 0 ; then fail; fi 536if test ! -r $workproj/info/change/0/001 ; then fail ; fi 537if test ! -r $workproj/info/state ; then fail ; fi 538if test ! -r $worklib/user/$USER ; then fail ; fi 539 540# 541# add a new reviewer 542# 543activity="new reviewer 540" 544$bin/aegis -newrev -list -pr foo -lib $worklib > test.out 2>&1 545if test $? -ne 0 ; then cat test.out; fail; fi 546$bin/aegis -newrev $USER -p foo -lib $worklib 547if test $? -ne 0 ; then fail; fi 548$bin/aegis -newrev -list -pr foo -lib $worklib > test.out 549if test $? -ne 0 ; then fail; fi 550 551# 552# fail the review 553# 554activity="review fail 551" 555$bin/aegis -review_fail -list -p foo -lib $worklib > test.out 556if test $? -ne 0 ; then fail; fi 557cat > $tmp << 'end' 558This is a failed review comment. 559end 560$bin/aegis -review_fail -f $tmp -chan 1 -proj foo -lib $worklib 561if test $? -ne 0 ; then fail; fi 562 563# 564# check the the file states are as they should be 565# 566activity="review fail ck.a 563" 567sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 568brief_description = "This change is used to test the aegis functionality with respect to change descriptions."; 569description = "This change is used to test the aegis functionality with respect to change descriptions."; 570cause = internal_enhancement; 571test_exempt = false; 572test_baseline_exempt = true; 573regression_test_exempt = true; 574architecture = 575[ 576{TAB}"unspecified", 577]; 578copyright_years = 579[ 580{TAB}YYYY, 581]; 582state = being_developed; 583given_regression_test_exemption = true; 584build_time = TIME; 585test_time = TIME; 586architecture_times = 587[ 588{TAB}{ 589{TAB}{TAB}variant = "unspecified"; 590{TAB}{TAB}node = "NODE"; 591{TAB}{TAB}build_time = TIME; 592{TAB}{TAB}test_time = TIME; 593{TAB}}, 594]; 595development_directory = ".../foo.chan"; 596history = 597[ 598{TAB}{ 599{TAB}{TAB}when = TIME; 600{TAB}{TAB}what = new_change; 601{TAB}{TAB}who = "USER"; 602{TAB}}, 603{TAB}{ 604{TAB}{TAB}when = TIME; 605{TAB}{TAB}what = develop_begin; 606{TAB}{TAB}who = "USER"; 607{TAB}}, 608{TAB}{ 609{TAB}{TAB}when = TIME; 610{TAB}{TAB}what = develop_end; 611{TAB}{TAB}who = "USER"; 612{TAB}}, 613{TAB}{ 614{TAB}{TAB}when = TIME; 615{TAB}{TAB}what = review_fail; 616{TAB}{TAB}who = "USER"; 617{TAB}{TAB}why = "This is a failed review comment."; 618{TAB}}, 619]; 620uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 621fubar 622if test $? -ne 0 ; then no_result; fi 623check_it $workproj/info/change/0/001 ok 624 625activity="review fail ck.b 621" 626sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 627src = 628[ 629{TAB}{ 630{TAB}{TAB}file_name = "aegis.conf"; 631{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000002"; 632{TAB}{TAB}action = create; 633{TAB}{TAB}usage = config; 634{TAB}{TAB}file_fp = 635{TAB}{TAB}{ 636{TAB}{TAB}{TAB}youngest = TIME; 637{TAB}{TAB}{TAB}oldest = TIME; 638{TAB}{TAB}{TAB}crypto = "GUNK"; 639{TAB}{TAB}}; 640{TAB}{TAB}diff_file_fp = 641{TAB}{TAB}{ 642{TAB}{TAB}{TAB}youngest = TIME; 643{TAB}{TAB}{TAB}oldest = TIME; 644{TAB}{TAB}{TAB}crypto = "GUNK"; 645{TAB}{TAB}}; 646{TAB}}, 647{TAB}{ 648{TAB}{TAB}file_name = "main.cc"; 649{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000001"; 650{TAB}{TAB}action = create; 651{TAB}{TAB}usage = source; 652{TAB}{TAB}file_fp = 653{TAB}{TAB}{ 654{TAB}{TAB}{TAB}youngest = TIME; 655{TAB}{TAB}{TAB}oldest = TIME; 656{TAB}{TAB}{TAB}crypto = "GUNK"; 657{TAB}{TAB}}; 658{TAB}{TAB}diff_file_fp = 659{TAB}{TAB}{ 660{TAB}{TAB}{TAB}youngest = TIME; 661{TAB}{TAB}{TAB}oldest = TIME; 662{TAB}{TAB}{TAB}crypto = "GUNK"; 663{TAB}{TAB}}; 664{TAB}}, 665{TAB}{ 666{TAB}{TAB}file_name = "test/00/t0001a.sh"; 667{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000004"; 668{TAB}{TAB}action = create; 669{TAB}{TAB}usage = test; 670{TAB}{TAB}file_fp = 671{TAB}{TAB}{ 672{TAB}{TAB}{TAB}youngest = TIME; 673{TAB}{TAB}{TAB}oldest = TIME; 674{TAB}{TAB}{TAB}crypto = "GUNK"; 675{TAB}{TAB}}; 676{TAB}{TAB}diff_file_fp = 677{TAB}{TAB}{ 678{TAB}{TAB}{TAB}youngest = TIME; 679{TAB}{TAB}{TAB}oldest = TIME; 680{TAB}{TAB}{TAB}crypto = "GUNK"; 681{TAB}{TAB}}; 682{TAB}{TAB}architecture_times = 683{TAB}{TAB}[ 684{TAB}{TAB}{TAB}{ 685{TAB}{TAB}{TAB}{TAB}variant = "unspecified"; 686{TAB}{TAB}{TAB}{TAB}test_time = TIME; 687{TAB}{TAB}{TAB}}, 688{TAB}{TAB}]; 689{TAB}}, 690]; 691fubar 692if test $? -ne 0 ; then no_result; fi 693check_it $workproj/info/change/0/001.fs ok 694 695if test ! -r $workproj/info/state ; then fail ; fi 696if test ! -r $workproj/info/trunk ; then fail ; fi 697if test ! -r $workproj/info/trunk.fs ; then fail ; fi 698if test ! -r $worklib/user/$USER ; then fail ; fi 699 700# 701# build the change again 702# and difference 703# and test 704# end finish, again 705# 706activity="build 702" 707$bin/aegis -build -nl -lib $worklib -p foo > test.out 2>&1 708if test $? -ne 0 ; then cat test.out; fail; fi 709activity="diff 705" 710$bin/aegis -diff -nl -lib $worklib -p foo > test.out 2>&1 711if test $? -ne 0 ; then cat test.out; fail; fi 712activity="test 708" 713$bin/aegis -test -nl -lib $worklib -p foo > test.out 2>&1 714if test $? -ne 0 ; then cat test.out; fail; fi 715activity="develop end 711" 716$bin/aegis -dev_end -lib $worklib -p foo 717if test $? -ne 0 ; then fail; fi 718if test ! -r $workproj/info/change/0/001 ; then fail ; fi 719if test ! -r $workproj/info/state ; then fail ; fi 720if test ! -r $worklib/user/$USER ; then fail ; fi 721 722# 723# pass the review 724# 725activity="review pass 721" 726$bin/aegis -review_pass -list -proj foo -lib $worklib > test.out 727if test $? -ne 0 ; then fail; fi 728$bin/aegis -review_pass -chan 1 -proj foo -lib $worklib 729if test $? -ne 0 ; then fail; fi 730if test ! -r $workproj/info/change/0/001 ; then fail ; fi 731if test ! -r $workproj/info/state ; then fail ; fi 732if test ! -r $worklib/user/$USER ; then fail ; fi 733 734# 735# add an integrator 736# 737activity="new integrator 733" 738$bin/aegis -newint -list -pr foo -lib $worklib > test.out 739if test $? -ne 0 ; then fail; fi 740$bin/aegis -newint $USER -p foo -lib $worklib 741if test $? -ne 0 ; then fail; fi 742$bin/aegis -newint -list -pr foo -lib $worklib > test.out 743if test $? -ne 0 ; then fail; fi 744 745# 746# start integrating 747# 748activity="integrate begin 744" 749$bin/aegis -intbeg -l -p foo -lib $worklib > test.out 2>&1 750if test $? -ne 0 ; then cat test.out; fail; fi 751$bin/aegis -intbeg 1 -p foo -lib $worklib > test.out 2>&1 752if test $? -ne 0 ; then cat test.out; fail; fi 753if test ! -r $workproj/info/change/0/001 ; then fail ; fi 754if test ! -r $workproj/info/state ; then fail ; fi 755if test ! -r $worklib/user/$USER ; then fail ; fi 756$bin/aegis -integrate_begin_undo -l -lib $worklib -p foo > test.out 2>&1 757if test $? -ne 0 ; then cat test.out; fail; fi 758 759# 760# make sure -chdir works 761# 762activity="chdir 758" 763$bin/aegis -cd -l -lib $worklib -p foo > test.out 2>&1 764if test $? -ne 0 ; then cat test.out; fail; fi 765dir=`$bin/aegis -cd aegis.conf -bl -p foo -lib $worklib` 766if test $? -ne 0 ; then fail; fi 767if test $dir != $workproj/baseline/aegis.conf ; then fail; fi 768dir=`$bin/aegis -cd -dd -p foo -c 1 aegis.conf -lib $worklib` 769if test $? -ne 0 ; then fail; fi 770if test $dir != $workchan/aegis.conf ; then fail; fi 771dir=`$bin/aegis -cd -p foo -c 1 aegis.conf -lib $worklib` 772if test $? -ne 0 ; then fail; fi 773if test $dir != $workproj/delta*/aegis.conf ; then fail; fi 774 775# 776# integrate build 777# 778activity="integration build 774" 779$bin/aegis -build -l -lib $worklib -p foo > test.out 2>&1 780if test $? -ne 0 ; then cat test.out; fail; fi 781$bin/aegis -build -nl -lib $worklib -p foo > test.out 2>&1 782if test $? -ne 0 ; then cat test.out; fail; fi 783$bin/aegis -test -nl -lib $worklib -p foo > test.out 2>&1 784if test $? -ne 0 ; then cat test.out; fail; fi 785if test ! -r $workproj/info/change/0/001 ; then fail ; fi 786if test -f $workproj/delta*/aegis.log ; then fail; fi 787 788# 789# fail the integration 790# 791activity="integrate fail 787" 792$bin/aegis -intfail -l -lib $worklib -p foo > test.out 2>&1 793if test $? -ne 0 ; then cat test.out; fail; fi 794cat > $tmp << 'end' 795This is a failed integration comment. 796end 797$bin/aegis -intfail -f $tmp -lib $worklib -p foo 798if test $? -ne 0 ; then fail; fi 799if test ! -r $workproj/info/change/0/001 ; then fail ; fi 800if test ! -r $workproj/info/state ; then fail ; fi 801if test ! -r $worklib/user/$USER ; then fail ; fi 802 803 804# 805# build the change again 806# and difference 807# and test 808# and finish, again 809# and review pass again 810# and start integrating again 811# 812activity="build 808" 813$bin/aegis -build -nl -lib $worklib -p foo > test.out 2>&1 814if test $? -ne 0 ; then cat test.out; fail; fi 815activity="diff 811" 816$bin/aegis -diff -nl -lib $worklib -p foo > test.out 2>&1 817if test $? -ne 0 ; then cat test.out; fail; fi 818activity="test 814" 819$bin/aegis -test -nl -lib $worklib -p foo > test.out 2>&1 820if test $? -ne 0 ; then cat test.out; fail; fi 821activity="develop end 817" 822$bin/aegis -dev_end -lib $worklib -p foo 823if test $? -ne 0 ; then fail; fi 824activity="review pass 820" 825$bin/aegis -review_pass -chan 1 -proj foo -lib $worklib 826if test $? -ne 0 ; then fail; fi 827activity="integrate begin 823" 828$bin/aegis -intbeg 1 -p foo -lib $worklib > test.out 2>&1 829if test $? -ne 0 ; then cat test.out; fail; fi 830if test ! -r $workproj/info/change/0/001 ; then fail ; fi 831if test ! -r $workproj/info/state ; then fail ; fi 832if test ! -r $worklib/user/$USER ; then fail ; fi 833 834# 835# build and test the integration 836# 837activity="integrate build 833" 838$bin/aegis -build -nl -lib $worklib -p foo > test.out 2>&1 839if test $? -ne 0 ; then cat test.out; fail; fi 840$bin/aegis -test -nl -lib $worklib -p foo > test.out 2>&1 841if test $? -ne 0 ; then cat test.out; fail; fi 842if test ! -r $workproj/info/change/0/001 ; then fail ; fi 843 844# 845# pass the integration 846# 847activity="integrate pass 843" 848$bin/aegis -intpass -l -lib $worklib -p foo > test.out 2>&1 849if test $? -ne 0 ; then cat test.out; fail; fi 850$bin/aegis -intpass -nl -lib $worklib -p foo > test.out 2>&1 851if test $? -ne 0 ; then cat test.out; fail; fi 852if test ! -r $workproj/info/change/0/001 ; then fail ; fi 853if test ! -r $workproj/info/state ; then fail ; fi 854if test ! -r $worklib/user/$USER ; then fail ; fi 855 856diff $workproj/info/change/0/001.pfs $workproj/info/trunk.fs 857test $? -eq 0 || fail 858 859# 860# check out the listings 861# 862activity="list 858" 863$bin/aegis -list -list -lib $worklib > test.out 864if test $? -ne 0 ; then fail; fi 865$bin/aegis -list chahist -c 1 -p foo -lib $worklib > test.out 866if test $? -ne 0 ; then cat test.out; fail; fi 867activity="check 863" 868sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 869brief_description = "This change is used to test the aegis functionality with respect to change descriptions."; 870description = "This change is used to test the aegis functionality with respect to change descriptions."; 871cause = internal_enhancement; 872test_exempt = false; 873test_baseline_exempt = true; 874regression_test_exempt = true; 875architecture = 876[ 877{TAB}"unspecified", 878]; 879copyright_years = 880[ 881{TAB}YYYY, 882]; 883attribute = 884[ 885{TAB}{ 886{TAB}{TAB}name = "aegis:history_get_command"; 887{TAB}{TAB}value = "aesvt -check-out -edit ${quote $edit} -history ${quote $history} -f ${quote $output}"; 888{TAB}}, 889]; 890state = completed; 891given_regression_test_exemption = true; 892delta_number = 1; 893delta_uuid = "UUID"; 894history = 895[ 896{TAB}{ 897{TAB}{TAB}when = TIME; 898{TAB}{TAB}what = new_change; 899{TAB}{TAB}who = "USER"; 900{TAB}}, 901{TAB}{ 902{TAB}{TAB}when = TIME; 903{TAB}{TAB}what = develop_begin; 904{TAB}{TAB}who = "USER"; 905{TAB}}, 906{TAB}{ 907{TAB}{TAB}when = TIME; 908{TAB}{TAB}what = develop_end; 909{TAB}{TAB}who = "USER"; 910{TAB}}, 911{TAB}{ 912{TAB}{TAB}when = TIME; 913{TAB}{TAB}what = review_fail; 914{TAB}{TAB}who = "USER"; 915{TAB}{TAB}why = "This is a failed review comment."; 916{TAB}}, 917{TAB}{ 918{TAB}{TAB}when = TIME; 919{TAB}{TAB}what = develop_end; 920{TAB}{TAB}who = "USER"; 921{TAB}}, 922{TAB}{ 923{TAB}{TAB}when = TIME; 924{TAB}{TAB}what = review_pass; 925{TAB}{TAB}who = "USER"; 926{TAB}}, 927{TAB}{ 928{TAB}{TAB}when = TIME; 929{TAB}{TAB}what = integrate_begin; 930{TAB}{TAB}who = "USER"; 931{TAB}}, 932{TAB}{ 933{TAB}{TAB}when = TIME; 934{TAB}{TAB}what = integrate_fail; 935{TAB}{TAB}who = "USER"; 936{TAB}{TAB}why = "This is a failed integration comment."; 937{TAB}}, 938{TAB}{ 939{TAB}{TAB}when = TIME; 940{TAB}{TAB}what = develop_end; 941{TAB}{TAB}who = "USER"; 942{TAB}}, 943{TAB}{ 944{TAB}{TAB}when = TIME; 945{TAB}{TAB}what = review_pass; 946{TAB}{TAB}who = "USER"; 947{TAB}}, 948{TAB}{ 949{TAB}{TAB}when = TIME; 950{TAB}{TAB}what = integrate_begin; 951{TAB}{TAB}who = "USER"; 952{TAB}}, 953{TAB}{ 954{TAB}{TAB}when = TIME; 955{TAB}{TAB}what = integrate_pass; 956{TAB}{TAB}who = "USER"; 957{TAB}}, 958]; 959uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 960fubar 961if test $? -ne 0 ; then no_result; fi 962check_it $workproj/info/change/0/001 ok 963 964activity="check 959" 965sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 966src = 967[ 968{TAB}{ 969{TAB}{TAB}file_name = "aegis.conf"; 970{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000002"; 971{TAB}{TAB}action = create; 972{TAB}{TAB}edit = 973{TAB}{TAB}{ 974{TAB}{TAB}{TAB}revision = "1"; 975{TAB}{TAB}{TAB}encoding = none; 976{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 977{TAB}{TAB}}; 978{TAB}{TAB}usage = config; 979{TAB}}, 980{TAB}{ 981{TAB}{TAB}file_name = "main.cc"; 982{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000001"; 983{TAB}{TAB}action = create; 984{TAB}{TAB}edit = 985{TAB}{TAB}{ 986{TAB}{TAB}{TAB}revision = "1"; 987{TAB}{TAB}{TAB}encoding = none; 988{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 989{TAB}{TAB}}; 990{TAB}{TAB}usage = source; 991{TAB}}, 992{TAB}{ 993{TAB}{TAB}file_name = "test/00/t0001a.sh"; 994{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000004"; 995{TAB}{TAB}action = create; 996{TAB}{TAB}edit = 997{TAB}{TAB}{ 998{TAB}{TAB}{TAB}revision = "1"; 999{TAB}{TAB}{TAB}encoding = none; 1000{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 1001{TAB}{TAB}}; 1002{TAB}{TAB}usage = test; 1003{TAB}}, 1004]; 1005fubar 1006if test $? -ne 0 ; then no_result; fi 1007activity="list 1002" 1008check_it $workproj/info/change/0/001.fs ok 1009 1010activity="check 1004" 1011sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 1012brief_description = "A bogus project created to test things."; 1013description = "The \"foo\" program."; 1014cause = internal_enhancement; 1015test_exempt = false; 1016test_baseline_exempt = false; 1017regression_test_exempt = true; 1018architecture = 1019[ 1020{TAB}"unspecified", 1021]; 1022copyright_years = 1023[ 1024{TAB}YYYY, 1025]; 1026state = being_developed; 1027build_time = TIME; 1028test_time = TIME; 1029architecture_times = 1030[ 1031{TAB}{ 1032{TAB}{TAB}variant = "unspecified"; 1033{TAB}{TAB}node = "NODE"; 1034{TAB}{TAB}build_time = TIME; 1035{TAB}{TAB}test_time = TIME; 1036{TAB}}, 1037]; 1038development_directory = "."; 1039history = 1040[ 1041{TAB}{ 1042{TAB}{TAB}when = TIME; 1043{TAB}{TAB}what = new_change; 1044{TAB}{TAB}who = "USER"; 1045{TAB}}, 1046{TAB}{ 1047{TAB}{TAB}when = TIME; 1048{TAB}{TAB}what = develop_begin; 1049{TAB}{TAB}who = "USER"; 1050{TAB}}, 1051]; 1052branch = 1053{ 1054{TAB}umask = 022; 1055{TAB}developer_may_review = true; 1056{TAB}developer_may_integrate = true; 1057{TAB}reviewer_may_integrate = true; 1058{TAB}developers_may_create_changes = false; 1059{TAB}default_test_exemption = false; 1060{TAB}default_test_regression_exemption = true; 1061{TAB}skip_unlucky = false; 1062{TAB}compress_database = false; 1063{TAB}develop_end_action = goto_being_reviewed; 1064{TAB}history = 1065{TAB}[ 1066{TAB}{TAB}{ 1067{TAB}{TAB}{TAB}delta_number = 1; 1068{TAB}{TAB}{TAB}change_number = 1; 1069{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 1070{TAB}{TAB}{TAB}when = TIME; 1071{TAB}{TAB}{TAB}is_a_branch = no; 1072{TAB}{TAB}}, 1073{TAB}]; 1074{TAB}change = 1075{TAB}[ 1076{TAB}{TAB}1, 1077{TAB}{TAB}2, 1078{TAB}]; 1079{TAB}administrator = 1080{TAB}[ 1081{TAB}{TAB}"USER", 1082{TAB}]; 1083{TAB}developer = 1084{TAB}[ 1085{TAB}{TAB}"USER", 1086{TAB}]; 1087{TAB}reviewer = 1088{TAB}[ 1089{TAB}{TAB}"USER", 1090{TAB}]; 1091{TAB}integrator = 1092{TAB}[ 1093{TAB}{TAB}"USER", 1094{TAB}]; 1095{TAB}minimum_change_number = 1; 1096{TAB}reuse_change_numbers = true; 1097{TAB}protect_development_directory = false; 1098}; 1099fubar 1100if test $? -ne 0 ; then no_result; fi 1101check_it $workproj/info/trunk ok 1102 1103# 1104# start work on change 2 1105# 1106activity="develop begin 1100" 1107$bin/aegis -devbeg 2 -p foo -dir $workchan -lib $worklib 1108if test $? -ne 0 ; then fail; fi 1109$bin/aegis -cp -l -unf -lib $worklib -p foo > test.out 1110if test $? -ne 0 ; then fail; fi 1111cat > ok << 'fubar' 1112config 1 aegis.conf 1113source 1 main.cc 1114test 1 test/00/t0001a.sh 1115fubar 1116if test $? -ne 0 ; then no_result; fi 1117check_it test.out ok 1118 1119# 1120# copy a file into the change 1121# 1122activity="copy file 1116" 1123$bin/aegis -cp $workchan/main.cc -nl -lib $worklib -p foo 1124if test $? -ne 0 ; then fail; fi 1125if test ! -r $workproj/info/change/0/002 ; then fail ; fi 1126if test ! -r $workproj/info/state ; then fail ; fi 1127if test ! -r $worklib/user/$USER ; then fail ; fi 1128 1129# 1130# change the file 1131# 1132cat > $workchan/main.cc << 'end' 1133#include <stdlib.h> 1134#include <stdio.h> 1135 1136int 1137main(int argc, char **argv) 1138{ 1139 if (argc != 1) 1140 { 1141 fprintf(stderr, "usage: %s\n", argv[0]); 1142 exit(1); 1143 } 1144 printf("hello, world\n"); 1145 return 0; 1146} 1147end 1148 1149# 1150# need another test 1151# 1152activity="new test 1146" 1153$bin/aegis -nt -lib $worklib -p foo -uuid aabbcccc-cccc-4dde-8eee-eeefff000005 1154if test $? -ne 0 ; then fail; fi 1155 1156cat > $workchan/test/00/t0002a.sh << 'end' 1157#!/bin/sh 1158# 1159# Project: "foo" 1160# Change: 2 1161# 1162 1163no_result() 1164{ 1165 echo WHIMPER 1>&2 1166 exit 2 1167} 1168fail() 1169{ 1170 echo SHUZBUTT 1>&2 1171 exit 1 1172} 1173pass() 1174{ 1175 exit 0 1176} 1177trap "no_result" 1 2 3 15 1178 1179./foo > /dev/null 2>&1 1180test $? -eq 0 || fail 1181 1182# should complain 1183./foo ickky 1184if test $? -ne 1; then fail; fi 1185 1186# it probably worked 1187pass 1188end 1189 1190# 1191# build the change 1192# diff the change 1193# test the change 1194# 1195activity="build 1188" 1196$bin/aegis -b -nl -lib $worklib -p foo > test.out 2>&1 1197if test $? -ne 0 ; then cat test.out; fail; fi 1198activity="diff 1191" 1199$bin/aegis -diff -nl -lib $worklib -p foo > test.out 2>&1 1200if test $? -ne 0 ; then cat test.out; fail; fi 1201activity="test 1194" 1202$bin/aegis -test -nl -lib $worklib -p foo > test.out 2>&1 1203if test $? -ne 0 ; then cat test.out; fail; fi 1204$bin/aegis -test -bl -nl -lib $worklib -p foo > test.out 2>&1 1205if test $? -ne 0 ; then cat test.out; fail; fi 1206if test ! -r $workchan/main.cc,D ; then fail ; fi 1207 1208# 1209# end development 1210# review pass 1211# start integrating 1212# 1213activity="devlop end 1206" 1214$bin/aegis -ca -uuid aabbcccc-cccc-4dde-8eee-eeefff000006 -lib $worklib -p foo 1215if test $? -ne 0 ; then fail; fi 1216$bin/aegis -devend -lib $worklib -p foo 1217if test $? -ne 0 ; then fail; fi 1218activity="review pass 1211" 1219$bin/aegis -revpass -c 2 -p foo -lib $worklib 1220if test $? -ne 0 ; then fail; fi 1221activity="integrate begin 1214" 1222$bin/aegis -intbeg -c 2 -p foo -lib $worklib > test.out 2>&1 1223if test $? -ne 0 ; then cat test.out; fail; fi 1224 1225sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 1226brief_description = "This change was added to make the various listings much more interesting."; 1227description = "This change was added to make the various listings much more interesting."; 1228cause = internal_enhancement; 1229test_exempt = false; 1230test_baseline_exempt = false; 1231regression_test_exempt = true; 1232architecture = 1233[ 1234{TAB}"unspecified", 1235]; 1236copyright_years = 1237[ 1238{TAB}YYYY, 1239]; 1240state = being_integrated; 1241given_regression_test_exemption = true; 1242delta_number = 2; 1243delta_uuid = "UUID"; 1244project_file_command_sync = 1; 1245development_directory = ".../foo.chan"; 1246integration_directory = "delta.002"; 1247history = 1248[ 1249{TAB}{ 1250{TAB}{TAB}when = TIME; 1251{TAB}{TAB}what = new_change; 1252{TAB}{TAB}who = "USER"; 1253{TAB}}, 1254{TAB}{ 1255{TAB}{TAB}when = TIME; 1256{TAB}{TAB}what = develop_begin; 1257{TAB}{TAB}who = "USER"; 1258{TAB}}, 1259{TAB}{ 1260{TAB}{TAB}when = TIME; 1261{TAB}{TAB}what = develop_end; 1262{TAB}{TAB}who = "USER"; 1263{TAB}}, 1264{TAB}{ 1265{TAB}{TAB}when = TIME; 1266{TAB}{TAB}what = review_pass; 1267{TAB}{TAB}who = "USER"; 1268{TAB}}, 1269{TAB}{ 1270{TAB}{TAB}when = TIME; 1271{TAB}{TAB}what = integrate_begin; 1272{TAB}{TAB}who = "USER"; 1273{TAB}}, 1274]; 1275uuid = "aabbcccc-cccc-4dde-8eee-eeefff000006"; 1276fubar 1277if test $? -ne 0 ; then no_result; fi 1278check_it $workproj/info/change/0/002 ok 1279 1280# 1281# build the integration 1282# test the integration 1283# test the integration against the baseline 1284# 1285activity="integrate build 1277" 1286$bin/aegis -b -nl -lib $worklib -p foo > test.out 2>&1 1287if test $? -ne 0 ; then cat test.out; fail; fi 1288activity="integrate test 1280" 1289$bin/aegis -t -nl -lib $worklib -p foo > test.out 2>&1 1290if test $? -ne 0 ; then cat test.out; fail; fi 1291$bin/aegis -t -bl -nl -lib $worklib -p foo > test.out 2>&1 1292if test $? -ne 0 ; then cat test.out; fail; fi 1293 1294# 1295# pass the integration 1296# make sure it create the files, etc 1297# 1298activity="integrate pass 1290" 1299$bin/aegis -intpass -nl -lib $worklib -p foo > test.out 2>&1 1300if test $? -ne 0 ; then cat test.out; fail; fi 1301 1302diff $workproj/info/change/0/002.pfs $workproj/info/trunk.fs 1303test $? -eq 0 || fail 1304 1305# also, the 001.pfs file should still be there, 1306# and should now be different to the trunk file state 1307activity="project file state cache 1299" 1308diff $workproj/info/change/0/001.pfs $workproj/info/trunk.fs > LOG 2>&1 1309if test $? -ne 1 1310then 1311 echo "The files are supposed to be different" 1312 cat LOG 1313 fail 1314fi 1315 1316sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 1317brief_description = "This change was added to make the various listings much more interesting."; 1318description = "This change was added to make the various listings much more interesting."; 1319cause = internal_enhancement; 1320test_exempt = false; 1321test_baseline_exempt = false; 1322regression_test_exempt = true; 1323architecture = 1324[ 1325{TAB}"unspecified", 1326]; 1327copyright_years = 1328[ 1329{TAB}YYYY, 1330]; 1331attribute = 1332[ 1333{TAB}{ 1334{TAB}{TAB}name = "aegis:history_get_command"; 1335{TAB}{TAB}value = "aesvt -check-out -edit ${quote $edit} -history ${quote $history} -f ${quote $output}"; 1336{TAB}}, 1337]; 1338state = completed; 1339given_regression_test_exemption = true; 1340delta_number = 2; 1341delta_uuid = "UUID"; 1342project_file_command_sync = 1; 1343history = 1344[ 1345{TAB}{ 1346{TAB}{TAB}when = TIME; 1347{TAB}{TAB}what = new_change; 1348{TAB}{TAB}who = "USER"; 1349{TAB}}, 1350{TAB}{ 1351{TAB}{TAB}when = TIME; 1352{TAB}{TAB}what = develop_begin; 1353{TAB}{TAB}who = "USER"; 1354{TAB}}, 1355{TAB}{ 1356{TAB}{TAB}when = TIME; 1357{TAB}{TAB}what = develop_end; 1358{TAB}{TAB}who = "USER"; 1359{TAB}}, 1360{TAB}{ 1361{TAB}{TAB}when = TIME; 1362{TAB}{TAB}what = review_pass; 1363{TAB}{TAB}who = "USER"; 1364{TAB}}, 1365{TAB}{ 1366{TAB}{TAB}when = TIME; 1367{TAB}{TAB}what = integrate_begin; 1368{TAB}{TAB}who = "USER"; 1369{TAB}}, 1370{TAB}{ 1371{TAB}{TAB}when = TIME; 1372{TAB}{TAB}what = integrate_pass; 1373{TAB}{TAB}who = "USER"; 1374{TAB}}, 1375]; 1376uuid = "aabbcccc-cccc-4dde-8eee-eeefff000006"; 1377fubar 1378if test $? -ne 0 ; then no_result; fi 1379check_it $workproj/info/change/0/002 ok 1380activity="integrate pass 1372" 1381 1382sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 1383src = 1384[ 1385{TAB}{ 1386{TAB}{TAB}file_name = "main.cc"; 1387{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000001"; 1388{TAB}{TAB}action = modify; 1389{TAB}{TAB}edit = 1390{TAB}{TAB}{ 1391{TAB}{TAB}{TAB}revision = "2"; 1392{TAB}{TAB}{TAB}encoding = none; 1393{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000006"; 1394{TAB}{TAB}}; 1395{TAB}{TAB}edit_origin = 1396{TAB}{TAB}{ 1397{TAB}{TAB}{TAB}revision = "1"; 1398{TAB}{TAB}{TAB}encoding = none; 1399{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 1400{TAB}{TAB}}; 1401{TAB}{TAB}usage = source; 1402{TAB}}, 1403{TAB}{ 1404{TAB}{TAB}file_name = "test/00/t0002a.sh"; 1405{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000005"; 1406{TAB}{TAB}action = create; 1407{TAB}{TAB}edit = 1408{TAB}{TAB}{ 1409{TAB}{TAB}{TAB}revision = "1"; 1410{TAB}{TAB}{TAB}encoding = none; 1411{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000006"; 1412{TAB}{TAB}}; 1413{TAB}{TAB}usage = test; 1414{TAB}}, 1415]; 1416fubar 1417if test $? -ne 0 ; then no_result; fi 1418check_it $workproj/info/change/0/002.fs ok 1419activity="integrate pass 1410" 1420cat > ok << 'fubar' 1421next_test_number = 3; 1422fubar 1423if test $? -ne 0 ; then no_result; fi 1424check_it $workproj/info/state ok 1425 1426activity="integrate pass 1416" 1427sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 1428brief_description = "A bogus project created to test things."; 1429description = "The \"foo\" program."; 1430cause = internal_enhancement; 1431test_exempt = false; 1432test_baseline_exempt = false; 1433regression_test_exempt = true; 1434architecture = 1435[ 1436{TAB}"unspecified", 1437]; 1438copyright_years = 1439[ 1440{TAB}YYYY, 1441]; 1442state = being_developed; 1443build_time = TIME; 1444test_time = TIME; 1445test_baseline_time = TIME; 1446architecture_times = 1447[ 1448{TAB}{ 1449{TAB}{TAB}variant = "unspecified"; 1450{TAB}{TAB}node = "NODE"; 1451{TAB}{TAB}build_time = TIME; 1452{TAB}{TAB}test_time = TIME; 1453{TAB}{TAB}test_baseline_time = TIME; 1454{TAB}}, 1455]; 1456development_directory = "."; 1457history = 1458[ 1459{TAB}{ 1460{TAB}{TAB}when = TIME; 1461{TAB}{TAB}what = new_change; 1462{TAB}{TAB}who = "USER"; 1463{TAB}}, 1464{TAB}{ 1465{TAB}{TAB}when = TIME; 1466{TAB}{TAB}what = develop_begin; 1467{TAB}{TAB}who = "USER"; 1468{TAB}}, 1469]; 1470branch = 1471{ 1472{TAB}umask = 022; 1473{TAB}developer_may_review = true; 1474{TAB}developer_may_integrate = true; 1475{TAB}reviewer_may_integrate = true; 1476{TAB}developers_may_create_changes = false; 1477{TAB}default_test_exemption = false; 1478{TAB}default_test_regression_exemption = true; 1479{TAB}skip_unlucky = false; 1480{TAB}compress_database = false; 1481{TAB}develop_end_action = goto_being_reviewed; 1482{TAB}history = 1483{TAB}[ 1484{TAB}{TAB}{ 1485{TAB}{TAB}{TAB}delta_number = 1; 1486{TAB}{TAB}{TAB}change_number = 1; 1487{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 1488{TAB}{TAB}{TAB}when = TIME; 1489{TAB}{TAB}{TAB}is_a_branch = no; 1490{TAB}{TAB}}, 1491{TAB}{TAB}{ 1492{TAB}{TAB}{TAB}delta_number = 2; 1493{TAB}{TAB}{TAB}change_number = 2; 1494{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000006"; 1495{TAB}{TAB}{TAB}when = TIME; 1496{TAB}{TAB}{TAB}is_a_branch = no; 1497{TAB}{TAB}}, 1498{TAB}]; 1499{TAB}change = 1500{TAB}[ 1501{TAB}{TAB}1, 1502{TAB}{TAB}2, 1503{TAB}]; 1504{TAB}administrator = 1505{TAB}[ 1506{TAB}{TAB}"USER", 1507{TAB}]; 1508{TAB}developer = 1509{TAB}[ 1510{TAB}{TAB}"USER", 1511{TAB}]; 1512{TAB}reviewer = 1513{TAB}[ 1514{TAB}{TAB}"USER", 1515{TAB}]; 1516{TAB}integrator = 1517{TAB}[ 1518{TAB}{TAB}"USER", 1519{TAB}]; 1520{TAB}minimum_change_number = 1; 1521{TAB}reuse_change_numbers = true; 1522{TAB}protect_development_directory = false; 1523}; 1524fubar 1525if test $? -ne 0 ; then no_result; fi 1526check_it $workproj/info/trunk ok 1527 1528activity="integrate pass 1517" 1529sed "s/{TAB}/${TAB}/g" > ok << 'fubar' 1530src = 1531[ 1532{TAB}{ 1533{TAB}{TAB}file_name = "aegis.conf"; 1534{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000002"; 1535{TAB}{TAB}action = create; 1536{TAB}{TAB}edit = 1537{TAB}{TAB}{ 1538{TAB}{TAB}{TAB}revision = "1"; 1539{TAB}{TAB}{TAB}encoding = none; 1540{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 1541{TAB}{TAB}}; 1542{TAB}{TAB}edit_origin = 1543{TAB}{TAB}{ 1544{TAB}{TAB}{TAB}revision = "1"; 1545{TAB}{TAB}{TAB}encoding = none; 1546{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 1547{TAB}{TAB}}; 1548{TAB}{TAB}usage = config; 1549{TAB}{TAB}file_fp = 1550{TAB}{TAB}{ 1551{TAB}{TAB}{TAB}youngest = TIME; 1552{TAB}{TAB}{TAB}oldest = TIME; 1553{TAB}{TAB}{TAB}crypto = "GUNK"; 1554{TAB}{TAB}}; 1555{TAB}}, 1556{TAB}{ 1557{TAB}{TAB}file_name = "main.cc"; 1558{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000001"; 1559{TAB}{TAB}action = create; 1560{TAB}{TAB}edit = 1561{TAB}{TAB}{ 1562{TAB}{TAB}{TAB}revision = "2"; 1563{TAB}{TAB}{TAB}encoding = none; 1564{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000006"; 1565{TAB}{TAB}}; 1566{TAB}{TAB}edit_origin = 1567{TAB}{TAB}{ 1568{TAB}{TAB}{TAB}revision = "2"; 1569{TAB}{TAB}{TAB}encoding = none; 1570{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000006"; 1571{TAB}{TAB}}; 1572{TAB}{TAB}usage = source; 1573{TAB}{TAB}file_fp = 1574{TAB}{TAB}{ 1575{TAB}{TAB}{TAB}youngest = TIME; 1576{TAB}{TAB}{TAB}oldest = TIME; 1577{TAB}{TAB}{TAB}crypto = "GUNK"; 1578{TAB}{TAB}}; 1579{TAB}{TAB}test = 1580{TAB}{TAB}[ 1581{TAB}{TAB}{TAB}"test/00/t0001a.sh", 1582{TAB}{TAB}{TAB}"test/00/t0002a.sh", 1583{TAB}{TAB}]; 1584{TAB}}, 1585{TAB}{ 1586{TAB}{TAB}file_name = "test/00/t0001a.sh"; 1587{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000004"; 1588{TAB}{TAB}action = create; 1589{TAB}{TAB}edit = 1590{TAB}{TAB}{ 1591{TAB}{TAB}{TAB}revision = "1"; 1592{TAB}{TAB}{TAB}encoding = none; 1593{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 1594{TAB}{TAB}}; 1595{TAB}{TAB}edit_origin = 1596{TAB}{TAB}{ 1597{TAB}{TAB}{TAB}revision = "1"; 1598{TAB}{TAB}{TAB}encoding = none; 1599{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000003"; 1600{TAB}{TAB}}; 1601{TAB}{TAB}usage = test; 1602{TAB}{TAB}file_fp = 1603{TAB}{TAB}{ 1604{TAB}{TAB}{TAB}youngest = TIME; 1605{TAB}{TAB}{TAB}oldest = TIME; 1606{TAB}{TAB}{TAB}crypto = "GUNK"; 1607{TAB}{TAB}}; 1608{TAB}{TAB}architecture_times = 1609{TAB}{TAB}[ 1610{TAB}{TAB}{TAB}{ 1611{TAB}{TAB}{TAB}{TAB}variant = "unspecified"; 1612{TAB}{TAB}{TAB}{TAB}test_time = TIME; 1613{TAB}{TAB}{TAB}}, 1614{TAB}{TAB}]; 1615{TAB}}, 1616{TAB}{ 1617{TAB}{TAB}file_name = "test/00/t0002a.sh"; 1618{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000005"; 1619{TAB}{TAB}action = create; 1620{TAB}{TAB}edit = 1621{TAB}{TAB}{ 1622{TAB}{TAB}{TAB}revision = "1"; 1623{TAB}{TAB}{TAB}encoding = none; 1624{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000006"; 1625{TAB}{TAB}}; 1626{TAB}{TAB}edit_origin = 1627{TAB}{TAB}{ 1628{TAB}{TAB}{TAB}revision = "1"; 1629{TAB}{TAB}{TAB}encoding = none; 1630{TAB}{TAB}{TAB}uuid = "aabbcccc-cccc-4dde-8eee-eeefff000006"; 1631{TAB}{TAB}}; 1632{TAB}{TAB}usage = test; 1633{TAB}{TAB}file_fp = 1634{TAB}{TAB}{ 1635{TAB}{TAB}{TAB}youngest = TIME; 1636{TAB}{TAB}{TAB}oldest = TIME; 1637{TAB}{TAB}{TAB}crypto = "GUNK"; 1638{TAB}{TAB}}; 1639{TAB}{TAB}architecture_times = 1640{TAB}{TAB}[ 1641{TAB}{TAB}{TAB}{ 1642{TAB}{TAB}{TAB}{TAB}variant = "unspecified"; 1643{TAB}{TAB}{TAB}{TAB}test_time = TIME; 1644{TAB}{TAB}{TAB}{TAB}test_baseline_time = TIME; 1645{TAB}{TAB}{TAB}}, 1646{TAB}{TAB}]; 1647{TAB}}, 1648]; 1649fubar 1650if test $? -ne 0 ; then no_result; fi 1651check_it $workproj/info/trunk.fs ok 1652activity="integrate pass 1641" 1653cat > ok << 'fubar' 1654own = 1655[ 1656]; 1657fubar 1658if test $? -ne 0 ; then no_result; fi 1659check_it $worklib/user/$USER ok 1660$bin/aegis -l projhist -unf -p foo -lib $worklib > test.out 2>&1 1661if test $? -ne 0 ; then cat test.out; fail; fi 1662 1663# should be no automatic logging 1664if test "`find $work -name 'aegis.log' -print`" != "" ; then fail; fi 1665 1666# 1667# the things tested in this test, worked 1668# 1669pass 1670 1671 1672# vim: set ts=8 sw=4 et : 1673