Make test_bitcoin run in a temp datadir #2049

pull sipa wants to merge 2 commits into bitcoin:master from sipa:testtmp changing 3 files +30 −0
  1. sipa commented at 9:02 PM on November 28, 2012: member

    Apparently, test_bitcoin has been silently corrupting $DATADIR/blocks/blk00000.dat and rev00000.dat since ultraprune was merged...

  2. Add GetTempPath() to util 597fa4cd63
  3. Make test_bitcoin run in a temp datadir 487db8a2b1
  4. BitcoinPullTester commented at 9:41 PM on November 29, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/487db8a2b134d8ef62dff09e29bcc266d2883eec for binaries and test log.

  5. jgarzik commented at 10:29 PM on November 30, 2012: contributor

    Pretty decent. Only nit: Unix standard is $TMPDIR, and fall back to hardcoded /tmp if that fails. But maybe boost already covers that.

  6. gavinandresen commented at 10:43 PM on November 30, 2012: contributor

    ACK

  7. sipa commented at 11:21 PM on November 30, 2012: member

    @jgarzik boost::filesystem::temp_directory_path indeed tries that (and 3 other env variables), and falls back to /tmp afterwards. It is only available in boost filesystem v3 though (introduced in 1.44).

  8. jgarzik commented at 11:55 PM on November 30, 2012: contributor

    ACK

  9. sipa referenced this in commit da26a030b3 on Nov 30, 2012
  10. sipa merged this on Nov 30, 2012
  11. sipa closed this on Nov 30, 2012

  12. sipa deleted the branch on May 3, 2013
  13. laudney referenced this in commit 3cf5c5ea5c on Mar 19, 2014
  14. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me