Bash and TC Build Hacks I Learned in the Last Two Hours
There’s very good documentation about Terracotta’s in-house TC Build system already. But I’ve been doing some intense debugging with Hung, and have learned some things that I want to write down before I forget.
run without ivy: tcbuild blah blah --no-ivy - I’m assuming this runs faster because it skips using Ivy to check that all dependencies are in place.
run without compiling tcbuild --no-compile blah... when just shuffling some runtime dependency or something.
put environment stuff in .bashrc
check trunk/buildsystem to find things like jruby
For our automated container tests, individual jar files are placed in one huge WAR file. This is not true for ordinary unit tests.
Doing something like ./tcbuild check_one CustomScopedBeanTest --no-ivy > log.txt 2>&1 puts output in a file, and the last part redirects err stream to output stream.
Important shared stuff at /shares/terra/jdk/ such as Java, ant, etc
Grep trick 1: ps -ef | grep java to see details about Java processes running
Grep trick 2: env | grep JAVA to see environment variables I should have set up to run tcbuild
Grep trick 3: find <path> -name <filenamepattern> | xargs grep <searchstring> find all files matching filenamepattern that also have search string within them
find trick: rm -rf `find . -type d -name .svn` remove all .svn directories recursively
~/.tc/appserver is where tomcat is stored during automated tests - may want to remove as sanity check sometimes.
~/.ivy* is where ivy stuff is stored - may want to remove prior to doing total clean rebuild.
Alex Miller:
Yes, –no-ivy prevents the checking and downloading of dependent jars via ivy. If you know you already have them all, this saves a few seconds.
I think you might have some angle bracket carnage on grep trick 3….
10 June 2008, 9:29 pmScott:
@Alex - thanks, I corrected it
11 June 2008, 9:00 am