Skip to main content
 

How to make your java *testing* rules test-only.

Here's a crude script you can use to automatically set testonly=1 on _testing_ targets that qualify (and tells you why others cannot be testonly)  If there's interest I'd be happy to clean this up and put it somewhere...


 DEPS=blaze-bin/devtools/deps/depserver/query/depends_on  --testonly=0 `

  echo "PROCESSING - "
  TESTONLY_NUMDEPS=`echo ""|wc -l`
  if [ == 1 ]; then
    buildozer 'set testonly 1'
    buildozer fix
    echo "ADDED testonly=1 to target  "
  else
    echo "FAILED to add testonly=1  for target "
    echo ""
  fi
 done