Debian Codegraph @

debian/patches/0005-outofdate-test.patch

raw symbols SCIP
1 Descriptionscip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/patches/`0005-outofdate-test.patch`#Description.: address intermittent test failures
2 Update "outofdate" test case to ensure that the simulated build artifacts
3 (outofdate/gen/*) have dates strictly later than the source files.
4 .
5 It appears that the tests were failure due to a race where "file.done"
6 was considered out of date and thus appeared in the source set, despite
7 being configured as up to date in the test case.
8 .
9 That said, it's not clear to me how it ever worked in the first place
10 given the logic in OutOfData.outOfDate():
11 .
12 if ((!ret) && (sourceFile != null)) {
13 ret = sourceFile.lastModified() > targetFile.lastModified();
14 }
15 .
16 My assumption is that the test was previously broken/flaky, but that time
17 was chunkier (larger quanta) until recently and so the source files had
18 the same timestamp and so weren't strictly newer.
19 .
20 This patch also adds the fork=true attribute to the junit task, which
21 resolves spurious test failures observed after the OutOfDate test was
22 patched.
23 Authorscip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/patches/`0005-outofdate-test.patch`#Author.: tony mancill <[email protected]scip-debian . . . identity/`[email protected]`.>
24 Originscip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/patches/`0005-outofdate-test.patch`#Origin.: vendor
25 Bug-Debianscip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/patches/`0005-outofdate-test.patch`#Bug-Debian.: https://bugs.debian.org/907763scip-debian-bts debian-bts . . 907763:
26 Forwardedscip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/patches/`0005-outofdate-test.patch`#Forwarded.: no
27 Last-Updatescip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/patches/`0005-outofdate-test.patch`#Last-Update.: 2018-09-03
28
29 --- a/test/resources/logic/outofdate.xmlscip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/upstream/`test/resources/logic/outofdate.xml`:
30 +++ b/test/resources/logic/outofdate.xmlscip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/upstream/`test/resources/logic/outofdate.xml`:
31 @@ -92,14 +92,6 @@
32 </target>
33
34 <target name="outofdate.init">
35 - <!-- generated -->
36 - <mkdir dir="outofdate/gen/1/2/3"/>
37 - <touch file="outofdate/gen/index.done"/>
38 - <touch file="outofdate/gen/1/2/file.done"/>
39 - <touch file="outofdate/gen/1/done.c"/>
40 - <touch file="outofdate/gen/1/done.h"/>
41 - <touch file="outofdate/gen/1/partial.c"/>
42 -
43 <!-- sources -->
44 <mkdir dir="outofdate/source/1/2/3"/>
45 <touch file="outofdate/source/newer.text"/>
46 @@ -108,6 +100,16 @@
47 <touch file="outofdate/source/1/done.y"/>
48 <touch file="outofdate/source/1/partial.y"/>
49
50 + <!-- guarantee that some time has elapsed -->
51 + <sleep milliseconds="1"/>
52 +
53 + <!-- generated -->
54 + <mkdir dir="outofdate/gen/1/2/3"/>
55 + <touch file="outofdate/gen/index.done"/>
56 + <touch file="outofdate/gen/1/2/file.done"/>
57 + <touch file="outofdate/gen/1/done.c"/>
58 + <touch file="outofdate/gen/1/done.h"/>
59 + <touch file="outofdate/gen/1/partial.c"/>
60 </target>
61
62 <target name="outofdate.test" depends="outofdate.init">
63 --- a/build.xmlscip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/upstream/`build.xml`:
64 +++ b/build.xmlscip-debian debian ant-contrib 1.0~b3+svn177-12 ant-contrib/upstream/`build.xml`:
65 @@ -279,7 +279,7 @@
66 <path refid="test.classpath" />
67 </pathconvert>
68
69 - <junit haltonfailure="false" haltonerror="false"
70 + <junit fork="true" haltonfailure="false" haltonerror="false"
71 errorproperty="junit.error" failureproperty="junit.failure">
72 <formatter type="brief" usefile="false"/>
73 <batchtest>