Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix llvm 3.5 tests #689

Merged
merged 3 commits into from
Jul 24, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ install:
sudo apt-get install --allow-unauthenticated -qq clang-3.4; export CXX="clang++-3.4";
fi
env:
- LLVM_PACKAGE="llvm-3.1 llvm-3.1-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.1 llvm-3.1-dev"
- LLVM_PACKAGE="llvm-3.2 llvm-3.2-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.2 llvm-3.2-dev"
- LLVM_PACKAGE="llvm-3.3 llvm-3.3-dev" TEST_DEBUG=1 OPTS="-DMULTILIB=ON"
- LLVM_PACKAGE="llvm-3.3 llvm-3.3-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.3 llvm-3.3-dev"
- LLVM_PACKAGE="llvm-3.4 llvm-3.4-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.4 llvm-3.4-dev" OPTS="-DMULTILIB=ON" TEST_BITNESS=32
Expand All @@ -50,17 +48,13 @@ env:
- LLVM_PACKAGE="llvm-3.4 llvm-3.4-dev" OPTS="-DBUILD_SHARED_LIBS=ON"
- LLVM_PACKAGE="llvm-3.5 llvm-3.5-dev libedit2 libedit-dev" TEST_DEBUG=1
- LLVM_PACKAGE="llvm-3.5 llvm-3.5-dev libedit2 libedit-dev"
matrix:
allow_failures:
- env: LLVM_PACKAGE="llvm-3.5 llvm-3.5-dev libedit2 libedit-dev" TEST_DEBUG=1
- env: LLVM_PACKAGE="llvm-3.5 llvm-3.5-dev libedit2 libedit-dev"
script:
- cmake $OPTS .
- make
- make -j2
# Outputs some environment info, plus makes sure we only run the test suite
# if we could actually build the executable.
- bin/ldc2 -version || exit 1
# We need to run the druntime/Phobos unittest build targets build separately
# We need to run the druntime/phobos unittest build targets and the testsuite
# with output shown (--verbose), because we hit the non-configurable Travis
# "silence timeout" of 10 minutes otherwise. So much for "no news is good
# news".
Expand All @@ -80,19 +74,19 @@ script:
need_32="(-32)?";
fi;
if [[ -z "${TEST_DEBUG}" ]]; then
export BUILD_SEL="-R build-(druntime|phobos2)-ldc-unittest${need_32}$";
export RUN_SEL="-E -debug(-32)?$";
export BUILD_SEL="-R (dmd-testsuite${need_32}$)|(build-(druntime|phobos2)-ldc-unittest${need_32}$)";
export RUN_SEL="-E (dmd-testsuite)|(-debug(-32)?$)";
if [[ "${TEST_BITNESS}" == "32" ]]; then
export RUN_SEL="-R -32$ ${RUN_SEL}";
elif [[ "${TEST_BITNESS}" == "64" ]]; then
export RUN_SEL="-E ((-debug)|(-32))$";
export RUN_SEL="-E (dmd-testsuite)|(((-debug)|(-32))$)";
fi;
else
export BUILD_SEL="-R build-(druntime|phobos2)-ldc-unittest-debug${need_32}$";
export RUN_SEL="-R debug${need_32}$";
export BUILD_SEL="-R (dmd-testsuite-debug${need_32}$)|(build-(druntime|phobos2)-ldc-unittest-debug${need_32}$)";
export RUN_SEL="-R debug${need_32}$ -E dmd-testsuite";
fi;
- ctest --verbose ${BUILD_SEL}
- ctest --output-on-failure ${RUN_SEL}
- ctest -j2 --verbose ${BUILD_SEL}
- ctest -j2 --output-on-failure ${RUN_SEL}

notifications:
# Temporarily disabled due to time limit problems.
Expand Down
6 changes: 3 additions & 3 deletions driver/ldmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ std::string locateBinary(std::string exeName, const char* argv0)
*/
static void createOutputDir(const char* dir) {
#if LDC_LLVM_VER >= 305
if (!ls::fs::create_directories(dir))
if (ls::fs::create_directories(dir))
#else
bool dirExisted; // ignored
if (ls::fs::create_directories(dir, dirExisted) != llvm::errc::success)
Expand Down Expand Up @@ -1046,7 +1046,7 @@ int main(int argc, char *argv[])
{
int rspFd;
llvm::SmallString<128> rspPath;
if (!ls::fs::createUniqueFile("ldmd-%%-%%-%%-%%.rsp", rspFd, rspPath))
if (ls::fs::createUniqueFile("ldmd-%%-%%-%%-%%.rsp", rspFd, rspPath))
{
error("Could not open temporary response file.");
}
Expand All @@ -1071,7 +1071,7 @@ int main(int argc, char *argv[])
int rc = execute(ldcPath, &newArgs[0]);

#if LDC_LLVM_VER >= 305
if (!ls::fs::remove(rspPath.str()))
if (ls::fs::remove(rspPath.str()))
#else
bool couldRemove;
if (ls::fs::remove(rspPath.str(), couldRemove) != llvm::errc::success ||
Expand Down