This patch reduces the runtime of TestGlobalModuleCache from 27s to 3-4s. There are three reasons for why the old test was slow: * We did a sleep for 2s to ensure the source code file had a newer time stamp and Make would rebuild the project. Instead, we now just age all times on disk by 10s into the past to do the same thing. I'm not sure how many other tests need to do this, but introducing a utility method for forced in-place rebuild would be a good follow up. * We additionally slept even for the first initial build, which wasn't needed as there is nothing to rebuild. * I removed some of the system includes in the source files which are also not needed.
5 lines
58 B
C
5 lines
58 B
C
int counter = 1;
|
|
int main() {
|
|
return 0; // break here
|
|
}
|