Automatically execute the CLI sanity check for plugins

This commit is contained in:
Kohsuke Kawaguchi committed 2011-10-28 17:31:46 -07:00
1 parent dc716da16b
commit d2b16af4e4
1 file changed
+10 -1
@@ -23,6 +23,7 @@
*/
package org.jvnet.hudson.test;
import hudson.cli.CLICommand;
import junit.framework.TestSuite;
import java.io.File;
@@ -53,7 +54,9 @@ public class PluginAutomaticTestBuilder {
File outputDirectory = new File((String)params.get("outputDirectory"));
suite.addTest(JellyTestSuiteBuilder.build(outputDirectory,toBoolean(params.get("requirePI"))));
}
suite.addTestSuite(CliSanityTest.class);
return suite;
}
@@ -69,4 +72,10 @@ public class PluginAutomaticTestBuilder {
private static boolean notSkipTests(String propertyName) {
return !Boolean.getBoolean("hpiTest.skip"+propertyName);
}
public static class CliSanityTest extends HudsonTestCase {
public void testCliSanity() {
CLICommand.clone("help");
}
}
}