Skip to content
Snippets Groups Projects
Commit 54cf8e60 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- fixed test

parent 75443154
Branches
No related tags found
No related merge requests found
...@@ -29,6 +29,10 @@ SOURCES=java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.j ...@@ -29,6 +29,10 @@ SOURCES=java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.j
OBJS=$(SOURCES:.java=.class) OBJS=$(SOURCES:.java=.class)
JAR=SLUBVirusCheckPlugin.jar JAR=SLUBVirusCheckPlugin.jar
BUILD:=build/ BUILD:=build/
export CMD=/usr/bin/java -cp $(CLASSPATH):$(JUNITCLASSPATH):$(JAR) org.slub.rosetta.dps.repository.plugin.SLUBVirusCheckClamAVPlugin
#export CMD=echo SIGNATURE: Eicar-Signature
CMD_EICAR:=$(shell ${CMD} EICAR/eicar | grep -F 'SIGNATURE:')
CMD_NOVIRUS:=$(shell ${CMD} Makefile | grep -F 'SIGNATURE:')
all: $(BUILD) $(JAR) all: $(BUILD) $(JAR)
...@@ -42,8 +46,19 @@ help: ...@@ -42,8 +46,19 @@ help:
jarclean: jarclean:
@rm -Rf $(BUILD) @rm -Rf $(BUILD)
test: $(OBJS) test: $(OBJS)
java -cp ${CLASSPATH}:$(JUNITCLASSPATH):$(JAR) org.slub.rosetta.dps.repository.plugin.SLUBVirusCheckClamAVPlugin EICAR/eicar @echo -n "testing EICAR: "
ifeq "$(CMD_EICAR)" "RESULT: 2 SIGNATURE: Eicar-Signature"
@echo pass;
else
@echo fail; exit 2;
endif
@echo -n "testing No virus: "
ifeq "$(CMD_NOVIRUS)" "RESULT: 0 SIGNATURE: "
@echo pass;
else
@echo fail; exit 2;
endif
clean: jarclean clean: jarclean
@rm -Rf doc/ @rm -Rf doc/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment