Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up test runs on WSL2 a lot (citusdata#5736)
It turns out `whereis` is incredibly slow on WSL2 (at least on my machine): ``` $ time whereis diff diff: /usr/bin/diff /usr/share/man/man1/diff.1.gz real 0m0.408s user 0m0.010s sys 0m0.101s ``` This command is run by our custom `diff` script, which is run for every test file that is run. So this adds lots of unnecessary runtime time to tests. This changes our custom `diff` script to only call `whereis` in the strange case that `/usr/bin/diff` does not exist. The impact of this small change on the total runtime of the tests on WSL is huge. As an example the following command takes 18 seconds without this change and 7 seconds with it: ``` make -C src/test/regress/ check-arbitrary-configs CONFIGS=PostgresConfig ```
- Loading branch information