Skip to content

Commit 3d9dbc1

Browse files
committed
WIP
1 parent e252947 commit 3d9dbc1

File tree

5 files changed

+30
-15
lines changed

5 files changed

+30
-15
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
# Dependencies
117117
tdnf -y install openssl-devel libuv-devel
118118
# Test dependencies
119-
tdnf -y install libarrow-devel parquet-libs-devel lldb
119+
tdnf -y install libarrow-devel parquet-libs-devel lldb npm jq expect
120120
shell: bash
121121

122122
- uses: actions/checkout@v4
@@ -129,7 +129,7 @@ jobs:
129129
git config --global --add safe.directory /__w/CCF/CCF
130130
mkdir build
131131
cd build
132-
CC=`which clang` CXX=`which clang++` cmake -GNinja -DCOMPILE_TARGET=virtual -DCMAKE_BUILD_TYPE=Debug -DLVI_MITIGATIONS=OFF -DUSE_LIBCXX=OFF ..
132+
CC=`which clang` CXX=`which clang++` cmake -GNinja -DCOMPILE_TARGET=virtual -DCMAKE_BUILD_TYPE=Debug -DLVI_MITIGATIONS=OFF -DUSE_LIBCXX=OFF -DCDDL_CHECK=OFF ..
133133
ninja
134134
shell: bash
135135

@@ -142,4 +142,6 @@ jobs:
142142
export ASAN_SYMBOLIZER_PATH=$(realpath /usr/bin/llvm-symbolizer-15)
143143
# Unit tests
144144
./tests.sh --output-on-failure -L unit -j$(nproc --all)
145+
# All other acceptably fast tests, which are now supported on Mariner.
146+
./tests.sh --timeout 360 --output-on-failure -LE "benchmark|protocolstest|suite|unit"|lts_compatibility|raft_scenario"
145147
shell: bash

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ option(SAN "Enable Address and Undefined Behavior Sanitizers" OFF)
100100
option(BUILD_END_TO_END_TESTS "Build end to end tests" ON)
101101
option(COVERAGE "Enable coverage mapping" OFF)
102102
option(SHUFFLE_SUITE "Shuffle end to end test suite" OFF)
103+
option(CDDL_CHECK
104+
"Run cddl schema check agains certain CBOR envelopes in e2e tests" ON
105+
)
103106
option(LONG_TESTS "Enable long end-to-end tests" OFF)
104107
option(KV_STATE_RB "Enable RBMap as underlying KV state implementation" OFF)
105108
if(KV_STATE_RB)
@@ -1297,6 +1300,7 @@ if(BUILD_TESTS)
12971300
TEST lts_compatibility
12981301
APPEND
12991302
PROPERTY ENVIRONMENT "LTS_COMPAT_GOV_CLIENT=1"
1303+
PROPERTY LABELS lts_compatibility
13001304
)
13011305
endif()
13021306

cmake/common.cmake

+8
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ function(add_e2e_test)
128128
)
129129
endif()
130130

131+
if(CDDL_CHECK)
132+
set_property(
133+
TEST ${PARSED_ARGS_NAME}
134+
APPEND
135+
PROPERTY ENVIRONMENT "CDDL_CHECK=1"
136+
)
137+
endif()
138+
131139
if("${PARSED_ARGS_LABEL}" STREQUAL "partitions")
132140
set_property(
133141
TEST ${PARSED_ARGS_NAME}

tests/e2e_logging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2274,7 +2274,7 @@ def run_main_tests(network, args):
22742274
test_remove(network, args)
22752275
test_clear(network, args)
22762276
test_record_count(network, args)
2277-
if args.package == "samples/apps/logging/liblogging":
2277+
if args.package == "samples/apps/logging/liblogging" and os.getenv("CDDL_CHECK"):
22782278
test_cbor_merkle_proof(network, args)
22792279
test_cose_signature_schema(network, args)
22802280
test_cose_receipt_schema(network, args)

tests/recovery.py

+13-12
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,19 @@ def verify_endorsements_chain(primary, endorsements, pubkey):
8989
time.time() - cose_msg.phdr[CWT_KEY][IAT_CWT_LABEL] < last_five_minutes
9090
), cose_msg.phdr
9191

92-
endorsement_filename = "prev_service_identoty_endorsement.cose"
93-
with open(endorsement_filename, "wb") as f:
94-
f.write(endorsement)
95-
subprocess.run(
96-
[
97-
"cddl",
98-
"../cddl/ccf-cose-endorsement-service-identity.cddl",
99-
"v",
100-
endorsement_filename,
101-
],
102-
check=True,
103-
)
92+
if os.getenv("CDDL_CHECK"):
93+
endorsement_filename = "prev_service_identoty_endorsement.cose"
94+
with open(endorsement_filename, "wb") as f:
95+
f.write(endorsement)
96+
subprocess.run(
97+
[
98+
"cddl",
99+
"../cddl/ccf-cose-endorsement-service-identity.cddl",
100+
"v",
101+
endorsement_filename,
102+
],
103+
check=True,
104+
)
104105

105106
next_key_bytes = cose_msg.payload
106107
pubkey = serialization.load_der_public_key(next_key_bytes, default_backend())

0 commit comments

Comments
 (0)