Chris, After the split of core from the tests I wanted a simple setup where tests are residing outside of core autotest directory. Say autotest would reside in /usr/local/autotest and testware in /usr/local/autotest-tests/client and /usr/local/autotest-tests/server (of course one could have git clones in these directories). Additionally, in our setup this would be great because it facilitates division between testers developing testware and autotest core. It would also avoid nested repos and all repos would be treated as independent.
There is a global config variable that seems to help having tests in separate directory [COMMON] test_dir. However setting it does not have desired effect - it turns out that in several places autotest assumes that tests will be inside autotest. I went ahead and changed logic to use that variable when control file is fetched from the disk and when tests are passed to the client. Got this mostly working but before I go much further wanted to get some opinions if this is the right approach. Perhaps there is simpler way to accomplish that or perhaps test_dir was not meant to be used in that context. Julius -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Chris Evich Sent: Wednesday, October 03, 2012 7:10 AM To: [email protected]; autotest-kernel Subject: [Autotest] Stupid, Simple, update_autotest bash Script All, I know there's probably a billion and one more efficient ways to do this. However, here's a stupidly-simple bash script I tossed together in 5-minutes to keep my master/next branches up-to-snuff across all the new repos. (which I've forked on github and used git remote to label as my origin's). -----cut----- #!/bin/bash BASE="/home/cevich/devel/test" SUBDIRS="/autotest /autotest/client /autotest/client/tests" # NFS mount laptop home to desktop home if [ -d "$HOME/laptop_home" ] then BASE="/home/cevich/laptop_home/devel/test" fi noisycmd() { echo ">>>>> $1" &> /dev/stdout $1 return $? } updateit() { cd "$1" && \ noisycmd "git remote update upstream" && \ noisycmd "git checkout master" && \ noisycmd "git pull upstream master" && \ noisycmd "git push origin master" && \ noisycmd "git checkout next" && \ noisycmd "git pull upstream next" && \ noisycmd "git push origin next" return $? } RET=0 for subdir in $SUBDIRS do if [ "$RET" -ne "0" ] then echo "Uh Oh, you screwed something up :P" break fi DIR="${BASE}${subdir}" echo ">>>>>>>>>> Updating $DIR" updateit "$DIR" RET=$? done -----cut----- For more info on how I setup the nested repos., see this thread: https://www.redhat.com/archives/virt-test-devel/2012-October/msg00005.html NB: I didn't include the client-tests repo. in that mail, but I'm sure you'll figure out where it fits in. -- Chris Evich, RHCA, RHCE, RHCDS, RHCSS Quality Assurance Engineer e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
