macOS testfixture test failures on Mac for SqlCipher 4.4.2

I built SQLCipher 4.4.2 on MacOS from OpenSSL and SqlCipher source code.

My understanding is “make test” might run into failures because the encryption gets in the way of the sqlite3 tests.

When I run “./testfixture test/sqlcipher.test” as per the instructions, I see these failures:

6 errors out of 179 tests on mac.local Darwin 64-bit little-endian
!Failures on these tests: codec-error-journal-delete codec-error-journal-wal codec-error-journal-wal-transaction codec-error-journal-wal-read export-database export-attached-database

My configure command line looks like this:
./configure --prefix=$PWD/../build --exec-prefix=$PWD/../build --with-tcl=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tcl.framework --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -I/openssl-OpenSSL_1_1_1h/build/include" LDFLAGS="-L/openssl-OpenSSL_1_1_1h/build/lib" LIBS="-lcrypto"

How can I get these tests to pass?


Hey @JohnGa

Thank you for your interest in SQLCipher and for posting to the discussion forum.

To your configure command, please add --enable-fts and -DSQLCIPHER_TEST to your CFLAGS.

We’ll update the documentation to reflect this.

Please let me know if this allows all the tests from the testfixture to pass properly for you.

@mmoore Thanks for taking the time to reply to my post.

It said --enable-fts is unknown. Looking at the help from configure, I saw other options and added “–enable-fts5” (thinking that this would be latest and best to use). With “–enable-fts5” and with -DSQLCIPHER_TEST added to CFLAGS, all tests pass.

Thanks again for your help.

In order to do “make testfixture” I have to specify the “–with-tcl” option and give it the path to Tcl. For, the regular build, I see that disabling tcl is used. What do you recommend for this? Do two separate “configure + build” steps, one with --with-tcl to be able to run the tests, and another with --disable-tcl for regular library build?

Sorry about that typo, --enable-fts5 is correct. Glad to hear all the tests are passing now.

If you’re planning on making the testfixure as well, you should be able to just configure once with either the --with-tcl path specified or adding -ltcl8.5 to your linker flags.

@mmoore This completely resolves my issues. Thanks for all your help.