diff --git a/test/4-describe-data-1-list.sh b/test/4-describe-data-1-list.sh index a1d9120..8edce7c 100755 --- a/test/4-describe-data-1-list.sh +++ b/test/4-describe-data-1-list.sh @@ -12,7 +12,7 @@ trap cleanup EXIT -if ! $DUB describe --compiler=$COMPILER --data-list \ +if ! $DUB describe --compiler=$DC --data-list \ '--data= target-type , target-path , target-name ' \ '--data= working-directory ' \ --data=main-source-file \ diff --git a/test/4-describe-data-3-zero-delim.sh b/test/4-describe-data-3-zero-delim.sh index 8df3e20..21f2675 100755 --- a/test/4-describe-data-3-zero-delim.sh +++ b/test/4-describe-data-3-zero-delim.sh @@ -15,7 +15,7 @@ trap cleanup EXIT # Test list-style project data -if ! $DUB describe --compiler=$COMPILER --data-list \ +if ! $DUB describe --compiler=$DC --data-list \ --data=target-type \ --data=target-path \ --data=target-name \ @@ -43,7 +43,7 @@ die 'Printing list-style project data failed!' fi -if ! $DUB describe --compiler=$COMPILER --data-0 --data-list \ +if ! $DUB describe --compiler=$DC --data-0 --data-list \ --data=target-type \ --data=target-path \ --data=target-name \ @@ -76,12 +76,12 @@ fi # Test --import-paths -if ! $DUB describe --compiler=$COMPILER --import-paths \ +if ! $DUB describe --compiler=$DC --import-paths \ > "$temp_file_normal"; then die 'Printing --import-paths failed!' fi -if ! $DUB describe --compiler=$COMPILER --data-0 --import-paths \ +if ! $DUB describe --compiler=$DC --data-0 --import-paths \ | xargs -0 printf "%s\n" > "$temp_file_zero_delim"; then die 'Printing null-delimited --import-paths failed!' fi diff --git a/test/4-describe-import-paths.sh b/test/4-describe-import-paths.sh index 71822b4..ba03205 100755 --- a/test/4-describe-import-paths.sh +++ b/test/4-describe-import-paths.sh @@ -12,7 +12,7 @@ trap cleanup EXIT -if ! $DUB describe --compiler=$COMPILER --import-paths > "$temp_file"; then +if ! $DUB describe --compiler=$DC --import-paths > "$temp_file"; then die 'Printing import paths failed!' fi diff --git a/test/4-describe-json.sh b/test/4-describe-json.sh index cdd2a2b..5641595 100755 --- a/test/4-describe-json.sh +++ b/test/4-describe-json.sh @@ -12,7 +12,7 @@ trap cleanup EXIT -if ! $DUB describe --compiler=$COMPILER > "$temp_file"; then +if ! $DUB describe --compiler=$DC > "$temp_file"; then die 'Printing describe JSON failed!' fi diff --git a/test/4-describe-string-import-paths.sh b/test/4-describe-string-import-paths.sh index 772c8c4..aa64979 100755 --- a/test/4-describe-string-import-paths.sh +++ b/test/4-describe-string-import-paths.sh @@ -12,7 +12,7 @@ trap cleanup EXIT -if ! $DUB describe --compiler=$COMPILER --string-import-paths > "$temp_file"; then +if ! $DUB describe --compiler=$DC --string-import-paths > "$temp_file"; then die 'Printing string import paths failed!' fi diff --git a/test/issue346-redundant-flags.sh b/test/issue346-redundant-flags.sh index acb1f54..3ee9ade 100755 --- a/test/issue346-redundant-flags.sh +++ b/test/issue346-redundant-flags.sh @@ -1,4 +1,4 @@ #!/bin/sh cd ${CURR_DIR}/issue346-redundant-flags -${DUB} build --bare --force --compiler=${COMPILER} -a x86 main | grep -e "-m32 -m32" 2>&1 && exit 1 || exit 0 +${DUB} build --bare --force --compiler=${DC} -a x86 main | grep -e "-m32 -m32" 2>&1 && exit 1 || exit 0 diff --git a/test/issue564-invalid-upgrade-dependency.sh b/test/issue564-invalid-upgrade-dependency.sh index 3de9aa1..a1af6bd 100755 --- a/test/issue564-invalid-upgrade-dependency.sh +++ b/test/issue564-invalid-upgrade-dependency.sh @@ -4,4 +4,4 @@ rm -rf a-1.0.0/.dub rm -rf a-1.1.0/.dub rm -rf main/.dub -${DUB} build --bare --compiler=${COMPILER} main || exit 1 +${DUB} build --bare --compiler=${DC} main || exit 1 diff --git a/test/issue586-subpack-dep.sh b/test/issue586-subpack-dep.sh index efd42ce..fe0ad5f 100755 --- a/test/issue586-subpack-dep.sh +++ b/test/issue586-subpack-dep.sh @@ -4,5 +4,5 @@ rm -rf a/.dub rm -rf a/b/.dub rm -rf main/.dub -${DUB} build --bare --compiler=${COMPILER} main || exit 1 -${DUB} run --bare --compiler=${COMPILER} main || exit 1 +${DUB} build --bare --compiler=${DC} main || exit 1 +${DUB} run --bare --compiler=${DC} main || exit 1 diff --git a/test/issue613-dynlib-pic.sh b/test/issue613-dynlib-pic.sh index 57d1c82..d7e90b7 100755 --- a/test/issue613-dynlib-pic.sh +++ b/test/issue613-dynlib-pic.sh @@ -2,9 +2,9 @@ cd ${CURR_DIR}/issue613-dynlib-pic rm -rf .dub -if [ "${COMPILER}" = "dmd" ]; then - ${DUB} build --compiler=${COMPILER} || exit 1 +if [ "${DC}" = "dmd" ]; then + ${DUB} build --compiler=${DC} || exit 1 else - echo "Skipping shared library test for ${COMPILER}..." + echo "Skipping shared library test for ${DC}..." fi diff --git a/test/issue616-describe-vs-generate-commands.sh b/test/issue616-describe-vs-generate-commands.sh index eefe296..8f85c09 100755 --- a/test/issue616-describe-vs-generate-commands.sh +++ b/test/issue616-describe-vs-generate-commands.sh @@ -11,7 +11,7 @@ trap cleanup EXIT -if ! $DUB describe --compiler=$COMPILER --data-list --data=target-name \ +if ! $DUB describe --compiler=$DC --data-list --data=target-name \ > "$temp_file" 2>&1; then die 'Printing project data failed!' fi diff --git a/test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh b/test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh index b678840..84468cd 100755 --- a/test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh +++ b/test/issue616-describe-vs-generate-commands/do-preGenerateCommands.sh @@ -7,4 +7,4 @@ echo preGenerateCommands: DUB_PACKAGES_USED=$DUB_PACKAGES_USED >&2 export dub_issue616=true -$DUB describe --compiler=$COMPILER --data-list --data=import-paths >&2 +$DUB describe --compiler=$DC --data-list --data=import-paths >&2 diff --git a/test/run-unittest.sh b/test/run-unittest.sh index c28940a..f092fd9 100755 --- a/test/run-unittest.sh +++ b/test/run-unittest.sh @@ -21,9 +21,9 @@ die 'Error: Variable $DUB must be defined to run the tests.' fi -if [ -z ${COMPILER} ]; then - log '$COMPILER not defined, assuming dmd...' - COMPILER=dmd +if [ -z ${DC} ]; then + log '$DC not defined, assuming dmd...' + DC=dmd fi CURR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) @@ -31,7 +31,7 @@ for script in $(ls $CURR_DIR/*.sh); do if [ "$script" = "$(readlink -f ${BASH_SOURCE[0]})" ]; then continue; fi log "Running $script..." - DUB=$DUB COMPILER=$COMPILER CURR_DIR="$CURR_DIR" $script || logError "Script failure." + DUB=$DUB DC=$DC CURR_DIR="$CURR_DIR" $script || logError "Script failure." done for pack in $(ls -d $CURR_DIR/*/); do @@ -39,23 +39,23 @@ if [ ! -e $pack/.no_build ]; then # For sourceLibrary if [ -e $pack/.fail_build ]; then log "Building $pack, expected failure..." - $DUB build --force --root=$pack --compiler=$COMPILER 2>/dev/null && logError "Error: Failure expected, but build passed." + $DUB build --force --root=$pack --compiler=$DC 2>/dev/null && logError "Error: Failure expected, but build passed." else log "Building $pack..." - $DUB build --force --root=$pack --compiler=$COMPILER || logError "Build failure." + $DUB build --force --root=$pack --compiler=$DC || logError "Build failure." fi fi # We run the ones that are supposed to be runned if [ ! -e $pack/.no_build ] && [ ! -e $pack/.no_run ]; then log "Running $pack..." - $DUB run --force --root=$pack --compiler=$COMPILER || logError "Run failure." + $DUB run --force --root=$pack --compiler=$DC || logError "Run failure." fi # Finally, the unittest part if [ ! -e $pack/.no_build ] && [ ! -e $pack/.no_test ]; then log "Testing $pack..." - $DUB test --force --root=$pack --compiler=$COMPILER || logError "Test failure." + $DUB test --force --root=$pack --compiler=$DC || logError "Test failure." fi done diff --git a/travis-ci.sh b/travis-ci.sh index 3f750fb..6fcff5e 100755 --- a/travis-ci.sh +++ b/travis-ci.sh @@ -14,7 +14,7 @@ else ./build.sh fi -DUB=`pwd`/bin/dub COMPILER=${DC} test/run-unittest.sh +DUB=`pwd`/bin/dub DC=${DC} test/run-unittest.sh if [ "$COVERAGE" = true ]; then dub fetch doveralls --version=~master