How to build and test in a subdirectory

circle.yml

#1

Hi,

I’m looking to do something fairly simple, which is to checkout my repo to a subdirectory, not to $HOME, and to run the tests there.

So instead of checking out to $HOME I would like to

  1. Create subdirectories $HOME/catkin_ws/src
  2. Check out the target repo myapp to $HOME/catkin_ws/src
  3. Run the nose tests in $HOME/catkin_ws/src/myapp/src

I’ve tried two methods:

a) Using build_dir in circle.yml:

general:
  build_dir: catkin_ws/src

which gives messages like
/opt/circleci/.rvm/scripts/extras/bash_zsh_support/chpwd/function.sh: line 5: cd: /home/ubuntu/myapp/~/catkin_ws/src/: No such file or directory

b) Using pre commands on checkout:

checkout:
   pre:
      - mkdir -p ~/catkin_ws/src
      - cd ~/catkin_ws/src

What is the correct way to do this? Thanks!

Simon

Stack: Ubuntu 14.04 + Python 2.7.11


#2