Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirusCheckPlugin4Rosetta
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
VirusCheckPlugin4Rosetta
Commits
9074c751
Commit
9074c751
authored
2 years ago
by
Andreas Romeyke
Browse files
Options
Downloads
Patches
Plain Diff
- use shell tests instead makefile-tests, because lazy evaluation
parent
019494d5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+3
-10
3 additions, 10 deletions
Makefile
with
3 additions
and
10 deletions
Makefile
+
3
−
10
View file @
9074c751
...
...
@@ -25,6 +25,7 @@ SOURCES:=java/org/slub/rosetta/dps/repository/plugin/SLUBVirusCheckClamAVPlugin.
OBJS
:=
$(
SOURCES:.java
=
.class
)
JAR
:=
SLUBVirusCheckPlugin.jar
BUILD
:=
build/
SHELL
=
/bin/bash
all
:
$(BUILD) $(JAR)
...
...
@@ -75,20 +76,12 @@ check_prerequisites:
test_eicar
:
$(OBJS)
@
/usr/bin/java
-cp
$(
CLASSPATH
)
:
$(
JUNITCLASSPATH
)
:java org.slub.rosetta.dps.repository.plugin.SLUBVirusCheckClamAVPlugin EICAR/eicar |
grep
-F
'SIGNATURE:'
>
$@
@
echo
-n
"testing 'EICAR':"
ifeq
"$(shell cat test_eicar)" "RESULT: 2 SIGNATURE: Eicar-Signature"
@
echo
pass
;
else
@
echo
failed
;
exit
2
;
endif
@
if
[[
"
$$(
cat test_eicar
)
"
=
"RESULT: 2 SIGNATURE: Eicar-Signature"
]]
;
then
echo
pass
;
else
echo
failed
;
exit
2
;
fi
test_novirus
:
$(OBJS)
@
/usr/bin/java
-cp
$(
CLASSPATH
)
:
$(
JUNITCLASSPATH
)
:java org.slub.rosetta.dps.repository.plugin.SLUBVirusCheckClamAVPlugin Makefile |
grep
-F
'SIGNATURE:'
>
$@
@
echo
-n
"testing 'No virus': "
ifeq
"$(shell cat test_novirus)" "RESULT: 0 SIGNATURE: "
@
echo
pass
;
else
@
echo
fail
;
exit
2
;
endif
@
if
[[
"
$$(
cat test_novirus
)
"
=
"RESULT: 0 SIGNATURE: "
]]
;
then
echo
pass
;
else
echo
fail
;
exit
2
;
fi
test
:
test_eicar test_novirus
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment