Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,7 @@ function build_wasm {
function build_wasm_threads {
set -eu
if ! cache_download barretenberg-wasm-threads-$hash.zst; then
if [ "$(arch)" == "amd64" ] && [ "$CI" -eq 1 ]; then
# We only want to sanity check that we haven't broken wasm ecc ops in merge queue.
build_preset wasm-threads --target barretenberg.wasm barretenberg.wasm.gz ecc_tests
else
build_preset wasm-threads
fi
build_preset wasm-threads --target barretenberg.wasm barretenberg.wasm.gz ecc_tests
cache_upload barretenberg-wasm-threads-$hash.zst build-wasm-threads/bin
fi
}
Expand Down
27 changes: 15 additions & 12 deletions ci3/run_test_cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ source $ci3/source_refname
# We must enable job control to ensure our test runs in it's own process group.
# Otherwise, when parallel sends a TERM to the group, it will also kill any child process of the test.
# This can cause issues with proper cleanup (e.g. killing docker client processes as they run).
# Slightly breaking the abstraction here, but if using strict scheduling we don't have the above problem,
# but instead we want to avoid lots of "Terminated" messages.
# [ "${STRICT_SCHEDULING:-0}" -eq 0 ] && set -m
set -m

cmd=$1
is_merge_queue=0
[[ "$REF_NAME" =~ ^gh-readonly-queue/ ]] && is_merge_queue=1

# Extract the first token and export any variable assignments.
hash_part="${cmd%% *}"
Expand Down Expand Up @@ -169,15 +168,17 @@ if [ "$CI_REDIS_AVAILABLE" -eq 1 ]; then
fi

function track_test {
# We track tests in CI on in merge queues (TARGET_BRANCH will be set).
if [[ "$CI" -eq 1 && -n "${TARGET_BRANCH:-}" ]]; then
local key=${1}_$TARGET_BRANCH
local line="$2 (target: $TARGET_BRANCH)"

redis_cli LPUSH $key "$(date "+%m-%d %H:%M:%S"): $(echo -e "$line")" &>/dev/null
# Keeps only the last 1000 lines.
redis_cli RTRIM $key -1000 -1 &>/dev/null
# We track tests in merge queues only.
if [ "$is_merge_queue" -eq 0 ]; then
return
fi

local key=$1
local line="$2 (target: $TARGET_BRANCH)"

redis_cli LPUSH $key "$(date "+%m-%d %H:%M:%S"): $(echo -e "$line")" &>/dev/null
# Keeps only the last 1000 lines.
redis_cli RTRIM $key -1000 -1 &>/dev/null
}

# Show PASSED and early out on success.
Expand All @@ -193,6 +194,7 @@ function fail {
local line="${red}FAILED${reset}${log_info:-}: $test_cmd (${SECONDS}s) (code: $code)${1:-}"
track_test $test_hash "$line"
track_test "failed_tests" "$line"
track_test "failed_tests_${TARGET_BRANCH:-}" "$line"
echo -e "$line"
if [ "${DUMP_FAIL:-0}" -eq 1 ]; then
cat $tmp_file
Expand All @@ -206,10 +208,11 @@ function flake {
local line="${purple}FLAKED${reset}${log_info:-}: $test_cmd (${SECONDS}s) (code: $code)"
track_test $test_hash "$line"
track_test "failed_tests" "$line"
track_test "failed_tests_${TARGET_BRANCH:-}" "$line"
echo -e "$line"

# Early out if no token or not in merge queue.
if [ -z "${SLACK_BOT_TOKEN:-}" ] || [[ ! "$REF_NAME" =~ ^gh-readonly-queue/ ]]; then
if [ -z "${SLACK_BOT_TOKEN:-}" ] || [ "$is_merge_queue" -eq 0 ]; then
return
fi

Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function test_cmds {
echo "$hash cd l1-contracts && solhint --config ./.solhint.json \"src/**/*.sol\""
echo "$hash cd l1-contracts && forge fmt --check"
echo "$hash cd l1-contracts && forge test"
if [ "${TARGET_BRANCH:-}" == "master" ]; then
if [ "$CI" -eq 0 ] || [ "${TARGET_BRANCH:-}" == "master" ]; then
echo "$hash cd l1-contracts && forge test --no-match-contract UniswapPortalTest --match-contract ScreamAndShoutTest"
fi
}
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/test/shouting.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract ScreamAndShoutTest is Test {
bytes32 codeHash = keccak256(creationCode);

assertEq(
codeHash, 0x1ee8b65cce354f0149f5dc00ff4314acf147d4efe28a789016a4031adebec039, ERR_STRING
codeHash, 0x892b4a5c70e2e665b147db8ae02a0410ae400adefd02d85feb56847593d4b9dd, ERR_STRING
);
}

Expand Down