|
58 | 58 | //
|
59 | 59 | //
|
60 | 60 | // Phase 4: Same command as in phase 3, but check that none of the cached modules are rebuilt.
|
| 61 | +// (The initial touch commands here are redundant, but are repeated to remind the reader of context.) |
| 62 | +// RUN: touch -t 201401240006 %t/LeafModule.swiftinterface |
| 63 | +// RUN: touch -t 201401240007 %t/OtherModule.swiftinterface |
| 64 | +// RUN: touch -t 201401240007 %t/modulecache/LeafModule-*.swiftmodule |
| 65 | +// RUN: touch -t 201401240008 %t/TestModule.swiftmodule |
| 66 | +// RUN: touch -t 201401240008 %t/modulecache/OtherModule-*.swiftmodule |
61 | 67 | // RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
| 68 | +// (Reset TestModule to where it was moments ago) |
62 | 69 | // RUN: touch -t 201401240008 %t/TestModule.swiftmodule
|
| 70 | +// (Check that TestModule -- at minute 08 -- is still not-older than the two cached modules, which should still be at minutes 08 and 07.) |
63 | 71 | // RUN: test ! %t/TestModule.swiftmodule -ot %t/modulecache/OtherModule-*.swiftmodule
|
64 | 72 | // RUN: test ! %t/TestModule.swiftmodule -ot %t/modulecache/LeafModule-*.swiftmodule
|
65 | 73 | //
|
66 | 74 | //
|
67 | 75 | // Phase 5: change the mtime on LeafModule.swiftinterface and watch LeafModule-*.swiftmodule and OtherModule-*.swiftmodule recompile.
|
| 76 | +// (The initial touch commands here are redundant, but are repeated to remind the reader of context.) |
| 77 | +// RUN: touch -t 201401240006 %t/LeafModule.swiftinterface |
| 78 | +// RUN: touch -t 201401240007 %t/OtherModule.swiftinterface |
| 79 | +// RUN: touch -t 201401240007 %t/modulecache/LeafModule-*.swiftmodule |
| 80 | +// RUN: touch -t 201401240008 %t/TestModule.swiftmodule |
| 81 | +// RUN: touch -t 201401240008 %t/modulecache/OtherModule-*.swiftmodule |
| 82 | +// (Push LeafModule's interface forward 10 minutes from the minute 06 timestamp stored in both cached modules, invalidating them) |
68 | 83 | // RUN: touch -t 201401240016 %t/LeafModule.swiftinterface
|
69 | 84 | // RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
| 85 | +// (Check that the two cached modules were rebuit -- that the LeafModule.swiftinterface at minute 16 is older than them.) |
70 | 86 | // RUN: test %t/LeafModule.swiftinterface -ot %t/modulecache/LeafModule-*.swiftmodule
|
71 | 87 | // RUN: test %t/LeafModule.swiftinterface -ot %t/modulecache/OtherModule-*.swiftmodule
|
72 | 88 | //
|
73 | 89 | //
|
74 | 90 | // Phase 6: change the mtimes on LeafModule-*.swiftmodule and OtherModule.swiftinterface, and watch just OtherModule-*.swiftmodule recompile, leaving LeafModule-*.swiftmodule alone.
|
| 91 | +// (The initial touch commands here are redundant, but are repeated to remind the reader of context.) |
| 92 | +// RUN: touch -t 201401240016 %t/LeafModule.swiftinterface |
| 93 | +// RUN: touch -t 201401240007 %t/OtherModule.swiftinterface |
| 94 | +// RUN: touch %t/modulecache/LeafModule-*.swiftmodule |
| 95 | +// RUN: touch %t/modulecache/OtherModule-*.swiftmodule |
| 96 | +// (Perturb LeafModule's cached module and OtherModule's interface mtimes, so they do not match values stored in OtherModule's cached module.) |
75 | 97 | // RUN: touch -t 201401240016 %t/modulecache/LeafModule-*.swiftmodule
|
76 | 98 | // RUN: touch -t 201401240017 %t/OtherModule.swiftinterface
|
77 | 99 | // RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
| 100 | +// (Check that Othermodule.swiftinterface at minute 17 is not older than the LeafModule's cached module which should still be at minute 16.) |
78 | 101 | // RUN: test ! %t/OtherModule.swiftinterface -ot %t/modulecache/LeafModule-*.swiftmodule
|
| 102 | +// (Check that Othermodule.swiftinterface at minute 17 _is_ older than the OtherModule's cached module, which was just rebuilt.) |
79 | 103 | // RUN: test %t/OtherModule.swiftinterface -ot %t/modulecache/OtherModule-*.swiftmodule
|
80 | 104 | //
|
81 | 105 | //
|
82 |
| -// Phase 7: change the size on LeafModule.swiftinterface (keeping mtime fixed) and watch LeafModule-*.swiftmodule and OtherModule-*.swiftmodule recompile. |
| 106 | +// Phase 7: change the _size_ on LeafModule.swiftinterface (keeping mtime fixed) and watch LeafModule-*.swiftmodule and OtherModule-*.swiftmodule recompile. |
| 107 | +// (The initial touch commands here are redundant, but are repeated to remind the reader of context.) |
| 108 | +// RUN: touch -t 201401240016 %t/LeafModule.swiftinterface |
| 109 | +// RUN: touch -t 201401240016 %t/modulecache/LeafModule-*.swiftmodule |
| 110 | +// RUN: touch -t 201401240017 %t/OtherModule.swiftinterface |
83 | 111 | // RUN: touch -t 201401240017 %t/modulecache/OtherModule-*.swiftmodule
|
| 112 | +// (Perturb the size of the LeafModule interface while keeping its mtime fixed.) |
84 | 113 | // RUN: echo '// size change' >>%t/LeafModule.swiftinterface
|
85 | 114 | // RUN: touch -t 201401240016 %t/LeafModule.swiftinterface
|
86 | 115 | // RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
| 116 | +// (Check that both of the cached modules were rebuilt and are now newer than their respective interfaces.) |
87 | 117 | // RUN: test %t/LeafModule.swiftinterface -ot %t/modulecache/LeafModule-*.swiftmodule
|
88 |
| -// RUN: test %t/LeafModule.swiftinterface -ot %t/modulecache/OtherModule-*.swiftmodule |
| 118 | +// RUN: test %t/OtherModule.swiftinterface -ot %t/modulecache/OtherModule-*.swiftmodule |
89 | 119 |
|
90 | 120 | import OtherModule
|
91 | 121 |
|
|
0 commit comments