-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lint and add missing test script
Reviewed By: alexmalyshev Differential Revision: D57316246 fbshipit-source-id: dcba7ea1cfd907c56c333ffbec56df73bebdb0a9
- Loading branch information
1 parent
c1cbb05
commit 63018a4
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -xe | ||
set -o pipefail | ||
|
||
cd "$(dirname $(readlink -f $0))"/../ | ||
|
||
# # Only debug builds have sys.gettotalrefcount() | ||
buck2 run @fbcode//mode/dbg fbcode//cinderx:python3.10 -- -c 'import sys; sys.gettotalrefcount()' | ||
buck2 run @fbcode//mode/dev fbcode//cinderx:python3.10 -- -c 'import sys; sys.gettotalrefcount()' | ||
! buck2 run @fbcode//mode/opt fbcode//cinderx:python3.10 -- -c 'import sys; sys.gettotalrefcount()' | ||
|
||
# # Only ASAN builds should have the ASAN API avilable through ctypes | ||
! buck2 run @fbcode//mode/dbg fbcode//cinderx:python3.10 -- -c 'import ctypes; ctypes.pythonapi.__asan_default_options()' | ||
buck2 run @fbcode//mode/dev fbcode//cinderx:python3.10 -- -c 'import ctypes; ctypes.pythonapi.__asan_default_options()' | ||
! buck2 run @fbcode//mode/opt fbcode//cinderx:python3.10 -- -c 'import ctypes; ctypes.pythonapi.__asan_default_options()' | ||
|
||
# We embed build flags in our objects | ||
strings $(buck2 run @//mode/dev fbcode//cinderx:dist-path)/lib/libpython3.10.so | ( ! grep -- "-O3 -fno-omit-frame-pointer" > /dev/null ) | ||
strings $(buck2 run @//mode/dbg fbcode//cinderx:dist-path)/lib/libpython3.10.so | ( ! grep -- "-O3 -fno-omit-frame-pointer" > /dev/null ) | ||
strings $(buck2 run @//mode/opt fbcode//cinderx:dist-path)/lib/libpython3.10.so | grep -- "-O3 -fno-omit-frame-pointer" > /dev/null | ||
|
||
echo All tests passed! |