@@ -486,11 +486,9 @@ public void CheckTimestamps ([Values (true, false)] bool isRelease)
486486 // Xamarin.Android unless fastdev is enabled.
487487 foreach ( var file in new [ ] { "typemap.mj" , "typemap.jm" } ) {
488488 var info = new FileInfo ( Path . Combine ( intermediate , "android" , file ) ) ;
489- if ( ! info . Exists ) {
490- Assert . Ignore ( $ "{ info . Name } does not exist, timestamp check skipped") ;
491- continue ;
489+ if ( info . Exists ) {
490+ Assert . IsTrue ( info . LastWriteTimeUtc > start , $ "`{ file } ` is older than `{ start } `, with a timestamp of `{ info . LastWriteTimeUtc } `!") ;
492491 }
493- Assert . IsTrue ( info . LastWriteTimeUtc > start , $ "`{ file } ` is older than `{ start } `, with a timestamp of `{ info . LastWriteTimeUtc } `!") ;
494492 }
495493
496494 //One last build with no changes
@@ -1164,12 +1162,6 @@ public void BuildBasicApplicationCheckMdbRepeatBuild ()
11641162 File . Exists ( Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android/assets/UnnamedProject.pdb" ) ) ,
11651163 "UnnamedProject.dll.mdb must be copied to the Intermediate directory" ) ;
11661164 Assert . IsTrue ( b . Build ( proj ) , "second build failed" ) ;
1167- Assert . IsTrue (
1168- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
1169- "the _CopyMdbFiles target should be skipped" ) ;
1170- Assert . IsTrue (
1171- b . Output . IsTargetSkipped ( "_CopyPdbFiles" ) ,
1172- "the _CopyPdbFiles target should be skipped" ) ;
11731165 Assert . IsTrue (
11741166 File . Exists ( Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android/assets/UnnamedProject.dll.mdb" ) ) ||
11751167 File . Exists ( Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android/assets/UnnamedProject.pdb" ) ) ,
@@ -1229,39 +1221,39 @@ public Class2 ()
12291221 Assert . IsTrue ( libb . Build ( lib ) , "Library1 Build should have succeeded." ) ;
12301222 using ( var b = CreateApkBuilder ( Path . Combine ( path , "App1" ) ) ) {
12311223 Assert . IsTrue ( b . Build ( proj ) , "App1 Build should have succeeded." ) ;
1232- var assetsPdb = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android" , "assets" , "Library1.pdb" ) ;
1233- var linkDst = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linkdst" , "Library1.pdb" ) ;
1234- var linkSrc = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linksrc" , "Library1.pdb" ) ;
1224+ var intermediate = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath ) ;
1225+ var outputPath = Path . Combine ( Root , b . ProjectDirectory , proj . OutputPath ) ;
1226+ var assetsPdb = Path . Combine ( intermediate , "android" , "assets" , "Library1.pdb" ) ;
1227+ var linkDst = Path . Combine ( intermediate , "linkdst" , "Library1.pdb" ) ;
1228+ var binSrc = Path . Combine ( outputPath , "Library1.pdb" ) ;
12351229 Assert . IsTrue (
12361230 File . Exists ( assetsPdb ) ,
12371231 "Library1.pdb must be copied to Intermediate directory" ) ;
12381232 Assert . IsFalse (
12391233 File . Exists ( linkDst ) ,
12401234 "Library1.pdb should not be copied to linkdst directory because it has no Abstrsact methods to fix up." ) ;
12411235 Assert . IsTrue (
1242- File . Exists ( linkSrc ) ,
1243- "Library1.pdb must be copied to linksrc directory" ) ;
1244- var outputPath = Path . Combine ( Root , b . ProjectDirectory , proj . OutputPath ) ;
1236+ File . Exists ( binSrc ) ,
1237+ "Library1.pdb must be copied to bin directory" ) ;
12451238 using ( var apk = ZipHelper . OpenZip ( Path . Combine ( outputPath , proj . PackageName + "-Signed.apk" ) ) ) {
12461239 var data = ZipHelper . ReadFileFromZip ( apk , "assemblies/Library1.pdb" ) ;
12471240 if ( data == null )
12481241 data = File . ReadAllBytes ( assetsPdb ) ;
1249- var filedata = File . ReadAllBytes ( linkSrc ) ;
1250- Assert . AreEqual ( filedata . Length , data . Length , "Library1.pdb in the apk should match {0}" , linkSrc ) ;
1242+ var filedata = File . ReadAllBytes ( binSrc ) ;
1243+ Assert . AreEqual ( filedata . Length , data . Length , "Library1.pdb in the apk should match {0}" , binSrc ) ;
12511244 }
1252- linkDst = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linkdst" , "App1.pdb" ) ;
1253- linkSrc = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linksrc" , "App1.pdb" ) ;
1245+ linkDst = Path . Combine ( intermediate , "linkdst" , "App1.pdb" ) ;
1246+ binSrc = Path . Combine ( outputPath , "App1.pdb" ) ;
12541247 Assert . IsTrue (
12551248 File . Exists ( linkDst ) ,
12561249 "App1.pdb should be copied to linkdst directory because it has Abstrsact methods to fix up." ) ;
12571250 Assert . IsTrue (
1258- File . Exists ( linkSrc ) ,
1259- "App1.pdb must be copied to linksrc directory" ) ;
1260- FileAssert . AreEqual ( linkSrc , linkDst , "{0} and {1} should not differ." , linkSrc , linkDst ) ;
1261- linkDst = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linkdst" , "App1.dll" ) ;
1262- linkSrc = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linksrc" , "App1.dll" ) ;
1263- FileAssert . AreEqual ( linkSrc , linkDst , "{0} and {1} should match." , linkSrc , linkDst ) ;
1264-
1251+ File . Exists ( binSrc ) ,
1252+ "App1.pdb must be copied to bin directory" ) ;
1253+ FileAssert . AreEqual ( binSrc , linkDst , "{0} and {1} should not differ." , binSrc , linkDst ) ;
1254+ linkDst = Path . Combine ( intermediate , "linkdst" , "App1.dll" ) ;
1255+ binSrc = Path . Combine ( outputPath , "App1.dll" ) ;
1256+ FileAssert . AreEqual ( binSrc , linkDst , "{0} and {1} should match." , binSrc , linkDst ) ;
12651257 }
12661258 }
12671259 }
@@ -1310,15 +1302,9 @@ public void BuildBasicApplicationCheckMdbAndPortablePdb ()
13101302 File . Exists ( Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android" , "assets" , "NetStandard16.pdb" ) ) ,
13111303 "NetStandard16.pdb must be copied to Intermediate directory" ) ;
13121304 Assert . IsTrue ( b . Build ( proj , doNotCleanupOnUpdate : true ) , "second build failed" ) ;
1313- Assert . IsTrue (
1314- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
1315- "the _CopyMdbFiles target should be skipped" ) ;
13161305 var lastTime = File . GetLastWriteTimeUtc ( pdbToMdbPath ) ;
13171306 pdb . Timestamp = DateTimeOffset . UtcNow ;
13181307 Assert . IsTrue ( b . Build ( proj , doNotCleanupOnUpdate : true ) , "third build failed" ) ;
1319- Assert . IsFalse (
1320- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
1321- "the _CopyMdbFiles target should not be skipped" ) ;
13221308 Assert . Less ( lastTime ,
13231309 File . GetLastWriteTimeUtc ( pdbToMdbPath ) ,
13241310 "{0} should have been updated" , pdbToMdbPath ) ;
@@ -2853,16 +2839,10 @@ public void BuildBasicApplicationCheckPdb ()
28532839 }
28542840 b . BuildLogFile = "build1.log" ;
28552841 Assert . IsTrue ( b . Build ( proj , doNotCleanupOnUpdate : true ) , "second build failed" ) ;
2856- Assert . IsTrue (
2857- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
2858- "the _CopyMdbFiles target should be skipped" ) ;
28592842 b . BuildLogFile = "build2.log" ;
28602843 var lastTime = File . GetLastWriteTimeUtc ( pdbToMdbPath ) ;
28612844 pdb . Timestamp = DateTimeOffset . UtcNow ;
28622845 Assert . IsTrue ( b . Build ( proj , doNotCleanupOnUpdate : true ) , "third build failed" ) ;
2863- Assert . IsFalse (
2864- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
2865- "the _CopyMdbFiles target should not be skipped" ) ;
28662846 Assert . Less ( lastTime ,
28672847 File . GetLastWriteTimeUtc ( pdbToMdbPath ) ,
28682848 "{0} should have been updated" , pdbToMdbPath ) ;
0 commit comments