Skip to content

Commit c57242d

Browse files
committed
Kompile test contracts in-advance
1 parent 5db6dfc commit c57242d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

scripts/performance-tests-kontrol.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,27 @@ master_shell() {
9393
GC_DONT_GC=1 nix develop . --extra-experimental-features 'nix-command flakes' --override-input kevm/k-framework/haskell-backend github:runtimeverification/haskell-backend/$MASTER_COMMIT --command bash -c "$1"
9494
}
9595

96+
# kompile Kontrol's K dependencies
9697
feature_shell "poetry install && poetry run kdist --verbose build evm-semantics.plugin evm-semantics.haskell kontrol.foundry --jobs 4"
9798

99+
# kompile the test contracts, to be reused in feature_shell and master_shell. Copy the result from pytest's temp directory
100+
PYTEST_TEMP_DIR=$TEMPD/pytest-temp-dir
101+
mkdir -p $PYTEST_TEMP_DIR
102+
FOUNDRY_DIR=$TEMPD/foundry
103+
mkdir -p $FOUNDRY_DIR
104+
feature_shell "make test-integration TEST_ARGS='--basetemp=$PYTEST_TEMP_DIR -n0 --dist=no -k test_foundry_kompile'"
105+
cp -r $PYTEST_TEMP_DIR/foundry/* $FOUNDRY_DIR
106+
98107
mkdir -p $SCRIPT_DIR/logs
99108

100-
feature_shell "make test-integration TEST_ARGS='--maxfail=0 --numprocesses=$PYTEST_PARALLEL -vv $BUG_REPORT' | tee $SCRIPT_DIR/logs/kontrol-$KONTROL_VERSION-$FEATURE_BRANCH_NAME.log"
109+
feature_shell "make test-integration TEST_ARGS='--foundry-root $FOUNDRY_DIR --maxfail=0 --numprocesses=$PYTEST_PARALLEL -vv $BUG_REPORT' | tee $SCRIPT_DIR/logs/kontrol-$KONTROL_VERSION-$FEATURE_BRANCH_NAME.log"
101110
killall kore-rpc-booster || echo "no zombie processes found"
102111

103112
if [ -z "$BUG_REPORT" ]; then
104113
if [ ! -e "$SCRIPT_DIR/logs/kontrol-$KONTROL_VERSION-master-$MASTER_COMMIT_SHORT.log" ]; then
105-
master_shell "make test-integration TEST_ARGS='--maxfail=0 --numprocesses=$PYTEST_PARALLEL -vv' | tee $SCRIPT_DIR/logs/kontrol-$KONTROL_VERSION-master-$MASTER_COMMIT_SHORT.log"
114+
# remove proofs so that they are not reused by the master shell call
115+
rm -r $FOUNDRY_DIR/out/proofs
116+
master_shell "make test-integration TEST_ARGS='--foundry-root $FOUNDRY_DIR --maxfail=0 --numprocesses=$PYTEST_PARALLEL -vv' | tee $SCRIPT_DIR/logs/kontrol-$KONTROL_VERSION-master-$MASTER_COMMIT_SHORT.log"
106117
killall kore-rpc-booster || echo "no zombie processes found"
107118
fi
108119

0 commit comments

Comments
 (0)