/** * Get the test suite specifications from the suite file, apply the options to all, and report any * messages to the holder. * * @param suitePath the String path to the harness suite file * @param options the String[] options for the tests - may be null * @param holder the IMessageHolder for any messages - may be null * @return AjcTest.Suite.Spec test descriptions (non-null but empty if some error) */ public static AjcTest.Suite.Spec getSuiteSpec( String suitePath, String[] options, IMessageHolder holder) { if (null == suitePath) { MessageUtil.fail(holder, "null suitePath"); return EmptySuite.ME; } File suiteFile = new File(suitePath); if (!suiteFile.canRead() || !suiteFile.isFile()) { MessageUtil.fail(holder, "unable to read file " + suitePath); return EmptySuite.ME; } try { AjcTest.Suite.Spec tempSpec; AbstractRunSpec.RT runtime = new AbstractRunSpec.RT(); tempSpec = AjcSpecXmlReader.getReader().readAjcSuite(suiteFile); tempSpec.setSuiteDirFile(suiteFile.getParentFile()); if (null == options) { options = new String[0]; } runtime.setOptions(options); boolean skip = !tempSpec.adoptParentValues(runtime, holder); if (skip) { tempSpec = EmptySuite.ME; } return tempSpec; } catch (IOException e) { MessageUtil.abort(holder, "IOException", e); return EmptySuite.ME; } }