diff --git a/tests/findregressions.d b/tests/findregressions.d index e2616c74..04a81b99 100644 --- a/tests/findregressions.d +++ b/tests/findregressions.d @@ -76,9 +76,9 @@ private{ extern(Windows) BOOL GetFileTime(HANDLE hFile, LPFILETIME lpCreationTime, LPFILETIME lpLastAccessTime, LPFILETIME lpLastWriteTime); }else version(linux){ import std.c.linux.linux; - version = Unix; - }else version(Unix){ - import std.c.unix.unix; + version = Posix; + }else version(Posix){ + import std.c.posix.posix; }else{ static assert(0); } @@ -116,7 +116,7 @@ private{ err: CloseHandle(h); throw new Exception("failed to query file modification : "~fileName); - }else version(Unix){ + }else version(Posix){ char* namez = toStringz(fileName); struct_stat statbuf; @@ -124,7 +124,11 @@ err: throw new FileException(fileName, getErrno()); } - return statbuf.st_mtime; + version(linux){ + return statbuf.st_mtime; + }else version(OSX){ + return statbuf.st_mtimespec.tv_sec; + } }else{ static assert(0); } diff --git a/tests/makewebstatistics.d b/tests/makewebstatistics.d index 6b9d4510..6c018760 100644 --- a/tests/makewebstatistics.d +++ b/tests/makewebstatistics.d @@ -77,9 +77,9 @@ private{ extern(Windows) BOOL GetFileTime(HANDLE hFile, LPFILETIME lpCreationTime, LPFILETIME lpLastAccessTime, LPFILETIME lpLastWriteTime); }else version(linux){ import std.c.linux.linux; - version = Unix; - }else version(Unix){ - import std.c.unix.unix; + version = Posix; + }else version(Posix){ + import std.c.posix.posix; }else{ static assert(0); } @@ -117,7 +117,7 @@ private{ err: CloseHandle(h); throw new Exception("failed to query file modification : "~fileName); - }else version(Unix){ + }else version(Posix){ char* namez = toStringz(fileName); struct_stat statbuf; @@ -125,7 +125,12 @@ err: throw new FileException(fileName, getErrno()); } - return statbuf.st_mtime; + version(linux){ + return statbuf.st_mtime; + }else version(OSX){ + return statbuf.st_mtimespec.tv_sec; + } + }else{ static assert(0); } diff --git a/tests/runtest b/tests/runtest index 691cfa6b..041be918 100755 --- a/tests/runtest +++ b/tests/runtest @@ -23,14 +23,14 @@ BASEPATH=`pwd` cd dstress # remove excessive tests -sed -e 's/torture-//g' -i Makefile +sed -e 's/torture-//g' -i '' Makefile # make sure only .d files in 'run' tests are run -sed -e 's/find run -type f |/find run -type f -name "*\\\\.d" |/' -i Makefile -sed -e 's/find norun -type f |/find norun -type f -name "*\\\\.d" |/' -i Makefile +sed -e 's/find run -type f |/find run -type f -name "*\\\\.d" |/' -i '' Makefile +sed -e 's/find norun -type f |/find norun -type f -name "*\\\\.d" |/' -i '' Makefile # impose more conservative constraints (10s and 256 MB) -sed -e 's/crashRun 30 1000/crashRun 10 256/' -i dstress.c +sed -e 's/crashRun 30 1000/crashRun 10 256/' -i '' dstress.c echo echo "Running new test and storing result in $TARGETFILE ..." diff --git a/tests/testincludes/Makefile b/tests/testincludes/Makefile index 612c4c8f..57f8f65c 100644 --- a/tests/testincludes/Makefile +++ b/tests/testincludes/Makefile @@ -72,7 +72,7 @@ tangobos.lib : $(LIB_TARGET) $(LIB_TARGET) : $(ALL_OBJS) $(RM) $(LIB_MASK) - $(LLVMLINK) -o=$(LIB_TARGET).bc `find -name "*.bc"` + $(LLVMLINK) -o=$(LIB_TARGET).bc `find . -name "*.bc"` $(LLC) -o=$(LIB_TARGET).s $(LIB_TARGET).bc $(CC) -c -o $(LIB_TARGET) $(LIB_TARGET).s