Skip to content

Commit

Permalink
updated spoon analyzer to use jar file
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTimperley committed Jul 11, 2024
1 parent b8750f0 commit 60b3ed4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/kaskara/spoon/analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
from kaskara.loops import ProgramLoops
from kaskara.project import Project
from kaskara.spoon.analysis import SpoonFunction, SpoonStatement
from kaskara.spoon.common import BINARY_PATH
from kaskara.spoon.common import (
JAR_PATH,
JAVA_PATH,
)
from kaskara.statements import ProgramStatements


Expand Down Expand Up @@ -63,7 +66,9 @@ def run(self) -> Analysis:

paths_to_index_arg = " ".join(str(path) for path in paths_to_index)
command_args = [
BINARY_PATH,
JAVA_PATH,
"-jar",
JAR_PATH,
paths_to_index_arg,
"-o",
container_output_dir,
Expand Down
5 changes: 3 additions & 2 deletions src/kaskara/spoon/common.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
__all__ = (
"BINARY_PATH",
"IMAGE_ID_LABEL",
"IMAGE_NAME",
"JAVA_PATH",
"PLUGIN_LABEL",
"PLUGIN_LABEL_VALUE",
"VERSION_LABEL",
"VOLUME_LOCATION",
"VOLUME_NAME",
)

BINARY_PATH: str = "/opt/kaskara-spoon/bin/kaskara-spoon"
IMAGE_ID_LABEL: str = "kaskara.built-from-image-id"
IMAGE_NAME: str = "christimperley/kaskara:spoon"
JAR_PATH: str = "/opt/kaskara-spoon/kaskara-spoon.jar"
JAVA_PATH: str = "java"
PLUGIN_LABEL: str = "kaskara.plugin"
PLUGIN_LABEL_VALUE: str = "spoon"
VERSION_LABEL: str = "kaskara.version"
Expand Down

0 comments on commit 60b3ed4

Please sign in to comment.