Remove FixTimeStamp as https://github.com/dotnet/corefx/issues/6083 seems to be fixed.

This commit is contained in:
PiotrP 2016-04-25 18:56:06 -07:00
parent 44f6642116
commit 84f10f58e9

View file

@ -58,7 +58,6 @@ namespace Microsoft.DotNet.TestFramework
{ {
string destFile = srcFile.Replace(_testAssetRoot, Path); string destFile = srcFile.Replace(_testAssetRoot, Path);
File.Copy(srcFile, destFile, true); File.Copy(srcFile, destFile, true);
FixTimeStamp(srcFile, destFile);
} }
} }
@ -68,7 +67,6 @@ namespace Microsoft.DotNet.TestFramework
{ {
string destinationLockFile = lockFile.Replace(_testAssetRoot, Path); string destinationLockFile = lockFile.Replace(_testAssetRoot, Path);
File.Copy(lockFile, destinationLockFile, true); File.Copy(lockFile, destinationLockFile, true);
FixTimeStamp(lockFile, destinationLockFile);
} }
return this; return this;
@ -108,22 +106,11 @@ namespace Microsoft.DotNet.TestFramework
{ {
string destFile = binFile.Replace(_testAssetRoot, Path); string destFile = binFile.Replace(_testAssetRoot, Path);
File.Copy(binFile, destFile, true); File.Copy(binFile, destFile, true);
FixTimeStamp(binFile, destFile);
} }
return this; return this;
} }
public string TestRoot => Path; public string TestRoot => Path;
private static void FixTimeStamp(string originalFile, string newFile)
{
// workaround for https://github.com/dotnet/corefx/issues/6083
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
var originalTime = File.GetLastWriteTime(originalFile);
File.SetLastWriteTime(newFile, originalTime);
}
}
} }
} }