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

- fixed test

parent 75443154
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,10 @@ SOURCES=java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.j
OBJS=$(SOURCES:.java=.class)
JAR=SLUBVirusCheckPlugin.jar
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)
......@@ -43,7 +47,18 @@ jarclean:
@rm -Rf $(BUILD)
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
@rm -Rf doc/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment