Commit 6a10fdb6 authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

Disable using the options '--daystart' and '--[acm]min' simultaneously

This is a legacy commit from before 2015-05-18.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 5333
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 67a2d229
......@@ -173,6 +173,12 @@ HALFDAYAGO=$(shell date --date "now 12 hours ago" +"%Y%m%d%H%M")
ONEDAYAGO=$(shell date --date "now 1 day ago" +"%Y%m%d%H%M")
ONEDAYONEMINUTEAGO=$(shell date --date "now 1 day ago 1 minute ago" \
+"%Y%m%d%H%M")
ONEDAYTWOMINUTESAGO=$(shell date --date "now 1 day ago 2 minute ago" \
+"%Y%m%d%H%M")
ONEDAYTHREEMINUTESAGO=$(shell date --date "now 1 day ago 3 minute ago" \
+"%Y%m%d%H%M")
ONEDAYFOURMINUTESAGO=$(shell date --date "now 1 day ago 4 minute ago" \
+"%Y%m%d%H%M")
ONEDAYMINUSONEMINUTEAGO=$(shell date --date "now 23 hours ago 59 minutes ago" \
+"%Y%m%d%H%M")
ONEDAYMINUSTWOMINUTESAGO=$(shell date --date "now 23 hours ago 58 minutes ago" \
......@@ -211,6 +217,12 @@ $(TESTDIR)/threeDaysAgo: $(TESTDIR)
touch -t $(THREEDAYSAGO) $@
$(TESTDIR)/oneDayOneMinuteAgo: $(TESTDIR)
touch -t $(ONEDAYONEMINUTEAGO) $@
$(TESTDIR)/oneDayTwoMinutesAgo: $(TESTDIR)
touch -t $(ONEDAYTWOMINUTESAGO) $@
$(TESTDIR)/oneDayThreeMinutesAgo: $(TESTDIR)
touch -t $(ONEDAYTHREEMINUTESAGO) $@
$(TESTDIR)/oneDayFourMinutesAgo: $(TESTDIR)
touch -t $(ONEDAYFOURMINUTESAGO) $@
$(TESTDIR)/oneDayMinusOneMinuteAgo: $(TESTDIR)
touch -t $(ONEDAYMINUSONEMINUTEAGO) $@
$(TESTDIR)/oneDayMinusTwoMinutesAgo: $(TESTDIR)
......@@ -220,7 +232,8 @@ $(TESTDIR)/oneDayMinusTwoMinutesAgo: $(TESTDIR)
testEnv: $(addprefix $(TESTDIR)/, now halfDayAgo oneDayAgo twoDaysAgo \
oneDayOneMinuteAgo oneDayMinusOneMinuteAgo oneDayMinusTwoMinutesAgo \
threeDaysAgo twoMinutesAgo threeMinutesAgo fourMinutesAgo \
twoAndHalfMinutesAgo)
twoAndHalfMinutesAgo oneDayTwoMinutesAgo oneDayThreeMinutesAgo \
oneDayFourMinutesAgo)
tests: $(TESTS)
......@@ -251,7 +264,8 @@ $(TESTRESULTDIR)/test0.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 0: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort > $@
$(TESTRESULTDIR)/test0.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
find $(word 2,$^) -type f $(FIND_CONFIG) -printf "%f\n" | sort > $@
......@@ -266,7 +280,8 @@ $(TESTRESULTDIR)/test1.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 1: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | \
sort | grep -v -e "checksumfile.cs" > $@
$(TESTRESULTDIR)/test1.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
......@@ -282,7 +297,8 @@ $(TESTRESULTDIR)/test2.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 2: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort > $@
$(TESTRESULTDIR)/test2.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
find $(word 2,$^) -type f $(FIND_CONFIG) -printf "%f\n" | sort > $@
......@@ -297,7 +313,8 @@ $(TESTRESULTDIR)/test3.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 3: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | \
sort | grep -v -e "checksumfile.cs" > $@
$(TESTRESULTDIR)/test3.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
......@@ -313,7 +330,8 @@ $(TESTRESULTDIR)/test4.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 4: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort | \
grep -v -e "checksumfile.cs" > $@
$(TESTRESULTDIR)/test4.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
......@@ -330,7 +348,8 @@ $(TESTRESULTDIR)/test5.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 5: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort > $@
$(TESTRESULTDIR)/test5.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
find $(word 2,$^) $(FIND_CONFIG) -printf "%f\n" | sort > $@
......@@ -345,7 +364,8 @@ $(TESTRESULTDIR)/test6.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 6: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort | \
grep -v -e "checksumfile.cs" > $@
$(TESTRESULTDIR)/test6.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
......@@ -361,7 +381,8 @@ $(TESTRESULTDIR)/test7.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 7: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort > $@
$(TESTRESULTDIR)/test7.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
find $(word 2,$^) $(FIND_CONFIG) -printf "%f\n" | sort > $@
......@@ -376,7 +397,8 @@ $(TESTRESULTDIR)/test8.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 8: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort | \
grep -v -e 'checksumfile.cs' > $@
$(TESTRESULTDIR)/test8.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
......@@ -392,7 +414,8 @@ $(TESTRESULTDIR)/test9.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 9: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort | \
grep -v -e "checksumfile.cs" > $@
$(TESTRESULTDIR)/test9.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
......@@ -408,7 +431,8 @@ $(TESTRESULTDIR)/test10.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 10: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort | \
grep -v -e "checksumfile.cs" > $@
$(TESTRESULTDIR)/test10.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
......@@ -424,7 +448,8 @@ $(TESTRESULTDIR)/test11.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 11: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort > $@
$(TESTRESULTDIR)/test11.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
find $(word 2,$^) $(FIND_CONFIG) -printf "%f\n" | sort > $@
......@@ -439,7 +464,8 @@ $(TESTRESULTDIR)/test12.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 12: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort | \
grep -v -e "checksumfile.cs" > $@
$(TESTRESULTDIR)/test12.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
......@@ -455,26 +481,28 @@ $(TESTRESULTDIR)/test13.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
@echo -ne "TEST 13: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort | \
grep -v -e "checksumfile.cs" > $@
$(TESTRESULTDIR)/test13.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
find $(word 2,$^) $(FIND_CONFIG) -printf "%f\n" | sort > $@
test14: $(TESTRESULTDIR)/test14.result
$(TESTRESULTDIR)/test14.result: $(TESTRESULTDIR)/test14.csbackgen.result \
$(TESTRESULTDIR)/test14.find.result
$(TESTRESULTDIR)/test14.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
test100: $(TESTRESULTDIR)/test100.result
$(TESTRESULTDIR)/test100.result: $(TESTRESULTDIR)/test100.csbackgen.result \
$(TESTRESULTDIR)/test100.find.result
$(TESTRESULTDIR)/test100.csbackgen.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
$(eval CONFIG:= $(shell echo "--mmin 0"))
$(eval FIND_CONFIG:= $(shell echo "-type f -mmin 0"))
@echo -ne "----\n"
@echo -ne "TEST 14: $(CONFIG)\n"
@echo -ne "TEST 100: $(CONFIG)\n"
@echo -ne "----\n"
csbackgen -n --debug $(CONFIG) $(word 2,$^) | \
sed -n '/List of excluded files:/,/308/p' | sed -e '1d' -e '$$d' | \
sed -n '/List of excluded files:/,/A checksum will be generated/p' | \
sed -e '1d' -e '$$d' | \
awk '{$$1=$$2=$$3=""; print $$0}' | sed -e 's/^[[:space:]]*//' | sort | \
grep -v -e "checksumfile.cs" > $@
$(TESTRESULTDIR)/test14.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
$(TESTRESULTDIR)/test100.find.result: testEnv $(TESTDIR) $(TESTRESULTDIR)
find $(word 2,$^) $(FIND_CONFIG) -printf "%f\n" | sort > $@
# ----- END OF Makefile -----
......@@ -554,9 +554,12 @@ class CsTimeProcessor:
try:
start = datetime.now()
#start = now-timedelta(microseconds=now.microsecond)
if self.daystart:
t = time(0)
start = datetime.combine(date.today(),t)
if self.daystart and len(self.min) != 0:
raise CsFileError("Using option '--daystart' additionally to \
'--[acm]min #' is not supported.", eCodes.GLOBAL_NotImplemented)
# FIXME: Implementation of *nix find in this case seems quite confusing.
#t = time(0)
#start = datetime.combine(date.today(),t)
minPlus = 0
minMinus = 0
......
Markdown is supported
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