Ignore:
Timestamp:
05/24/08 16:31:33 (5 years ago)
Author:
<walter.franzini@…>
Hash name:
20080524143133-bb3d1-18ed85db6c0d8222f85ee1cc0ba6425e80f685dd
Message:

improved aegis target support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test-scripts/test-darcs2aegis-simple.sh

    r1548 r1549  
    33# Copyright (C) 2008 Walter Franzini 
    44# 
     5 
    56 
    67here=`pwd` 
     
    1415pass() 
    1516{ 
     17    echo "PASSED:" 
    1618    exit 0 
    1719} 
     
    6163if test $? -ne 0; then no_result; fi 
    6264 
     65cat > $work/darcs-repo/bar.txt <<EOF 
     66This is bar.txt 
     67EOF 
     68if test $? -ne 0; then no_result; fi 
     69 
     70darcs add bar.txt --repodir=$work/darcs-repo > log 2>&1 
     71if test $? -ne 0; then cat log; no_result; fi 
     72 
    6373darcs record --repodir=$work/darcs-repo -a -A Nobody --ignore-time \ 
    6474    -m "second commit" > log 2>&1 
     
    7181EOF 
    7282if test $? -ne 0; then no_result; fi 
     83 
     84darcs mv bar.txt baz.txt --repodir=$work/darcs-repo > log 2>&1 
     85if test $? -ne 0; then cat log; no_result; fi 
    7386 
    7487darcs record --repodir=$work/darcs-repo -a -A Nobody --ignore-time \ 
     
    190203 
    191204activity="run tailor" 
     205python $here/tailor -c $work/tailor.conf > tailor.log 2>&1 
     206if test $? -ne 0; then cat tailor.log; fail; fi 
     207 
     208cat > $work/ok <<EOF 
     2091 10 initial commit 
     2102 11 second commit 
     2113 12 third commit 
     212EOF 
     213if test $? -ne 0; then no_result; fi 
     214 
     215activity="check aegis project history" 
     216aegis -list project_history -unformatted 2> log | cut -d\  -f 1,7- > history 
     217if test $? -ne 0; then cat log; no_result; fi 
     218 
     219diff ok history 
     220if test $? -ne 0; then cat tailor.log; fail; fi 
     221 
     222# 
     223# add more darcs changes 
     224# 
     225cat > $work/darcs-repo/bar.txt <<EOF 
     226A simple text file 
     227wit some more text. 
     228more text again! 
     229ancora piu\` test 
     230EOF 
     231if test $? -ne 0; then no_result; fi 
     232 
     233darcs remove foo.txt --repodir=$work/darcs-repo > log 2>&1 
     234if test $? -ne 0; then cat log; no_result; fi 
     235 
     236cat > $work/logfile <<EOF 
     237fourth commit 
     238This text is now 
     239the description of the aegis change 
     240splitted on multiple lines. 
     241EOF 
     242if test $? -ne 0; then no_result; fi 
     243 
     244darcs record --repodir=$work/darcs-repo -a -A Nobody --ignore-time \ 
     245    --logfile $work/logfile > log 2>&1 
     246if test $? -ne 0; then cat log; no_result; fi 
     247 
     248activity="run tailor again" 
    192249python $here/tailor -c $work/tailor.conf > log 2>&1 
    193250if test $? -ne 0; then cat log; fail; fi 
    194251 
     252cat > $work/ok <<EOF 
     2531 10 initial commit 
     2542 11 second commit 
     2553 12 third commit 
     2564 13 fourth commit 
     257EOF 
     258if test $? -ne 0; then no_result; fi 
     259 
    195260activity="check aegis project history" 
    196 aegis -list project_history -unformatted 
    197 if test $? -ne 0; then cat log; no_result; fi 
     261aegis -list project_history -unformatted 2> log | cut -d\  -f 1,7- > history 
     262if test $? -ne 0; then cat log; no_result; fi 
     263 
     264diff ok history 
     265if test $? -ne 0; then fail; fi 
     266 
     267cat > $work/ok <<EOF 
     268brief_description = "fourth commit"; 
     269description = "This text is now the description of the aegis change splitted on\n\\ 
     270multiple lines."; 
     271cause = external_improvement; 
     272test_exempt = true; 
     273test_baseline_exempt = true; 
     274regression_test_exempt = true; 
     275architecture = 
     276[ 
     277        "unspecified", 
     278]; 
     279copyright_years = 
     280[ 
     281        `date +%Y`, 
     282]; 
     283EOF 
     284if test $? -ne 0; then no_result; fi 
     285 
     286activity="check project content" 
     287aegis -ca -l 13 > $work/change_attr 2> log 
     288if test $? -ne 0; then cat log; no_result; fi 
     289 
     290diff ok change_attr 
     291if test $? -ne 0; then fail; fi 
     292 
    198293 
    199294pass 
Note: See TracChangeset for help on using the changeset viewer.