vrischmann / zig-sqlite

zig-sqlite is a small wrapper around sqlite's C API, making it easier to use with Zig.
MIT License
367 stars 49 forks source link

Fix test build step for Mac OS X #134

Closed johnbcodes closed 1 year ago

johnbcodes commented 1 year ago

Description

Fixes the test build step issue I was having on Mac OS X. May also fix for others. Depends on #133.

Output on Mac OS X 13.x:

❯ zig build test -Din_memory=true --summary all
Build Summary: 5/5 steps succeeded; 52/52 tests passed
test success
└─ run x86_64-native-Debug-multi 52 passed 184ms MaxRSS:5M
   └─ zig test x86_64-native-Debug-multi Debug x86_64-native success 3s MaxRSS:322M
      ├─ zig build-lib sqlite Debug x86_64-native success 5s MaxRSS:496M
      └─ options success

Checklist

Build changes only, so no new tests

vrischmann commented 1 year ago

Nice. So yeah I think tests were never running regardless of the platform, I had the same issue on my Linux PC.

I think it's been like this for quite a while. Thanks for working on this and fixing it!

vrischmann commented 1 year ago

In retrospect it seems obvious, the test summary that actually runs tests says this:

Build Summary: 5/5 steps succeeded; 52/52 tests passed
test success
+- run x86_64-native-Debug-multi [5](https://github.com/vrischmann/zig-sqlite/actions/runs/6249860127/job/16967462934#step:5:6)2 passed 23[6](https://github.com/vrischmann/zig-sqlite/actions/runs/6249860127/job/16967462934#step:5:7)ms MaxRSS:5M
   +- zig test x86_64-native-Debug-multi Debug x86_64-native success 16s MaxRSS:411M
      +- zig build-lib sqlite Debug x[8](https://github.com/vrischmann/zig-sqlite/actions/runs/6249860127/job/16967462934#step:5:9)6_64-native cached 2[9](https://github.com/vrischmann/zig-sqlite/actions/runs/6249860127/job/16967462934#step:5:10)4ms MaxRSS:18M
      +- options cached

the test summary that tests nothing:

Build Summary: 4/4 steps succeeded
test success
+- zig test x86_64-native-Debug-multi Debug x86_64-native success 9[5](https://github.com/vrischmann/zig-sqlite/actions/runs/6199906769/job/16833506324#step:5:6)0ms MaxRSS:83M
   +- zig build-lib sqlite Debug x8[6](https://github.com/vrischmann/zig-sqlite/actions/runs/6199906769/job/16833506324#step:5:7)_64-native success 11s MaxRSS:490M
   +- options success