make sampling_debug_test actually test debug malloc

We do shell wrapper for actual test run, so we can inspect output of
pprof. But when we set up sampling_debug_test.sh we simply copied
regular sampling_test.sh, which ran same non-debug test binary. Now we
sed-replace contents of shell program when copying, so we test right
binary.

Another thing we fix here is our (still hardcoded) test output path is
now different between sampling{,_debug}_test.sh. So this fixes main
cause of flakiness of our unit tests.
This commit is contained in:
Aliaksey Kandratsenka 2023-09-10 18:12:45 -04:00
parent 2748dd5680
commit 523b72f754
1 changed files with 2 additions and 1 deletions

View File

@ -1179,7 +1179,8 @@ sampling_debug_test_sh_SOURCES = src/tests/sampling_test.sh
sampling_debug_test.sh$(EXEEXT): $(top_srcdir)/$(sampling_test_sh_SOURCES) \
sampling_debug_test
rm -f $@
cp -p $(top_srcdir)/$(sampling_test_sh_SOURCES) $@
sed -e 's/sampling_test/sampling_debug_test/g' <$(top_srcdir)/$(sampling_test_sh_SOURCES) >$@
chmod +x $@
# This is the sub-program using by sampling_debug_test.sh
# The -g is so pprof can get symbol information.