@@ -503,11 +503,9 @@ public void CheckTimestamps ([Values (true, false)] bool isRelease)
503503 // Xamarin.Android unless fastdev is enabled.
504504 foreach ( var file in new [ ] { "typemap.mj" , "typemap.jm" } ) {
505505 var info = new FileInfo ( Path . Combine ( intermediate , "android" , file ) ) ;
506- if ( ! info . Exists ) {
507- Assert . Ignore ( $ "{ info . Name } does not exist, timestamp check skipped") ;
508- continue ;
506+ if ( info . Exists ) {
507+ Assert . IsTrue ( info . LastWriteTimeUtc > start , $ "`{ file } ` is older than `{ start } `, with a timestamp of `{ info . LastWriteTimeUtc } `!") ;
509508 }
510- Assert . IsTrue ( info . LastWriteTimeUtc > start , $ "`{ file } ` is older than `{ start } `, with a timestamp of `{ info . LastWriteTimeUtc } `!") ;
511509 }
512510
513511 //One last build with no changes
@@ -1186,12 +1184,6 @@ public void BuildBasicApplicationCheckMdbRepeatBuild ()
11861184 File . Exists ( Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android/assets/UnnamedProject.pdb" ) ) ,
11871185 "UnnamedProject.dll.mdb must be copied to the Intermediate directory" ) ;
11881186 Assert . IsTrue ( b . Build ( proj ) , "second build failed" ) ;
1189- Assert . IsTrue (
1190- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
1191- "the _CopyMdbFiles target should be skipped" ) ;
1192- Assert . IsTrue (
1193- b . Output . IsTargetSkipped ( "_CopyPdbFiles" ) ,
1194- "the _CopyPdbFiles target should be skipped" ) ;
11951187 Assert . IsTrue (
11961188 File . Exists ( Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android/assets/UnnamedProject.dll.mdb" ) ) ||
11971189 File . Exists ( Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android/assets/UnnamedProject.pdb" ) ) ,
@@ -1251,39 +1243,39 @@ public Class2 ()
12511243 Assert . IsTrue ( libb . Build ( lib ) , "Library1 Build should have succeeded." ) ;
12521244 using ( var b = CreateApkBuilder ( Path . Combine ( path , "App1" ) ) ) {
12531245 Assert . IsTrue ( b . Build ( proj ) , "App1 Build should have succeeded." ) ;
1254- var assetsPdb = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android" , "assets" , "Library1.pdb" ) ;
1255- var linkDst = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linkdst" , "Library1.pdb" ) ;
1256- var linkSrc = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linksrc" , "Library1.pdb" ) ;
1246+ var intermediate = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath ) ;
1247+ var outputPath = Path . Combine ( Root , b . ProjectDirectory , proj . OutputPath ) ;
1248+ var assetsPdb = Path . Combine ( intermediate , "android" , "assets" , "Library1.pdb" ) ;
1249+ var linkDst = Path . Combine ( intermediate , "linkdst" , "Library1.pdb" ) ;
1250+ var binSrc = Path . Combine ( outputPath , "Library1.pdb" ) ;
12571251 Assert . IsTrue (
12581252 File . Exists ( assetsPdb ) ,
12591253 "Library1.pdb must be copied to Intermediate directory" ) ;
12601254 Assert . IsFalse (
12611255 File . Exists ( linkDst ) ,
12621256 "Library1.pdb should not be copied to linkdst directory because it has no Abstrsact methods to fix up." ) ;
12631257 Assert . IsTrue (
1264- File . Exists ( linkSrc ) ,
1265- "Library1.pdb must be copied to linksrc directory" ) ;
1266- var outputPath = Path . Combine ( Root , b . ProjectDirectory , proj . OutputPath ) ;
1258+ File . Exists ( binSrc ) ,
1259+ "Library1.pdb must be copied to bin directory" ) ;
12671260 using ( var apk = ZipHelper . OpenZip ( Path . Combine ( outputPath , proj . PackageName + "-Signed.apk" ) ) ) {
12681261 var data = ZipHelper . ReadFileFromZip ( apk , "assemblies/Library1.pdb" ) ;
12691262 if ( data == null )
12701263 data = File . ReadAllBytes ( assetsPdb ) ;
1271- var filedata = File . ReadAllBytes ( linkSrc ) ;
1272- Assert . AreEqual ( filedata . Length , data . Length , "Library1.pdb in the apk should match {0}" , linkSrc ) ;
1264+ var filedata = File . ReadAllBytes ( binSrc ) ;
1265+ Assert . AreEqual ( filedata . Length , data . Length , "Library1.pdb in the apk should match {0}" , binSrc ) ;
12731266 }
1274- linkDst = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linkdst" , "App1.pdb" ) ;
1275- linkSrc = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linksrc" , "App1.pdb" ) ;
1267+ linkDst = Path . Combine ( intermediate , "linkdst" , "App1.pdb" ) ;
1268+ binSrc = Path . Combine ( outputPath , "App1.pdb" ) ;
12761269 Assert . IsTrue (
12771270 File . Exists ( linkDst ) ,
12781271 "App1.pdb should be copied to linkdst directory because it has Abstrsact methods to fix up." ) ;
12791272 Assert . IsTrue (
1280- File . Exists ( linkSrc ) ,
1281- "App1.pdb must be copied to linksrc directory" ) ;
1282- FileAssert . AreEqual ( linkSrc , linkDst , "{0} and {1} should not differ." , linkSrc , linkDst ) ;
1283- linkDst = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linkdst" , "App1.dll" ) ;
1284- linkSrc = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "linksrc" , "App1.dll" ) ;
1285- FileAssert . AreEqual ( linkSrc , linkDst , "{0} and {1} should match." , linkSrc , linkDst ) ;
1286-
1273+ File . Exists ( binSrc ) ,
1274+ "App1.pdb must be copied to bin directory" ) ;
1275+ FileAssert . AreEqual ( binSrc , linkDst , "{0} and {1} should not differ." , binSrc , linkDst ) ;
1276+ linkDst = Path . Combine ( intermediate , "linkdst" , "App1.dll" ) ;
1277+ binSrc = Path . Combine ( outputPath , "App1.dll" ) ;
1278+ FileAssert . AreEqual ( binSrc , linkDst , "{0} and {1} should match." , binSrc , linkDst ) ;
12871279 }
12881280 }
12891281 }
@@ -1332,15 +1324,9 @@ public void BuildBasicApplicationCheckMdbAndPortablePdb ()
13321324 File . Exists ( Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android" , "assets" , "NetStandard16.pdb" ) ) ,
13331325 "NetStandard16.pdb must be copied to Intermediate directory" ) ;
13341326 Assert . IsTrue ( b . Build ( proj , doNotCleanupOnUpdate : true ) , "second build failed" ) ;
1335- Assert . IsTrue (
1336- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
1337- "the _CopyMdbFiles target should be skipped" ) ;
13381327 var lastTime = File . GetLastWriteTimeUtc ( pdbToMdbPath ) ;
13391328 pdb . Timestamp = DateTimeOffset . UtcNow ;
13401329 Assert . IsTrue ( b . Build ( proj , doNotCleanupOnUpdate : true ) , "third build failed" ) ;
1341- Assert . IsFalse (
1342- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
1343- "the _CopyMdbFiles target should not be skipped" ) ;
13441330 Assert . Less ( lastTime ,
13451331 File . GetLastWriteTimeUtc ( pdbToMdbPath ) ,
13461332 "{0} should have been updated" , pdbToMdbPath ) ;
@@ -2876,16 +2862,10 @@ public void BuildBasicApplicationCheckPdb ()
28762862 }
28772863 b . BuildLogFile = "build1.log" ;
28782864 Assert . IsTrue ( b . Build ( proj , doNotCleanupOnUpdate : true ) , "second build failed" ) ;
2879- Assert . IsTrue (
2880- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
2881- "the _CopyMdbFiles target should be skipped" ) ;
28822865 b . BuildLogFile = "build2.log" ;
28832866 var lastTime = File . GetLastWriteTimeUtc ( pdbToMdbPath ) ;
28842867 pdb . Timestamp = DateTimeOffset . UtcNow ;
28852868 Assert . IsTrue ( b . Build ( proj , doNotCleanupOnUpdate : true ) , "third build failed" ) ;
2886- Assert . IsFalse (
2887- b . Output . IsTargetSkipped ( "_CopyMdbFiles" ) ,
2888- "the _CopyMdbFiles target should not be skipped" ) ;
28892869 Assert . Less ( lastTime ,
28902870 File . GetLastWriteTimeUtc ( pdbToMdbPath ) ,
28912871 "{0} should have been updated" , pdbToMdbPath ) ;
0 commit comments