diff --git a/libisoburn/trunk/releng/releng_generated_data/sample1.cpp b/libisoburn/trunk/releng/codesamples/sample1.cpp similarity index 100% rename from libisoburn/trunk/releng/releng_generated_data/sample1.cpp rename to libisoburn/trunk/releng/codesamples/sample1.cpp diff --git a/libisoburn/trunk/releng/releng_cxx b/libisoburn/trunk/releng/releng_cxx index 5f75535d..ba3488be 100755 --- a/libisoburn/trunk/releng/releng_cxx +++ b/libisoburn/trunk/releng/releng_cxx @@ -6,7 +6,7 @@ START_DIR_DONT_CHANGE=`pwd` SELF=$(basename "$0") GEN_DATA_DIR=releng_generated_data/${SELF} KEEP=0 -SAMPLE_CODE_DIR=releng_generated_data +SAMPLE_CODE_DIR=codesamples CC=g++ CC_FLAFS=" -I ../libisoburn -L ../libisoburn/.libs/ -lisoburn " @@ -82,9 +82,19 @@ if test -f "${SAMPLE_CODE_DIR}"/*.cpp; then for SMPL in `ls "${SAMPLE_CODE_DIR}"/*.cpp`; do CMD_CPL="${CC} ${CC_FLAGS} -o ${SMPL}.obj ${SMPL}" printf "\n${SELF}: ${CMD_CPL}\n" + set +e ${CMD_CPL} - printf "${SELF}: Running ./${SMPL}.obj" - ./${SMPL}.obj + RET_CPL="$?" + if [ ${RET_CPL} == 0 -a -f ${SMPL}.obj ]; then + mv ${SMPL}.obj ${GEN_DATA_DIR} + else + printf "\n${SELF}: FAIL Compilation of ${SMPL}\n" + cleanup + exit 7 + fi + BASE=$(basename ${SMPL}.obj) + printf "${SELF}: Running ${GEN_DATA_DIR}/${BASE}" + ${GEN_DATA_DIR}/${BASE} RET_SMPL="$?" case ${RET_SMPL} in 0) @@ -93,9 +103,10 @@ if test -f "${SAMPLE_CODE_DIR}"/*.cpp; then *) printf "exit code: ${RET_SMPL}\n" cleanup - exit 7 + exit 8 ;; esac + set -e done else printf "\n${SELF}: No C++ code samples found in ${SAMPLE_CODE_DIR}\n"