#!/bin/sh

# Root of test source tree
export CAM_SRC_DIR=/blhome/sawyer/CAM/fvcubed_cam3_6_26_wc
cam_id=${CAM_SRC_DIR##/*/}

# Copy test and baseline source trees to working dir
export CAM_ROOT=/ptmp/sawyer/src/$cam_id

if [ ! -d $CAM_ROOT ]; then
    cp -r $CAM_SRC_DIR $CAM_ROOT || { echo "FAILED to copy $CAM_SRC_DIR"; exit -1; }
    echo "copied test source to $CAM_ROOT"
else
    echo "use existing test source in $CAM_ROOT"
fi

# Root directory for tests
export CAM_TESTDIR=/ptmp/sawyer/cam-tests/$cam_id

# Run the driver, which will then submit the appropriate jobs
$CAM_ROOT/models/atm/cam/test/system/test_driver_fvcubed.sh -f
