Commit 61962261 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

first working version of configure script call from equivalence test

refs 727
parent 95d25265
......@@ -11,6 +11,7 @@ Bundle-Activator: org.fortiss.af3.tools.ToolsActivator
Require-Bundle: org.fortiss.af3.expression;bundle-version="2.1.0";visibility:=reexport
Export-Package: org.fortiss.af3.tools,
org.fortiss.af3.tools.base,
org.fortiss.af3.tools.gcc,
org.fortiss.af3.tools.nusmv.model,
org.fortiss.af3.tools.nusmv.model.assign,
org.fortiss.af3.tools.nusmv.model.assign.impl,
......
......@@ -41,7 +41,7 @@ import org.fortiss.tooling.kernel.model.INamedElement;
public abstract class SimpleToolRunnerBase<T> extends ToolRunnerBase<INamedElement, T> {
/** The file or location used by this tool runner. */
private final File physicalFile;
protected final File physicalFile;
/** Constructor. */
public SimpleToolRunnerBase(File physicalFileOrLocation) {
......
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2012 ForTISS GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.tools.gcc;
import static org.eclipse.core.runtime.Assert.isTrue;
import java.io.File;
import org.fortiss.af3.tools.base.ILazyResult;
import org.fortiss.af3.tools.base.IResultBuilder;
/**
* Tool runner class for running Shell scripts (e.g the configure script).
*
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
*/
public class ConfigureRunner extends GCCToolChainRunnerBase {
/** The configure script file. */
private final File configureScript;
/** Constructor. */
public ConfigureRunner(File sourceDirectory) {
super(sourceDirectory);
isTrue(sourceDirectory.isDirectory());
this.configureScript = new File(sourceDirectory, "configure");
isTrue(configureScript.canExecute());
}
/** {@inheritDoc} */
@Override
public ILazyResult<File> runTool() throws Exception {
return null;
}
/** {@inheritDoc} */
@Override
protected String getToolCommand() {
return configureScript.getAbsolutePath();
}
/** {@inheritDoc} */
@Override
public IResultBuilder<File> getResultBuilder() {
// FIXME: not gcc
return new GCCResultBuilder();
}
/** {@inheritDoc} */
@Override
public String[] getCommandList() {
// FIXME: -version
return new String[] {getVersionOption()};
}
/** {@inheritDoc} */
@Override
protected String getVersionOption() {
return "";
}
/** {@inheritDoc} */
@Override
protected String getVersionInfo(String helpMessage) {
int startOfVersioningInfo = helpMessage.indexOf("Success. ");
return helpMessage.substring(startOfVersioningInfo, startOfVersioningInfo + 8);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment