-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
207 test tarball runner + tweak rpc client logging #242
Changes from 17 commits
fe2b671
ee8c478
515e619
4acc805
b84642b
f46ba0b
1f74305
dcfdf7d
4ba0ab2
70df5b3
49482c4
ca4b856
2b8e8fe
c36cccb
29968b1
d3c3b81
bde3cf9
4c78344
a2c52f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ stdenv, coreutils, lib, kore-rpc-booster, rpc-client, git, k }: | ||
{ stdenv, coreutils, lib, kore-rpc-booster, rpc-client, git, k, blockchain-k-plugin, openssl, procps }: | ||
|
||
let | ||
mkIntegrationTest = | ||
|
@@ -16,7 +16,8 @@ let | |
export ${f} | ||
'') buildFlags} | ||
export SERVER=${kore-rpc-booster}/bin/kore-rpc-booster | ||
export CLIENT=${rpc-client}/bin/rpc-client | ||
export CLIENT="${rpc-client}/bin/rpc-client -l debug" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ran with debug logging to analyse the M1 failure but it is flaky... passed on the 2nd run after truncating some output on the first run. |
||
export PLUGIN_DIR=${blockchain-k-plugin} | ||
|
||
patchShebangs runDirectoryTest.sh | ||
./runDirectoryTest.sh test-${name} --time ${ | ||
|
@@ -46,4 +47,5 @@ in { | |
simplify = mkIntegrationTest { name = "simplify"; }; | ||
get-model = mkIntegrationTest { name = "get-model"; }; | ||
issue212 = mkIntegrationTest { name = "issue212"; }; | ||
foundry-bug-report.tar.gz = mkIntegrationTest { name = "foundry-bug-report.tar.gz"; nativeBuildInputs = [ k openssl procps ]; }; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
set -eux | ||
|
||
SCRIPT_DIR=$(dirname $0) | ||
PLUGIN_DIR=${PLUGIN_DIR:-""} | ||
NIX_LIBS=${NIX_LIBS:-""} | ||
|
||
|
||
if [ -z "$PLUGIN_DIR" ]; then | ||
echo "PLUGIN_DIR required to link in a crypto plugin dependency" | ||
exit 1 | ||
else | ||
for lib in libff libcryptopp libsecp256k1; do | ||
LIBFILE=$(find ${PLUGIN_DIR} -name "${lib}.a" | head -1) | ||
[ -z "$LIBFILE" ] && (echo "[Error] Unable to locate ${lib}.a"; exit 1) | ||
PLUGIN_LIBS+="$LIBFILE " | ||
PLUGIN_INCLUDE+="-I$(dirname $LIBFILE)/../include " | ||
done | ||
#PLUGIN_CPP=$(find ${PLUGIN_DIR}/plugin-c -name "*.cpp") | ||
PLUGIN_CPP="${PLUGIN_DIR}/include/plugin-c/blake2.cpp ${PLUGIN_DIR}/include/plugin-c/crypto.cpp ${PLUGIN_DIR}/include/plugin-c/plugin_util.cpp" | ||
fi | ||
|
||
NAME=$(basename ${0%.tar.gz.kompile}) | ||
NAMETGZ=$(basename ${0%.kompile}) | ||
|
||
# unpack definition.kore and llvm_definition from tarball | ||
# into a directory named after the tarball | ||
cd $SCRIPT_DIR | ||
mkdir -p $NAME | ||
tar xzf ../test-$NAMETGZ -C $NAME definition.kore llvm_definition/ | ||
|
||
# provide definition | ||
cp $NAME/definition.kore ${NAMETGZ}.kore | ||
|
||
# kompile llvm-definition to interpreter | ||
|
||
case "$OSTYPE" in | ||
linux*) LPROCPS="-lprocps" ;; | ||
*) LPROCPS="" ;; | ||
esac | ||
|
||
llvm-kompile $NAME/llvm_definition/definition.kore $NAME/llvm_definition/dt c -- \ | ||
-fPIC -std=c++17 -o interpreter \ | ||
$PLUGIN_LIBS $PLUGIN_INCLUDE $PLUGIN_CPP \ | ||
-lcrypto -lssl $LPROCPS | ||
mv interpreter.* $NAMETGZ.dylib | ||
|
||
# remove temporary artefacts | ||
rm -r $NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that we are testing with a 5.6 version of K here... but upgrading seems to cause issues with the index-state being too new so I left that for a follow-up.