Author: brett Date: Fri Dec 30 10:18:01 2011 New Revision: 1225782 URL: http://svn.apache.org/viewvc?rev=1225782&view=rev Log: only run ITs when prerequisite software is installed
Modified: incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AzureBootstrap.java incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_196_MvcSupportTest.java incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_330_VS2010MvcProjectSupportTest.java incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithMultipleRoles.java incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithWorkerRole.java incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_488_MSDeployPackageSimpleWebApp.java Modified: incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java?rev=1225782&r1=1225781&r2=1225782&view=diff ============================================================================== --- incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java (original) +++ incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AbstractNPandayIntegrationTestCase.java Fri Dec 30 10:18:01 2011 @@ -635,4 +635,15 @@ public abstract class AbstractNPandayInt return context; } + + + protected void skipIfMissing( String gac, String message ) + { + File f = new File( System.getenv( "SYSTEMROOT" ), "assembly/GAC_MSIL/" + gac ); + if ( !f.exists() || !f.isDirectory() ) + { + skipReason = message; + skip = true; + } + } } Modified: incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AzureBootstrap.java URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AzureBootstrap.java?rev=1225782&r1=1225781&r2=1225782&view=diff ============================================================================== --- incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AzureBootstrap.java (original) +++ incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/AzureBootstrap.java Fri Dec 30 10:18:01 2011 @@ -29,7 +29,9 @@ public class AzureBootstrap { public AzureBootstrap() { - super( "[1.5.0-incubating,)" ); + super( "[1.5.0-incubating,)", "[v4.0,)" ); + + skipIfMissing( "Microsoft.WindowsAzure.ServiceRuntime", "Azure SDK is not installed" ); } public void testBootstrap() Modified: incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_196_MvcSupportTest.java URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_196_MvcSupportTest.java?rev=1225782&r1=1225781&r2=1225782&view=diff ============================================================================== --- incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_196_MvcSupportTest.java (original) +++ incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_196_MvcSupportTest.java Fri Dec 30 10:18:01 2011 @@ -31,12 +31,7 @@ public class NPANDAY_196_MvcSupportTest { super( "[1.2,)", "[v3.5,)" ); - File f = new File( System.getenv( "SYSTEMROOT" ), "assembly/GAC_MSIL/System.Web.MVC" ); - if ( !f.exists() || !f.isDirectory() ) - { - skipReason = "MVC.NET is not installed"; - skip = true; - } + skipIfMissing( "System.Web.MVC", "MVC.NET is not installed" ); } public void testMVCProject() Modified: incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_330_VS2010MvcProjectSupportTest.java URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_330_VS2010MvcProjectSupportTest.java?rev=1225782&r1=1225781&r2=1225782&view=diff ============================================================================== --- incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_330_VS2010MvcProjectSupportTest.java (original) +++ incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_330_VS2010MvcProjectSupportTest.java Fri Dec 30 10:18:01 2011 @@ -31,12 +31,7 @@ public class NPANDAY_330_VS2010MvcProjec { super( "[1.4.0-incubating,)", "[v4.0.30319,)" ); - File f = new File( System.getenv( "SYSTEMROOT" ), "assembly/GAC_MSIL/System.Web.MVC" ); - if ( !f.exists() || !f.isDirectory() ) - { - skipReason = "MVC.NET is not installed"; - skip = true; - } + skipIfMissing( "System.Web.MVC", "MVC.NET is not installed" ); } public void testMVC2010Project() Modified: incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java?rev=1225782&r1=1225781&r2=1225782&view=diff ============================================================================== --- incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java (original) +++ incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_AzureSupportOneWebRole.java Fri Dec 30 10:18:01 2011 @@ -26,14 +26,14 @@ public class NPANDAY_480_AzureSupportOne { public NPANDAY_480_AzureSupportOneWebRole() { - super( "[1.5.0-incubating,)" ); + super( "[1.5.0-incubating,)", "[v4.0,)" ); + + skipIfMissing( "Microsoft.WindowsAzure.ServiceRuntime", "Azure SDK is not installed" ); } public void test() throws Exception { - // TODO: enable only if azure is installed - NPandayIntegrationTestContext context = createDefaultTestContext(); Verifier verifier = context.getPreparedVerifier(); Modified: incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithMultipleRoles.java URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithMultipleRoles.java?rev=1225782&r1=1225781&r2=1225782&view=diff ============================================================================== --- incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithMultipleRoles.java (original) +++ incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithMultipleRoles.java Fri Dec 30 10:18:01 2011 @@ -26,14 +26,14 @@ public class NPANDAY_480_CloudServiceWit { public NPANDAY_480_CloudServiceWithMultipleRoles() { - super( "[1.5.0-incubating,)" ); + super( "[1.5.0-incubating,)", "[v4.0,)" ); + + skipIfMissing( "Microsoft.WindowsAzure.ServiceRuntime", "Azure SDK is not installed" ); } public void test() throws Exception { - // TODO: enable only if azure is installed - NPandayIntegrationTestContext context = createDefaultTestContext(); Verifier verifier = context.getPreparedVerifier(); Modified: incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithWorkerRole.java URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithWorkerRole.java?rev=1225782&r1=1225781&r2=1225782&view=diff ============================================================================== --- incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithWorkerRole.java (original) +++ incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_480_CloudServiceWithWorkerRole.java Fri Dec 30 10:18:01 2011 @@ -26,14 +26,14 @@ public class NPANDAY_480_CloudServiceWit { public NPANDAY_480_CloudServiceWithWorkerRole() { - super( "[1.5.0-incubating,)" ); + super( "[1.5.0-incubating,)", "[v4.0,)" ); + + skipIfMissing( "Microsoft.WindowsAzure.ServiceRuntime", "Azure SDK is not installed" ); } public void test() throws Exception { - // TODO: enable only if azure is installed - NPandayIntegrationTestContext context = createDefaultTestContext(); Verifier verifier = context.getPreparedVerifier(); Modified: incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_488_MSDeployPackageSimpleWebApp.java URL: http://svn.apache.org/viewvc/incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_488_MSDeployPackageSimpleWebApp.java?rev=1225782&r1=1225781&r2=1225782&view=diff ============================================================================== --- incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_488_MSDeployPackageSimpleWebApp.java (original) +++ incubator/npanday/npanday-its/trunk/src/test/java/npanday/its/NPANDAY_488_MSDeployPackageSimpleWebApp.java Fri Dec 30 10:18:01 2011 @@ -21,19 +21,26 @@ package npanday.its; import org.apache.maven.it.Verifier; +import java.io.File; + public class NPANDAY_488_MSDeployPackageSimpleWebApp extends AbstractNPandayIntegrationTestCase { public NPANDAY_488_MSDeployPackageSimpleWebApp() { super( "[1.5.0-incubating,)" ); + + File f = new File( System.getenv( "PROGRAMFILES" ), "IIS/Microsoft Web Deploy V2" ); + if ( !f.exists() || !f.isDirectory() ) + { + skipReason = "Web Deploy 2.0 not installed"; + skip = true; + } } public void test() throws Exception { - // TODO: enable only if msdeploy is installed - NPandayIntegrationTestContext context = createDefaultTestContext(); Verifier verifier = context.getPreparedVerifier();