Skip to content

Commit

Permalink
test for -defaultlib=libphobos2.so
Browse files Browse the repository at this point in the history
- followup to issue 13210

- depends on phobos directory layout for setting LD_LIBRARY_PATH
  • Loading branch information
MartinNowak committed Jul 31, 2014
1 parent 58306b8 commit 358b0fd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/runnable/extra-files/test_shared.d
@@ -0,0 +1,3 @@
void main()
{
}
26 changes: 26 additions & 0 deletions test/runnable/test_shared.sh
@@ -0,0 +1,26 @@
#!/usr/bin/env bash

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

rm -f ${output_file}

if [ ${OS} != "linux" ]; then
echo "Skipping shared library test on ${OS}."
touch ${output_file}
exit 0
fi

die()
{
cat ${output_file}
rm -f ${output_file}
exit 1
}

$DMD -m${MODEL} -of${dmddir}${SEP}test_shared${EXE} -defaultlib=libphobos2.so runnable/extra-files/test_shared.d >> ${output_file}
if [ $? -ne 0 ]; then die; fi

LD_LIBRARY_PATH=../../phobos/generated/${OS}/release/${MODEL} ./${dmddir}${SEP}test_shared${EXE}
if [ $? -ne 0 ]; then die; fi

0 comments on commit 358b0fd

Please sign in to comment.