Changeset 1580


Ignore:
Timestamp:
May 23, 2012, 3:50:06 PM (7 years ago)
Author:
bruno
Message:

Adding pbcl for afio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/t/pbtest

    r1579 r1580  
    3939#Taken from Lab document originally
    4040# SVN repo setup
    41 sudo su - pbtest -c "svnadmin create $PBTEST/svn"
     41sudopbtest "svnadmin create $PBTEST/svn"
    4242cat > /tmp/authz << EOF
    4343[/]
     
    6161sudo mv /tmp/svnserve.conf ~pbtest/svn/conf/svnserve.conf
    6262sudo chown pbtest:pbtest ~pbtest/svn/conf/authz ~pbtest/svn/conf/passwd ~pbtest/svn/conf/svnserve.conf
    63 sudo su - pbtest -c "killall svnserve ; svnserve -d -r ~pbtest/svn"
    64 sudo su - pbtest -c "mkdir pb ftp ve .ssh; chmod 700 .ssh"
    65 
    66 sudo su - pbtest -c "pb --version"
    67 sudo su - pbtest -c "pbdistrocheck"
    68 sudo su - pbtest -c "pb clean"
    69 sudo su - pbtest -c "pb -p afio getconf"
     63sudopbtest "killall svnserve ; svnserve -d -r ~pbtest/svn"
     64sudopbtest "mkdir pb ftp ve .ssh; chmod 700 .ssh"
     65
     66sudopbtest "pb --version"
     67sudopbtest "pbdistrocheck"
     68sudopbtest "pb clean"
     69sudopbtest "pb -p afio getconf"
    7070
    7171cat > /tmp/.pbrc << EOF
     
    7676pbconfdir projtest = \$ENV{'HOME'}/projtest/pbconf
    7777pburl projtest = svn+ssh://svn.project-builder.org/svn/pb
    78 pbconfurl pb = svn+ssh://svn.project-builder.org/svn/pb/pbconf
     78pbconfurl pb = svn://svn.project-builder.org/pb/pbconf
    7979pbconfdir pb = \$ENV{'HOME'}/pb/pbconf
    80 pburl pb = svn+ssh://svn.project-builder.org/svn/pb
     80pburl pb = svn://svn.project-builder.org/pb
    8181pburl mondorescue = svn://svn.mondorescue.org/mondorescue/branches
    8282#
     
    106106sudo chown pbtest:pbtest ~pbtest/.pbrc ~pbtest/ve/.pbrc
    107107
    108 sudo su - pbtest -c "ssh-keygen -f .ssh/id_rsa -t rsa -b 768 -v -N ''"
    109 sudo su - pbtest -c "cp .ssh/id_rsa.pub .ssh/authorized_keys ; chmod 600 .ssh/authorized_keys ; chmod 600 .ssh/id_rsa.pub"
    110 sudo su - pbtest -c "ssh localhost touch ftp/README"
     108sudopbtest "ssh-keygen -f .ssh/id_rsa -t rsa -b 768 -v -N ''"
     109sudopbtest "cp .ssh/id_rsa.pub .ssh/authorized_keys ; chmod 600 .ssh/authorized_keys ; chmod 600 .ssh/id_rsa.pub"
     110sudopbtest "ssh localhost touch ftp/README"
    111111
    112112# Create SVN conf files - doesn't work fully as it asks for a password - solved with PBVCSOPT
    113 sudo su - pbtest -c "svn info"
     113sudopbtest "svn info"
    114114cat > /tmp/servers << EOF
    115115[global]
     
    123123VCSOPT='--username pbtest --password pbtest'
    124124
    125 sudo su - pbtest -c "svn import pb svn://localhost/pb -m 'Initial creation of pb repo' $VCSOPT"
    126 sudo su - pbtest -c "cd pb ; svn co svn://localhost/pb ."
    127 sudo su - pbtest -c "cd pb ; touch README ; svn add README ; svn ci --username pbtest --password pbtest -m 'add readme' README"
    128 sudo su - pbtest -c "export PBVCSOPT=\"$VCSOPT\" ; pb -p afio -r 2.5 newproj afio"
     125sudopbtest "svn import pb svn://localhost/pb -m 'Initial creation of pb repo' $VCSOPT"
     126sudopbtest "cd pb ; svn co svn://localhost/pb ."
     127sudopbtest "cd pb ; touch README ; svn add README ; svn ci --username pbtest --password pbtest -m 'add readme' README"
     128sudopbtest "export PBVCSOPT=\"$VCSOPT\" ; pb -p afio -r 2.5 newproj afio"
    129129
    130130grep -vE '^defpkgdir|^projver|^projtag|^pburl|^pbrepo|^shh' ~pbtest/pb/afio/pbconf/2.5/afio.pb > /tmp/afio.pb
     
    140140EOF
    141141sudo mv /tmp/afio.pb ~pbtest/pb/afio/pbconf/2.5/afio.pb
     142sudo perl -pi -e 's|testver afio = true|testver afio = false|' ~pbtest/pb/afio/pbconf/2.5/afio.pb
    142143sudo chown pbtest:pbtest ~pbtest/pb/afio/pbconf/2.5/afio.pb
    143144
     
    162163
    163164# First build
    164 sudo su - pbtest -c "pb -p afio -r 2.5 sbx2build"
     165sudopbtest "pb -p afio -r 2.5 sbx2build"
    165166
    166167sudo perl -pi -e 's|%configure||' ~pbtest/pb/afio/pbconf/2.5/afio/rpm/afio.spec
     
    169170sudo perl -pi -e 's|%doc ChangeLog|%doc HISTORY PORTING README SCRIPTS ANNOUNCE-2.5 perl.artistic.license|' ~pbtest/pb/afio/pbconf/2.5/afio/rpm/afio.spec
    170171sudo perl -pi -e 's|%doc INSTALL COPYING README AUTHORS NEWS|%doc afio.lsm script1 script2 script3 script4\n%{_bindir}/%{name}\n%{_mandir}/man1/%{name}.1*|' ~pbtest/pb/afio/pbconf/2.5/afio/rpm/afio.spec
    171 sudo su - pbtest -c "pb -p afio sbx2pkg"
     172sudopbtest "pb -p afio sbx2pkg"
    172173rpm -qilvp ~pbtest/pb/afio/build/RPMS/x86_64/afio-2.5*
    173 
    174 sudo su - pbtest -c "pb -p pb sbx2pkg"
    175 sudo su - pbtest -c "pb -p pb build2ssh"
    176 sudo su - pbtest -c "pb -p pb pkg2ssh"
    177174
    178175cat > /tmp/pbcl << EOF
     
    185182EOF
    186183sudo mv /tmp/pbcl ~pbtest/pb/afio/pbconf/2.5/afio/pbcl
    187 chown pbtest:pbtest ~pbtest/pb/afio/pbconf/2.5/afio/pbcl
     184sudo chown pbtest:pbtest ~pbtest/pb/afio/pbconf/2.5/afio/pbcl
    188185svn add ~pbtest/pb/afio/pbconf/2.5/afio/pbcl
    189186svn ci -m 'Adding pbcl for afio' $VCSOPT
     
    218215
    219216for d in $TESTVEDIST; do
    220     sudo su - pbtest -c "pb -p pb -m $d newve"
    221     sudo su - pbtest -c "pb -p pb -m $d sbx2setupve"
    222     sudo su - pbtest -c "pb -p pb -m $d snapve"
    223     sudo su - pbtest -c "pb -p afio -m $d sbx2ve"
     217    sudopbtest "pb -p pb -m $d newve"
     218    sudopbtest "pb -p pb -m $d sbx2setupve"
     219    sudopbtest "pb -p pb -m $d snapve"
     220    sudopbtest "pb -p afio -m $d sbx2ve"
    224221    # Cleaning VE to use the snapshot
    225222    dd=`echo $d | cut -d'-' -f1`
    226223    sudo rm -rf ~pbtest/tmp/$dd
    227     sudo su - pbtest -c "pb -p afio -S -m $d sbx2ve"
     224    sudopbtest "pb -p afio -S -m $d sbx2ve"
    228225done
     226
     227sudopbtest "pb -p afio -r 2.5 -V 2.6 newver"
     228sudopbtest "pb -p afio clean"
     229
     230# test also with pb
     231sudopbtest "pb -p pb -r devel sbx2pkg"
     232sudopbtest "pb -p pb build2ssh"
     233sudopbtest "pb -p pb pkg2ssh"
    229234
    230235
     
    236241#-drive file=/users/qemu/mageia-2-i386.qemu,if=virtio,media=disk \
    237242#-redir tcp:2200:10.0.2.15:22
    238 #sudo su - pbtest -c "pb -p projtest -m $TESTVMDIST -i $TESTVMISO newvm"
    239 #sudo su - pbtest -c "pb -p projtest -m $TESTVMDIST sbx2setupvm"
    240 #sudo su - pbtest -c "pb -p projtest -m $TESTVMDIST sbx2vm"
    241 
    242 sudo su - pbtest -c "pb -p afio -r 1.0 -V 2.0 newver"
    243 sudo su - pbtest -c "pb -p afio clean"
     243#sudopbtest "pb -p projtest -m $TESTVMDIST -i $TESTVMISO newvm"
     244#sudopbtest "pb -p projtest -m $TESTVMDIST sbx2setupvm"
     245#sudopbtest "pb -p projtest -m $TESTVMDIST sbx2vm"
    244246
    245247# test also with MOndoRescue
    246248pb -p mondorescue -r branches/3.0 cms2pkg
    247249
    248 # Cleanup
    249 #sudo userdel pbtest
     250# cleanup
     251sudopbtest "killall svnserve"
     252
     253sudopbtest() {
     254
     255cmd=$1
     256
     257echo "INFO pbtest: Now running $cmd"
     258sudo su - pbtest -c "$cmd"
     259}
     260
Note: See TracChangeset for help on using the changeset viewer.