Source

gdc / gdc.test / runnable / test2.sh

Daniel Green b6fdbee 
































#!/usr/bin/env bash

dir=${RESULTS_DIR}/runnable
dmddir=${RESULTS_DIR}${SEP}runnable
output_file=${dir}/test2.sh.out

rm -f ${output_file}

a[0]=''
a[1]='-debug'
a[2]='-debug=1'
a[3]='-debug=2 -debug=bar'

for x in "${a[@]}"; do
    echo "executing with args: $x" >> ${output_file}

    $DMD -m${MODEL} $x -unittest -od${dmddir} -of${dmddir}${SEP}test2 runnable/extra-files/test2.d >> ${output_file}
    if [ $? -ne 0 ]; then
        cat ${output_file}
        rm -f ${output_file}
        exit 1
    fi

    ./${dir}/test2 >> ${output_file}
    if [ $? -ne 0 ]; then
        cat ${output_file}
        rm -f ${output_file}
        exit 1
    fi

    rm ${dir}/{test2${OBJ},test2${EXE}}

    echo >> ${output_file}
done
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.