Skip to content
Merged
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
14 changes: 10 additions & 4 deletions scripts/ci/fd-conformance.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ for (const fixture of skipFixtures) {
await $`rm -f ${path.join(fixturesPath, fixture)}`;
}

// Add the Mollusk-generated fixtures to the test inputs.
const molluskFixturesPath = path.join(workingDirectory, 'program', 'fuzz', 'blob');
await $`cp -a ${molluskFixturesPath}/. ${fixturesPath}/`;

// Clone the SolFuzz-Agave harness.
const solFuzzAgavePath = path.join(harnessPath, 'impl', 'solfuzz-agave');
await $`git clone -b agave-v2.1.0 http://github.com/firedancer-io/solfuzz-agave.git ${solFuzzAgavePath}`;
await $`git clone -b agave-v2.1.3 http://github.com/firedancer-io/solfuzz-agave.git ${solFuzzAgavePath}`;

// Fetch protobuf files.
await $`make -j -C ${solFuzzAgavePath} fetch_proto`
Expand Down Expand Up @@ -62,13 +66,15 @@ await $`cargo build --manifest-path ${solFuzzAgaveManifestPath} \
--lib --release --target x86_64-unknown-linux-gnu`;
await $`mv ${solFuzzAgaveTargetPath} ${testTargetPathBuiltin}`;

// Build the Agave target with the BPF version.
// Build the Agave target with the BPF version and special-casing enabled for
// conformance testing (`core-bpf-conformance` features).
const testTargetPathCoreBpf = path.join(testTargetsDir, 'core_bpf.so');
await $`CORE_BPF_PROGRAM_ID=${getProgramId('program')} \
CORE_BPF_TARGET=${getProgramSharedObjectPath('program')} \
FORCE_RECOMPILE=true \
cargo build --manifest-path ${solFuzzAgaveManifestPath} \
--lib --release --target x86_64-unknown-linux-gnu --features core-bpf`;
--lib --release --target x86_64-unknown-linux-gnu \
--features core-bpf-conformance`;
await $`mv ${solFuzzAgaveTargetPath} ${testTargetPathCoreBpf}`;

// Remove any test results if they exist.
Expand All @@ -87,4 +93,4 @@ if (fs.existsSync('test_results/failed_protobufs')) {
}
}

console.log('All tests passed.');
console.log('All Firedancer conformance tests passed.');
Loading